Skip to content

Commit

Permalink
pd: review pass on constants
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor authored and conorsch committed Jun 18, 2024
1 parent 88c1472 commit 03e00de
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
17 changes: 11 additions & 6 deletions crates/bin/pd/src/testnet/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
4 changes: 2 additions & 2 deletions crates/core/component/stake/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ impl From<StakeParameters> 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,
Expand Down

0 comments on commit 03e00de

Please sign in to comment.