-
Notifications
You must be signed in to change notification settings - Fork 4
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
Bake stake into genesis #68
base: main
Are you sure you want to change the base?
Conversation
src/main.rs
Outdated
.help("Do not bake validator stake accounts into genesis. \ | ||
Validators will be funded and staked after the cluster boots. \ | ||
This will result in several epochs for all of the stake to warm up"), |
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.
Huh. I was going to suggest that in the future (not in this PR), we could have rustfmt format these long help strings by adding format_strings = true
to the rustfmt.toml and running cargo +nightly fmt
. But it is not touching these strings when I run it locally, for some reason...
Either way, fyi that rustfmt is not styling this long command/arg list as a result of those strings.
src/genesis.rs
Outdated
@@ -378,6 +358,21 @@ impl Genesis { | |||
args.push(path); | |||
} | |||
|
|||
if !self.flags.skip_primordial_stakes { | |||
for i in 0..num_validators { | |||
args.push("--bootstrap-validator".to_string()); |
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.
This doesn't work quite right. By marking these as bootstrap validators, they use the GenesisFlags::bootstrap_validator_sol
and GenesisFlags::bootstrap_validator_stake_sol
values, instead of GenesisFlags::internal_node_sol
and GenesisFlags::internal_node_stake_sol
.
Unless we want to update the solana-genesis
crate/bin (which isn't totally out of the question, but is a bit of a hassle), I think we'll have to populate an accounts file and use the --primordial-accounts-file
flag.
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.
oh shoot ok ya let's do --primordial-accounts-file
flag
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.
hey been struggling with this a little. I am having a hard time getting the --primordial-accounts-file
flag setup properly to work with vote and stake accounts. do you know how to setup these stake/vote accounts in the primordial-accounts-file
and then get them recognized at the start of the cluster?
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.
i could see how we could modify solana-genesis
as you mentioned to get this to work. but definitely a little more of a hassle. Although just can't quite figure out how to properly add stake and vote accounts to a primordial accounts file. it doesn't appear net/
scripts support that either. but could be missing it
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.
I'll take a look later today!
4bde184
to
b4d4fc8
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.
I'm going to hold off reviewing this until anza-xyz/agave#2704 is finished and merged. It's helpful to see what the interface looks like from this side, though.
336d715
to
28e51d7
Compare
Current deployment forces user to wait for stakes to warmup for multiple epochs. This lets the user bake the validator stakes into genesis so the cluster has stakes fully warmed up upon deployment.
Baking stakes into genesis is set as the default. If you want the original method that requires stake warmup, pass in
--skip-primordial-stakes
Requires Agave PR anza-xyz/agave#2704 to be merged before this one