From 599e6b490584fca2fb79fe5292f65b0d78b046fd Mon Sep 17 00:00:00 2001 From: Conor Schaefer Date: Fri, 15 Mar 2024 11:33:21 -0700 Subject: [PATCH] fix(pd): rename unbonding epochs -> delay Follow-up to changes made in [0], where we settled on "unbonded delay" rather than "unbonding epochs" to describe how many blocks must elapse until undelegated stake becomes claimable. The `pd` CLI options are only used by developers, so I'm not worried about breaking operator scripts in the wild. [0] https://github.com/penumbra-zone/penumbra/pull/3923 --- crates/bin/pd/src/cli.rs | 4 ++-- crates/bin/pd/src/main.rs | 4 ++-- crates/bin/pd/src/testnet/generate.rs | 8 ++++---- deployments/scripts/smoke-test.sh | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/bin/pd/src/cli.rs b/crates/bin/pd/src/cli.rs index 9f51234bfd..3cb1f54fbf 100644 --- a/crates/bin/pd/src/cli.rs +++ b/crates/bin/pd/src/cli.rs @@ -144,9 +144,9 @@ pub enum TestnetCommand { /// Number of blocks per epoch. #[clap(long)] epoch_duration: Option, - /// Number of epochs before unbonding stake is released. + /// Number of blocks that must elapse before unbonding stake is released. #[clap(long)] - unbonding_epochs: Option, + unbonding_delay: Option, /// Maximum number of validators in the consensus set. #[clap(long)] active_validator_limit: Option, diff --git a/crates/bin/pd/src/main.rs b/crates/bin/pd/src/main.rs index 845178f35b..29d2ecbe7e 100644 --- a/crates/bin/pd/src/main.rs +++ b/crates/bin/pd/src/main.rs @@ -306,7 +306,7 @@ async fn main() -> anyhow::Result<()> { peer_address_template, timeout_commit, epoch_duration, - unbonding_epochs, + unbonding_delay, active_validator_limit, allocations_input_file, validators_input_file, @@ -368,7 +368,7 @@ async fn main() -> anyhow::Result<()> { timeout_commit, active_validator_limit, epoch_duration, - unbonding_epochs, + unbonding_delay, proposal_voting_blocks, )?; tracing::info!( diff --git a/crates/bin/pd/src/testnet/generate.rs b/crates/bin/pd/src/testnet/generate.rs index 418164b640..8fd2ffef1d 100644 --- a/crates/bin/pd/src/testnet/generate.rs +++ b/crates/bin/pd/src/testnet/generate.rs @@ -67,7 +67,7 @@ impl TestnetConfig { tendermint_timeout_commit: Option, active_validator_limit: Option, epoch_duration: Option, - unbonding_epochs: Option, + unbonding_delay: Option, proposal_voting_blocks: Option, ) -> anyhow::Result { let external_addresses = external_addresses.unwrap_or_default(); @@ -96,7 +96,7 @@ impl TestnetConfig { validators.to_vec(), active_validator_limit, epoch_duration, - unbonding_epochs, + unbonding_delay, proposal_voting_blocks, )?; let genesis = Self::make_genesis(app_state)?; @@ -343,7 +343,7 @@ pub fn testnet_generate( active_validator_limit: Option, tendermint_timeout_commit: Option, epoch_duration: Option, - unbonding_epochs: Option, + unbonding_delay: Option, peer_address_template: Option, external_addresses: Vec, validators_input_file: Option, @@ -361,7 +361,7 @@ pub fn testnet_generate( tendermint_timeout_commit, active_validator_limit, epoch_duration, - unbonding_epochs, + unbonding_delay, proposal_voting_blocks, )?; tracing::info!( diff --git a/deployments/scripts/smoke-test.sh b/deployments/scripts/smoke-test.sh index ac75a8acc8..4473218351 100755 --- a/deployments/scripts/smoke-test.sh +++ b/deployments/scripts/smoke-test.sh @@ -47,8 +47,8 @@ cargo build --quiet --release --bin pd echo "Generating testnet config..." EPOCH_DURATION="${EPOCH_DURATION:-50}" -UNBONDING_EPOCHS="${UNBONDING_EPOCHS:-1}" -cargo run --quiet --release --bin pd -- testnet generate --unbonding-epochs "$UNBONDING_EPOCHS" --epoch-duration "$EPOCH_DURATION" --timeout-commit 500ms +UNBONDING_DELAY="${UNBONDING_DELAY:-50}" +cargo run --quiet --release --bin pd -- testnet generate --unbonding-delay "$UNBONDING_DELAY" --epoch-duration "$EPOCH_DURATION" --timeout-commit 500ms echo "Starting CometBFT..." cometbft start --log_level=error --home "${HOME}/.penumbra/testnet_data/node0/cometbft" > "${SMOKE_LOG_DIR}/comet.log" &