Skip to content

feat: add follower node test support#5

Open
andy-thomason wants to merge 6 commits intomainfrom
feat/test-followers
Open

feat: add follower node test support#5
andy-thomason wants to merge 6 commits intomainfrom
feat/test-followers

Conversation

@andy-thomason
Copy link
Collaborator

Summary

Adds support for running non-validator follower nodes in the RBFT testnet.

Changes

--validator-key is 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 runs upon_new_block and never proposes, prepares, commits, or triggers round changes.

RBFT_ADD_FOLLOWER_AT env var / --add-followers-at CLI 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 at num_nodes). The node is not added to the on-chain contract.

make testnet_follower_test target

Generates 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

make testnet_follower_test

Output confirms:

  • Genesis: 4 initial validators
  • Block 5: follower node 4 spawned (role=x in QBFT logs)
  • Block 15: follower node 5 spawned
  • All 6 nodes reach block 32: [32, 32, 32, 32, 32, 32]

@andy-thomason andy-thomason changed the title feat: add follower node support feat: add follower node test support Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant