Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update neard localnet command to support archival and rpc nodes…
… in post-stateless-validation (#11797) (This change is to test archival nodes in a localnet for any archival node improvements.) The `neard localnet` command does not have flexibility to configure archival and RPC nodes separately from the other validator and non-validator nodes. For example today `--archival-nodes` is a boolean flag and makes all nodes archival nodes. Similarly `--tracked-shards` specify the shards tracked by all the nodes. Thus, there is no way to have some validator nodes tracking no shards (single-shard tracking) and separate archival/RPC nodes tracking all shards. Especially after stateless validation gets effective, validators will start tracking single/some shards, while we can archival and RPC nodes to track all shards. To support this for localnet setup, we add flags to the `neard localnet` command to create non-validator nodes configured as archival and RPC nodes. These nodes track all shards even if the validators run with single-shard tracking enabled. This allows to run a `neard localnet` command, for example, to have 4 validator nodes to track single-shard, 1 archival node to track all shards, and 1 RPC node to track all shards as follows: ``` neard localnet \ --validators 4 \ # node0..node3 will be validator nodes. --non-validators-archival 1 \ # node4 will be archival non-validator node. --non-validators-rpc 1 \ # node5 will be RPC non-validator node. --non-validators 2 \ # node6..node7 will non-validators that can be custom-configured . --shards 4 \ --tracked-shards "none" ``` Other changes: - Remove `--archive` flag, since it is not used in rest of the code and instead the new flag should be used. - Remove the function param `local_port` since it is always true. - Rename functions from `create_testnet_config...` to `create_localnet_config...`. - NEXT: We will update the appropriate code (eg. nayduck tests) in follow-up PRs to use the new flags `--non-validators-archival` and --non-validators-rpc` instead of setting up a regular non-validator node and updating its config separately. --------- Co-authored-by: Aleksandr Logunov <[email protected]> Co-authored-by: Razvan Barbascu <[email protected]> Co-authored-by: Marcelo Diop-Gonzalez <[email protected]> Co-authored-by: Viktar Makouski <[email protected]> Co-authored-by: Viktar Makouski <[email protected]> Co-authored-by: caseylove <[email protected]> Co-authored-by: Andrea <[email protected]> Co-authored-by: Waclaw Banasik <[email protected]> Co-authored-by: Andrei Kashin <[email protected]> Co-authored-by: Adam Chudaś <[email protected]> Co-authored-by: Bowen Wang <[email protected]>
- Loading branch information