Adding Support For Non-Validators#393
Open
samliok wants to merge 3 commits into
Open
Conversation
samliok
commented
Jun 11, 2026
|
|
||
| switch { | ||
| case msg.BlockDigestRequest != nil: | ||
| // TODO: it seems reasonable for our non-validator to be able to process these messages and send out responses. |
| return nil | ||
| } | ||
|
|
||
| // TODO: add a re-broadcast timeout task until we have validated an epoch. |
| func (n *NonValidator) sendRequest(seq uint64, to simplex.NodeID) { | ||
| digestRequest := simplex.BlockDigestRequest{ | ||
| Seq: seq, | ||
| Digest: simplex.Digest{}, // TODO: In the epoch code, update how we process digests to not drop the request given an empty digest. |
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.
Non-Validator Node
Adds a
nonvalidatorpackage implementing a node that follows a Simplex chain,verifying and indexing finalized blocks, without participating in consensus (it never
votes, proposes, or signs). It tracks the chain by collecting blocks + finalizations from
validators and replicating any sequences it's missing.
NonValidator(non_validator.go)Similarly to the epoch we have a
HandleMessagefunction. However we only listen to these message types:handleBlock) — accepts a block only if it's from the round'sleader, in a known epoch, and within the sequence window. Blocks are buffered in
incompleteSequencesuntil the matching finalization arrives.handleFinalization) — verifies the QC against the epoch's validatorset. Matches against any buffered block; finalizations too far ahead or for unknown
epochs are forwarded to the replicator / trigger a sealing-block request.
handleReplicationResponse) — validates each fetched quorumround, stores it in the replication state, then schedules the next in-order finalized
block for verification and indexing.
Once a block and a verified finalization are held for a sequence, a verification task is
scheduled (
scheduleNewFinalizedBlockTask) through aBlockDependencyManager, whichenforces that sequences are verified/indexed in order.
Epoch validation (
epochs.go,epoch_replicator.go)A non-validator must know each epoch's validator set to verify finalizations. Validator
sets are carried in sealing blocks (new
SealingBlockInfo, see below) which form abackward-linked hash chain across epochs.
epochsmap holds only epochs whose validator set has been validated. Bootstrapped fromstorage in
newEpochs(handles genesis / pre-SimplexEpoch 0).maybeValidateNextEpoch):canValidate— we already trust the next epoch and this block matches itsprevSealingBlockHash(validate backward down the chain), orepochReplicator.collectedQuorumRound— we've collectedF+1matching sealing-blockresponses from distinct nodes for an epoch we can't otherwise verify