diff --git a/crates/bin/pd/src/testnet/generate.rs b/crates/bin/pd/src/testnet/generate.rs index 217fd6df9b..040d3cd247 100644 --- a/crates/bin/pd/src/testnet/generate.rs +++ b/crates/bin/pd/src/testnet/generate.rs @@ -287,17 +287,22 @@ impl TestnetConfig { consensus_params: tendermint::consensus::Params { abci: AbciParams::default(), block: tendermint::block::Size { + // 1MB max_bytes: 1048576, + // Set to infinity since a chain running Penumbra won't use + // cometbft's notion of gas. max_gas: -1, - // minimum time increment between consecutive blocks + // Minimum time increment between consecutive blocks. time_iota_ms: 500, }, - // TODO Should these correspond with values used within `pd` for penumbra epochs? evidence: tendermint::evidence::Params { - max_age_num_blocks: 100000, - // 1 day - max_age_duration: tendermint::evidence::Duration(Duration::new(86400, 0)), - max_bytes: 1048576, + // We should keep this in approximate sync with the recommended default for + // `StakeParameters::unbonding_delay`, this is roughly a week. + max_age_num_blocks: 130000, + // Similarly, we set the max age duration for evidence to be a little over a week. + max_age_duration: tendermint::evidence::Duration(Duration::from_secs(650000)), + // 30KB + max_bytes: 30000, }, validator: tendermint::consensus::params::ValidatorParams { pub_key_types: vec![Algorithm::Ed25519], diff --git a/crates/core/component/sct/src/params.rs b/crates/core/component/sct/src/params.rs index 07419015e9..e5acf500eb 100644 --- a/crates/core/component/sct/src/params.rs +++ b/crates/core/component/sct/src/params.rs @@ -34,11 +34,12 @@ impl From for pb::SctParameters { } } -// TODO(erwan): defaults are implemented here as well as in the `pd::main` impl Default for SctParameters { fn default() -> Self { Self { - epoch_duration: 719, + // Measured in blocks, assuming a 5s block time + // this is about a day worth of blocks. + epoch_duration: 17280, } } } diff --git a/crates/core/component/stake/src/params.rs b/crates/core/component/stake/src/params.rs index 4a8b424edf..b262b4faaf 100644 --- a/crates/core/component/stake/src/params.rs +++ b/crates/core/component/stake/src/params.rs @@ -65,11 +65,11 @@ impl From for pb::StakeParameters { } } -// TODO: defaults are implemented here as well as in pd impl Default for StakeParameters { fn default() -> Self { Self { - unbonding_delay: 719 * 3 + 1, + // About a week worth of blocks. + unbonding_delay: 120960, active_validator_limit: 80, // Copied from cosmos hub signed_blocks_window_len: 10000,