Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pd: review pass on config template defaults #4637

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
Comment on lines +304 to +305
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This closes #4635!

@faddat There aren't any issues with a 1MiB block size and a 30KB evidence limit, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for opening that issue.

},
validator: tendermint::consensus::params::ValidatorParams {
pub_key_types: vec![Algorithm::Ed25519],
Expand Down
5 changes: 3 additions & 2 deletions crates/core/component/sct/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ impl From<SctParameters> 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,
}
}
}
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
Loading