Skip to content

Commit

Permalink
build: allow building client crates without rocksdb (#4892)
Browse files Browse the repository at this point in the history
This required:
- feature gating `cnidarium` in `penumbra-app`
- removing the stateless transaction check in the view crate
- removing the ceremony contribution command from `pcli`

Closes #4885

## Checklist before requesting a review

- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

> Only client code was changed, the non-client code that was changed was
only changed to have the public API be reduced without certain default
features enabled. PD should be completely unchanged by this fix.
  
## How to test this:

run `cargo build --bin pcli -p pcli` (and pclientd, and pindexer) and
observe that rocksdb is not built.

---------

Co-authored-by: Conor Schaefer <[email protected]>
  • Loading branch information
cronokirby and conorsch authored Oct 9, 2024
1 parent 94b0058 commit 705ad9e
Show file tree
Hide file tree
Showing 16 changed files with 90 additions and 342 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[workspace]

# Set virtual workspace's resolver to v1, to support the "rust-docs" script.
resolver = "1"
resolver = "2"

exclude = ["tools/proto-compiler", "tools/parameter-setup"]

Expand Down Expand Up @@ -167,7 +166,7 @@ once_cell = { version = "1.8" }
parking_lot = { version = "0.12.1" }
pbjson = { version = "0.6" }
pbjson-types = { version = "0.6.0" }
penumbra-app = { path = "crates/core/app" }
penumbra-app = { default-features = false, path = "crates/core/app" }
penumbra-asset = { default-features = false, path = "crates/core/asset" }
penumbra-community-pool = { default-features = false, path = "crates/core/component/community-pool" }
penumbra-compact-block = { default-features = false, path = "crates/core/component/compact-block" }
Expand Down Expand Up @@ -240,7 +239,7 @@ tower-service = { version = "0.3.2" }
tracing = { version = "0.1" }
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
url = { version = "2.2" }
getrandom = { version = "0.2", default-features = false, features = ["js"] }
getrandom = { version = "0.2", default-features = false }

# TODO(kate):
# temporarily point these dependencies to a tag in the penumbra-zone fork.
Expand Down
4 changes: 1 addition & 3 deletions crates/bin/pcli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ parallel = [
"penumbra-stake/parallel",
"penumbra-transaction/parallel",
"penumbra-wallet/parallel",
"penumbra-proof-setup/parallel",
]

[dependencies]
Expand Down Expand Up @@ -60,7 +59,7 @@ indicatif = {workspace = true}
jmt = {workspace = true}
ndarray = "0.15.6"
once_cell = {workspace = true}
penumbra-app = {workspace = true}
penumbra-app = {workspace = true, default-features = false}
penumbra-asset = {workspace = true, default-features = false}
penumbra-community-pool = {workspace = true, default-features = false}
penumbra-compact-block = {workspace = true, default-features = false}
Expand All @@ -72,7 +71,6 @@ penumbra-governance = {workspace = true, default-features = false}
penumbra-ibc = {workspace = true, default-features = false}
penumbra-keys = {workspace = true, default-features = false}
penumbra-num = {workspace = true, default-features = false}
penumbra-proof-setup = {workspace = true}
penumbra-proof-params = { workspace = true, default-features = true }
penumbra-proto = {workspace = true, features = ["rpc", "box-grpc"], default-features = true}
penumbra-sct = {workspace = true, default-features = false}
Expand Down
7 changes: 1 addition & 6 deletions crates/bin/pcli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ pub use tx::TxCmd;
pub use validator::ValidatorCmd;
pub use view::ViewCmd;

use self::{ceremony::CeremonyCmd, tx::TxCmdWithOptions};
use self::tx::TxCmdWithOptions;

mod ceremony;
mod debug;
mod init;
mod migrate;
Expand Down Expand Up @@ -64,9 +63,6 @@ pub enum Command {
/// Manage a validator.
#[clap(subcommand, display_order = 900)]
Validator(ValidatorCmd),
/// Contribute to the summoning ceremony.
#[clap(subcommand, display_order = 990)]
Ceremony(CeremonyCmd),
/// Display information related to diagnosing problems running Penumbra
#[clap(subcommand, display_order = 999)]
Debug(DebugCmd),
Expand All @@ -82,7 +78,6 @@ impl Command {
Command::Validator(cmd) => cmd.offline(),
Command::Query(cmd) => cmd.offline(),
Command::Debug(cmd) => cmd.offline(),
Command::Ceremony(_) => false,
Command::Threshold(cmd) => cmd.offline(),
Command::Migrate(_) => false,
}
Expand Down
259 changes: 0 additions & 259 deletions crates/bin/pcli/src/command/ceremony.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/bin/pcli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ async fn main() -> Result<()> {
Command::View(view_cmd) => view_cmd.exec(&mut app).await?,
Command::Validator(cmd) => cmd.exec(&mut app).await?,
Command::Query(cmd) => cmd.exec(&mut app).await?,
Command::Ceremony(cmd) => cmd.exec(&mut app).await?,
Command::Threshold(cmd) => cmd.exec(&mut app).await?,
Command::Migrate(cmd) => cmd.exec(&mut app).await?,
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bin/pclientd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ http = {workspace = true}
http-body = {workspace = true}
metrics = {workspace = true}
parking_lot = {workspace = true}
penumbra-app = {workspace = true}
penumbra-app = {workspace = true, default-features = false}
penumbra-asset = {workspace = true, default-features = true}
penumbra-custody = {workspace = true}
penumbra-keys = {workspace = true, default-features = true}
Expand Down
2 changes: 1 addition & 1 deletion crates/bin/pd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ metrics-util = "0.16.2"
mime_guess = "2"
once_cell = { workspace = true }
pbjson-types = { workspace = true }
penumbra-app = { workspace = true }
penumbra-app = { workspace = true, default-features = true }
penumbra-asset = { workspace = true, default-features = true }
penumbra-auto-https = { path = "../../util/auto-https" }
penumbra-compact-block = { workspace = true, default-features = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/bin/pindexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cometindex = {workspace = true}
num-bigint = { version = "0.4" }
penumbra-shielded-pool = {workspace = true, default-features = false}
penumbra-stake = {workspace = true, default-features = false}
penumbra-app = {workspace = true}
penumbra-app = {workspace = true, default-features = false}
penumbra-auction = {workspace = true, default-features = false}
penumbra-dex = {workspace = true, default-features = false}
penumbra-fee = {workspace = true, default-features = false}
Expand Down
Loading

0 comments on commit 705ad9e

Please sign in to comment.