-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[CLI] Make the number of validators configurable for sui genesis
and sui start
#20511
[CLI] Make the number of validators configurable for sui genesis
and sui start
#20511
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
0339e13
to
976f23f
Compare
let committee_size = match committee_size { | ||
Some(x) => NonZeroUsize::new(x), | ||
None => NonZeroUsize::new(DEFAULT_NUMBER_OF_AUTHORITIES), | ||
} | ||
.ok_or_else(|| anyhow!("Committee size must be at least 1."))?; |
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.
let committee_size = match committee_size { | |
Some(x) => NonZeroUsize::new(x), | |
None => NonZeroUsize::new(DEFAULT_NUMBER_OF_AUTHORITIES), | |
} | |
.ok_or_else(|| anyhow!("Committee size must be at least 1."))?; | |
let committee_size = match committee_size { | |
Some(x) => { | |
if network_config.is_some() { println!("WARNING...") } | |
NonZeroUsize::new(x), | |
} | |
None => NonZeroUsize::new(DEFAULT_NUMBER_OF_AUTHORITIES), | |
} | |
.ok_or_else(|| anyhow!("Committee size must be at least 1."))?; |
I'm guessing you would see this behavior in the --help
given the ///
comments? but it also might not hurt to just warn/error. It's debatable though.
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.
That's probably a good idea to warn, though I think this needs to be done on start
command rather than genesis.
976f23f
to
458b971
Compare
fwiw this likely isn't going to be sufficient as iirc Consensus won't work with smaller committee sizes. cc @mwtian to confirm this. So we'd need this plus some consensus changes to be able to really support smaller committee sizes with |
The consensus changes to support 1-node committee can be done in parallel. I can give it a shot this week. |
Thanks @mwtian! Happy to also help there if you need me to (though never looked at that code). |
#20530 has landed, so we can land this as well! |
Time to go change a bunch of tests to only use a single validator! |
Description
This PR enables
sui genesis
andsui start
to pass thecommittee-size
argument specifying the number of validators that should be started in the local network.Note that if
sui start --committee-size 3
is executed with no.sui
orgenesis
data, on a subsequent run the--committee-size
arg will be ignored.Test plan
Locally. Checked the number of generated config files for validators + GraphQL query.
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.
--committee-size
argument tosui start
andsui genesis
to configure the number of validators to start with the local network.