Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for running non-validator follower nodes in the RBFT testnet.
Changes
--validator-keyis now optional (rbft-node)When the flag is omitted, an ephemeral random key is generated at startup. Since the derived address is not in the on-chain
QBFTValidatorSet, the QBFT state machine treats the node as a follower: it only runsupon_new_blockand never proposes, prepares, commits, or triggers round changes.RBFT_ADD_FOLLOWER_ATenv var /--add-followers-atCLI arg (rbft-utils)Comma-separated list of block heights at which to spawn additional non-validator follower nodes. At each configured height, one new node process is launched using the next key slot from
nodes.csv(indices starting atnum_nodes). The node is not added to the on-chain contract.make testnet_follower_testtargetGenerates 6 key slots (4 validators + 2 follower slots), initialises genesis with 4 validators, then starts the testnet with
RBFT_ADD_FOLLOWER_AT=5,15 RBFT_EXIT_AFTER_BLOCK=30. Verified passing: both follower nodes spawn, catch up, and reach the exit block in sync with all validators.Testing
Output confirms:
role=xin QBFT logs)[32, 32, 32, 32, 32, 32]