-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(validators): trickle in validators (#1182)
Description --- Allow only a configurable amount of validator nodes to be active in an epoch, if we reach the limit, simply adding new validator nodes to a later epoch. Example: Let say that the max number of vns to be registered in an epoch is `2` and there are `10` new validator nodes are trying to to join at the same time. Validator nodes table on other nodes (epochs are relative): 1. epoch: new node 1, start epoch: 1, end epoch: 101 2. epoch: new node 2, start epoch: 1, end epoch: 101 3. epoch: new node 3, start epoch: 2, end epoch: 102 4. epoch: new node 4, start epoch: 2, end epoch: 102 5. epoch: new node 5, start epoch: 3, end epoch: 103 etc... Motivation and Context --- Validators were registered all at once, so when the registration form base layer has been processed, the new validators are available from the next epoch. The problem is that if there are thousands of thousands of validators joining the same time, it would cause the consensus to stuck for a longer period of time until it gets running again healthy. How Has This Been Tested? --- Current limit for developer networks is `50`, so setting the number of validator nodes to a higher number than `50` is needed. Then starting up a fresh swarm using this new configuration (delete processes dir) and after the first 50 nodes are up an running, open `data/swarm/processes/validator-node-00/localnet/data/validator_node/global_storage.sqlite` local database and check `validator_nodes` table content. It will nicely show that the first 50 nodes are going to the next epoch, then the rest in the one after next one. Then start periodic mining to get to a new epoch and see if everything still runs well with new validator nodes. What process can a PR reviewer use to test or verify this change? --- Breaking Changes --- - [x] None - [x] Requires data directory to be deleted - [ ] Other - Please specify
- Loading branch information
Showing
9 changed files
with
98 additions
and
16 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
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
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
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
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