-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CLI] Make the number of validators configurable for
sui genesis
an…
…d `sui start` (#20511) ## Description This PR enables `sui genesis` and `sui start` to pass the `committee-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` or `genesis` 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. ``` sui start --committee-size 3 --with-graphql ➜ sui_config ls -l total 3104 -rw-r--r-- 1 s staff 5338 Dec 4 21:15 127.0.0.1-51144.yaml -rw-r--r-- 1 s staff 5338 Dec 4 21:15 127.0.0.1-51158.yaml -rw-r--r-- 1 s staff 5338 Dec 4 21:15 127.0.0.1-51172.yaml drwxr-xr-x 5 s staff 160 Dec 4 21:15 authorities_db/ --- ``` ```json { "data": { "epoch": { "validatorSet": { "pendingActiveValidatorsSize": 0, "activeValidators": { "nodes": [ { "address": { "address": "0xf6f511d0d450bfe2cc6cfabcc00024fcef2ede7a63b47eefcf0c086249fb4642" }, "name": "validator-1", "description": "" }, { "address": { "address": "0x478572ac85ffeba294d8cbbb87ae4c2b0c223a224ec34e9b75c45b5c210a9fe5" }, "name": "validator-0", "description": "" }, { "address": { "address": "0x7242e93071987c25454a64ae07f6640008d706647e2b9106ac61ac3d2e2d47af" }, "name": "validator-2", "description": "" } ] }, "totalStake": "0" } } } } ``` ## 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. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [x] CLI: Added the `--committee-size` argument to `sui start` and `sui genesis` to configure the number of validators to start with the local network / when generating a genesis. - [ ] Rust SDK: - [ ] REST API:
- Loading branch information
1 parent
e0885ca
commit 0d64196
Showing
2 changed files
with
85 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters