Non Validators Happy Path#358
Open
samliok wants to merge 9 commits into
Open
Conversation
samliok
commented
Mar 17, 2026
Signed-off-by: Sam Liokumovich <65994425+samliok@users.noreply.github.com>
yacovm
reviewed
Apr 17, 2026
| } | ||
|
|
||
| // verify the finalization | ||
| if err := finalization.Verify(); err != nil { |
Collaborator
There was a problem hiding this comment.
this just checks the signature. What about checking that the signers constitute a quorum of the validator set?
| type Config struct { | ||
| Logger simplex.Logger | ||
| Storage simplex.FullStorage | ||
| GenesisValidators []simplex.NodeID |
Collaborator
There was a problem hiding this comment.
why genesis? the genesis validators might be long gone
| // sanity check: should never happen. | ||
| if !bytes.Equal(incomplete.finalization.Finalization.Bytes(), finalization.Finalization.Bytes()) { | ||
| n.Logger.Warn( | ||
| "Mismatching finalizations", |
Collaborator
There was a problem hiding this comment.
this should be an error that will halt the chain
|
|
||
| digest := incomplete.block.BlockHeader().Digest | ||
| if !bytes.Equal(bh.Digest[:], digest[:]) { | ||
| // TODO: this means the leader has equivocated and sent us a wrong block while another has been finalized. |
Collaborator
There was a problem hiding this comment.
Just delete the block in such a case. The finalization takes precedence, right?
| return nil | ||
| } | ||
|
|
||
| return n.indexBlock(incomplete.block, finalization) |
Collaborator
There was a problem hiding this comment.
if we index the block, can't we garbage collect from the incompleteSeqs map?
| // triggerVerify wakes up the verifier by attempting to verify the next seq to be verified. | ||
| // We verify `block` if it is the next sequence to be verified, otherwise we try to retrieve the next | ||
| // block to be verified from storage. | ||
| func (v *Verifier) triggerVerify(block simplex.Block) error { |
Collaborator
There was a problem hiding this comment.
We don't really need this asynchronous scheduling. We can just verify() and index right after.
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.
No description provided.