-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[aptos-cli] Add Genesis tooling updates #1393
Conversation
crates/aptos/src/genesis/config.rs
Outdated
#[serde(default)] | ||
pub allow_new_validators: bool, | ||
/// Initial lockup period for genesis validators | ||
#[serde(default)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial_lockup_period_duration_secs
defaults to 0. Do these defaults make sense? What if people set allow_new_validators
to be true and leave initial_lockup_period_duration_secs
to its default?
Should we have better defaults for these three fields?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. I think we also should have min lockup/max lockup and min/max stake set and reward rates in layout as well. These will be directly passed into the Stake module. See https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/aptos-framework/sources/configs/Stake.move#L33 and https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/vm-genesis/src/lib.rs#L195
initial_lockup_default can then just be min_lockup
After the discussion with Kevin and Zekun, we have couple things need to be configurable in genesis layout:
|
@movekevin I will update this once my other two genesis PRs make it through since the location of the genesis tooling has moved |
b3d6d31
to
cf58fb5
Compare
cf58fb5
to
f21f3c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks good to me. Will leave others to comment and approve.
api/src/tests/test_context.rs
Outdated
@@ -74,7 +77,7 @@ pub fn new_test_context(test_name: &'static str) -> TestContext { | |||
ApiConfig::default(), | |||
), | |||
rng, | |||
root_keys, | |||
root_key, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we rename this key from root_key to mint_key? since the only thing it can do is really just mint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
crates/aptos-genesis/src/config.rs
Outdated
pub allow_new_validators: bool, | ||
/// Minimum stake to be in the validator set | ||
pub min_stake: u64, | ||
/// Minimum number of seconds to lockup staked coins | ||
pub min_lockup_duration_secs: u64, | ||
/// Duration of an epoch | ||
pub epoch_duration_secs: u64, | ||
/// Initial timestamp for genesis validators to be locked up | ||
pub initial_lockup_timestamp: u64, | ||
/// Min price per gas unit | ||
pub min_price_per_gas_unit: u64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should align on those variable naming in https://github.com/aptos-labs/aptos-core/pull/1413/files to make them consistent
f21f3c7
to
6e514e6
Compare
/land |
6e514e6
to
67bffe5
Compare
❗ Land has been canceled due to this PR being updated with new commits. Please issue another Land command if you want to requeue this PR. |
/land |
Forge run: https://github.com/aptos-labs/aptos-core/actions/runs/2519290370 |
67bffe5
to
ed6c6d1
Compare
When will Node operator documentation be updated to reflect the added new field? |
Description
Test Plan
Genesis e2e tool test