Skip to content

handle invalid signers for supernova#7875

Open
ssd04 wants to merge 5 commits into
feat/testnet-fixesfrom
handle-invalid-signers
Open

handle invalid signers for supernova#7875
ssd04 wants to merge 5 commits into
feat/testnet-fixesfrom
handle-invalid-signers

Conversation

@ssd04

@ssd04 ssd04 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Reasoning behind the pull request

Proposed changes

Testing procedure

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@ssd04 ssd04 self-assigned this Jun 9, 2026
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.53%. Comparing base (6025b67) to head (5220c14).

Additional details and impacted files
@@                  Coverage Diff                   @@
##           feat/testnet-fixes    #7875      +/-   ##
======================================================
- Coverage               77.54%   77.53%   -0.01%     
======================================================
  Files                     883      883              
  Lines                  124525   124545      +20     
======================================================
+ Hits                    96564    96571       +7     
- Misses                  21550    21559       +9     
- Partials                 6411     6415       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

return false
}

if !sr.IsConsensusDataEqual(cnsDta.BlockHeaderHash) {

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 still need at least this check + for prev hash somehow.. less checks = more changes for attacks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

if we accept the message for the next round, the data will be reset and it'll not match
with supernova rounds the invalid signers data will most probably be propagated in the next round/rounds

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

tbd if we want to check in another way if that header hash was handled/processed

sstanculeanu
sstanculeanu previously approved these changes Jun 10, 2026
}

if !sr.CanProcessReceivedMessage(cnsDta, sr.RoundHandler().Index(), sr.Current()) {
if !sr.IsNodeInConsensusGroup(messageSender) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this check works by accident because we have all eligible in consensus every time since andromeda, but for smaller consensus (before andromeda) groups than shard eligible, this will not be correct.

msgTimestampSec := timeStampSec
currTimestampSec := sr.SyncTimer().CurrentTime().Unix()

if msgTimestampSec > currTimestampSec {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe we can allow also a bounded drift (we do have NTP adjustment)

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.

3 participants