Skip to content

Ignore non-validators when receiving quorum rounds - #456

Open
yacovm wants to merge 2 commits into
mainfrom
nonvalidatorQRFromNV
Open

Ignore non-validators when receiving quorum rounds#456
yacovm wants to merge 2 commits into
mainfrom
nonvalidatorQRFromNV

Conversation

@yacovm

@yacovm yacovm commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

This commit makes non-validators ignore quorum rounds sent from non-validators.

Comment thread nonvalidator/non_validator.go Outdated
return nil
}

validators := n.highestEpochCollector.latestValidatorSetRetriever.Validators()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we'd rather have this check inside epochDigestCounter.

func (e *epochDigestCounter) collectedSealingBlockInfo(sealingBlockInfo *common.SealingBlockInfo, bh common.BlockHeader, from common.NodeID) bool {

What's the issue with a non-validator sending us a valid quorum round?

@yacovm yacovm Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why would the non-validator do this? We only replicate from validators both in snowman and simplex.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, but i feel like this is a weird place to do this. Why not put it at the top level of handleReplicationResponse or even do something like we did with handleMessage in epoch.go where we blocked/allowed certain messages from non-validators.

Also, if we receive 100 quorum rounds we will run validators.Contains on all 100 of them which is unnecessary since from never changes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not put it at the top level of handleReplicationResponse or even do something like we did with handleMessage in epoch.go where we blocked/allowed certain messages from non-validators.

Moved it to handleReplicationResponse.

Also, if we receive 100 quorum rounds we will run validators.Contains on all 100 of them which is unnecessary since from never changes.

Yeah, agreed.

@yacovm
yacovm force-pushed the nonvalidatorQRFromNV branch from 23c922b to b97f2af Compare July 28, 2026 14:53
This commit makes non-validators ignore quorum rounds sent from non-validators.

Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
@yacovm
yacovm force-pushed the nonvalidatorQRFromNV branch from 4f48874 to 29f49f3 Compare July 29, 2026 13:58
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.

2 participants