Skip to content

Commit

Permalink
Correct naming to "Community Pool" (#3547)
Browse files Browse the repository at this point in the history
* Correct naming to "Community Pool"

The functionality is directly copied from the Cosmos SDK's community pool, and
naming it as such is important to correctly convey expectations about what it
is.

* fixup pcli tx proposal

* fixup cp fvk
  • Loading branch information
hdevalence authored Dec 30, 2023
1 parent f9696cc commit 3bb269c
Show file tree
Hide file tree
Showing 101 changed files with 3,876 additions and 4,040 deletions.
84 changes: 42 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ members = [
"crates/core/component/shielded-pool",
"crates/core/component/governance",
"crates/core/component/ibc",
"crates/core/component/dao",
"crates/core/component/community-pool",
"crates/core/component/dex",
"crates/core/component/sct",
"crates/core/component/fee",
Expand Down
31 changes: 20 additions & 11 deletions crates/bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ decaf377 = { version = "0.5", features = ["r1cs"] }

# Crates.io deps
ark-ec = "0.4.2"
ark-ff = {version = "0.4", default-features = false}
ark-std = {version = "0.4", default-features = false}
ark-ff = { version = "0.4", default-features = false }
ark-std = { version = "0.4", default-features = false }
ark-serialize = "0.4"
serde = { version = "1", features = ["derive"] }
once_cell = "1.8"
Expand All @@ -26,9 +26,9 @@ rand = "0.8"
# only needed because ark-ff doesn't display correctly
num-bigint = "0.4"
tracing = "0.1"
ark-groth16 = {version = "0.4", default-features = false}
ark-groth16 = { version = "0.4", default-features = false }
ark-snark = "0.4"
ark-r1cs-std = {version = "0.4", default-features = false}
ark-r1cs-std = { version = "0.4", default-features = false }
ark-relations = "0.4"
sha2 = "0.10.1"
bech32 = "0.8.1"
Expand All @@ -37,7 +37,7 @@ bech32 = "0.8.1"
penumbra-tct = { path = "../crypto/tct/", features = ["r1cs"] }
criterion = { version = "0.4", features = ["html_reports"] }
penumbra-dex = { path = "../core/component/dex/" }
penumbra-dao = { path = "../core/component/dao/" }
penumbra-community-pool = { path = "../core/component/community-pool/" }
penumbra-stake = { path = "../core/component/stake/" }
penumbra-shielded-pool = { path = "../core/component/shielded-pool/" }
penumbra-governance = { path = "../core/component/governance/" }
Expand All @@ -52,16 +52,25 @@ penumbra-proof-params = { path = "../crypto/proof-params", features = [
] }

[build-dependencies]
regex = {version = "1", optional=true }
reqwest = {version ="0.11.14", optional=true, features = ["blocking", "json"] }
serde_json = {version = "1", optional = true}
sha2 = {version = "0.10.6", optional=true}
hex = {version = "0.4.3", optional=true}
regex = { version = "1", optional = true }
reqwest = { version = "0.11.14", optional = true, features = [
"blocking",
"json",
] }
serde_json = { version = "1", optional = true }
sha2 = { version = "0.10.6", optional = true }
hex = { version = "0.4.3", optional = true }
anyhow = "1"

[features]
download-proving-keys = ["regex", "reqwest", "serde_json", "sha2", "hex"]
parallel = ["ark-ff/parallel", "decaf377/parallel", "ark-groth16/parallel", "ark-std/parallel", "ark-r1cs-std/parallel"]
parallel = [
"ark-ff/parallel",
"decaf377/parallel",
"ark-groth16/parallel",
"ark-std/parallel",
"ark-r1cs-std/parallel",
]

[[bench]]
name = "nullifier_derivation"
Expand Down
40 changes: 20 additions & 20 deletions crates/bin/pcli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,27 @@ parallel = [

[dependencies]
# Workspace dependencies
penumbra-proto = { path = "../../proto", features = ["rpc"] }
penumbra-tct = { path = "../../crypto/tct" }
penumbra-num = { path = "../../core/num", default-features=false }
penumbra-asset = { path = "../../core/asset", default-features=false }
penumbra-keys = { path = "../../core/keys", default-features=false }
penumbra-chain = { path = "../../core/component/chain", default-features = false }
penumbra-proto = { path = "../../proto", features = ["rpc"] }
penumbra-tct = { path = "../../crypto/tct" }
penumbra-num = { path = "../../core/num", default-features = false }
penumbra-asset = { path = "../../core/asset", default-features = false }
penumbra-keys = { path = "../../core/keys", default-features = false }
penumbra-chain = { path = "../../core/component/chain", default-features = false }
penumbra-shielded-pool = { path = "../../core/component/shielded-pool", default-features = false }
penumbra-governance = { path = "../../core/component/governance", default-features = false }
penumbra-stake = { path = "../../core/component/stake", default-features = false }
penumbra-sct = { path = "../../core/component/sct", default-features = false }
penumbra-fee = { path = "../../core/component/fee", default-features = false }
penumbra-dex = { path = "../../core/component/dex", default-features = false }
penumbra-dao = { path = "../../core/component/dao", default-features = false }
penumbra-ibc = { path = "../../core/component/ibc", default-features = false }
penumbra-governance = { path = "../../core/component/governance", default-features = false }
penumbra-stake = { path = "../../core/component/stake", default-features = false }
penumbra-sct = { path = "../../core/component/sct", default-features = false }
penumbra-fee = { path = "../../core/component/fee", default-features = false }
penumbra-dex = { path = "../../core/component/dex", default-features = false }
penumbra-community-pool = { path = "../../core/component/community-pool", default-features = false }
penumbra-ibc = { path = "../../core/component/ibc", default-features = false }
penumbra-compact-block = { path = "../../core/component/compact-block", default-features = false }
penumbra-transaction = { path = "../../core/transaction", features = ["clap"] }
penumbra-proof-setup = { path = "../../crypto/proof-setup" }
penumbra-app = { path = "../../core/app" }
penumbra-wallet = { path = "../../wallet" }
penumbra-custody = { path = "../../custody" }
penumbra-view = { path = "../../view" }
penumbra-transaction = { path = "../../core/transaction", features = ["clap"] }
penumbra-proof-setup = { path = "../../crypto/proof-setup" }
penumbra-app = { path = "../../core/app" }
penumbra-wallet = { path = "../../wallet" }
penumbra-custody = { path = "../../custody" }
penumbra-view = { path = "../../view" }

# Penumbra dependencies
decaf377 = { version = "0.5" }
Expand Down Expand Up @@ -111,7 +111,7 @@ assert_cmd = "2.0"
predicates = "2.1"
tempfile = "3.3.0"
regex = "1.6.0"
penumbra-governance = { path = "../../core/component/governance", default-features = false }
penumbra-governance = { path = "../../core/component/governance", default-features = false }
penumbra-proof-params = { path = "../../crypto/proof-params", features = [
"bundled-proving-keys",
"download-proving-keys",
Expand Down
18 changes: 9 additions & 9 deletions crates/bin/pcli/src/command/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ mod dex;
use dex::DexCmd;
mod governance;
use governance::GovernanceCmd;
mod dao;
use dao::DaoCmd;
mod community_pool;
use community_pool::CommunityPoolCmd;
mod validator;
pub(super) use validator::ValidatorCmd;
mod ibc_query;
Expand Down Expand Up @@ -52,9 +52,9 @@ pub enum QueryCmd {
/// Queries information about governance proposals.
#[clap(subcommand)]
Governance(GovernanceCmd),
/// Queries information about the DAO.
/// Queries information about the Community Pool.
#[clap(subcommand)]
Dao(DaoCmd),
CommunityPool(CommunityPoolCmd),
/// Queries information about the decentralized exchange.
#[clap(subcommand)]
Dex(DexCmd),
Expand Down Expand Up @@ -107,8 +107,8 @@ impl QueryCmd {
return governance.exec(app).await;
}

if let QueryCmd::Dao(dao) = self {
return dao.exec(app).await;
if let QueryCmd::CommunityPool(cp) = self {
return cp.exec(app).await;
}

if let QueryCmd::Ibc(ibc) = self {
Expand All @@ -121,7 +121,7 @@ impl QueryCmd {
| QueryCmd::Validator(_)
| QueryCmd::Dex(_)
| QueryCmd::Governance(_)
| QueryCmd::Dao(_)
| QueryCmd::CommunityPool(_)
| QueryCmd::Watch { .. }
| QueryCmd::Ibc(_) => {
unreachable!("query handled in guard");
Expand Down Expand Up @@ -153,7 +153,7 @@ impl QueryCmd {

pub fn offline(&self) -> bool {
match self {
QueryCmd::Dex { .. } | QueryCmd::Dao { .. } => false,
QueryCmd::Dex { .. } | QueryCmd::CommunityPool { .. } => false,
QueryCmd::Tx { .. }
| QueryCmd::Chain { .. }
| QueryCmd::Validator { .. }
Expand All @@ -176,7 +176,7 @@ impl QueryCmd {
| QueryCmd::Validator { .. }
| QueryCmd::Dex { .. }
| QueryCmd::Governance { .. }
| QueryCmd::Dao { .. }
| QueryCmd::CommunityPool { .. }
| QueryCmd::Watch { .. }
| QueryCmd::Ibc(_) => {
unreachable!("query is special cased")
Expand Down
Loading

0 comments on commit 3bb269c

Please sign in to comment.