Skip to content

Test reject proofs without header round boundaries on interceptor - #7811

Closed
sstanculeanu wants to merge 39 commits into
rc/supernovafrom
test-reject-proofs-without-header-round-boundaries-on-interceptor
Closed

Test reject proofs without header round boundaries on interceptor#7811
sstanculeanu wants to merge 39 commits into
rc/supernovafrom
test-reject-proofs-without-header-round-boundaries-on-interceptor

Conversation

@sstanculeanu

Copy link
Copy Markdown
Collaborator

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?

@codecov

codecov Bot commented Mar 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.46154% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.56%. Comparing base (7caded5) to head (cbf7930).

Files with missing lines Patch % Lines
...ck/interceptedBlocks/interceptedEquivalentProof.go 69.23% 7 Missing and 1 partial ⚠️
dataRetriever/requestHandlers/requestHandler.go 92.30% 2 Missing and 1 partial ⚠️
...de/chainSimulator/components/manualRoundHandler.go 0.00% 2 Missing ⚠️
node/chainSimulator/configs/configs.go 0.00% 1 Missing ⚠️
...rceptors/factory/interceptedTrieNodeDataFactory.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           feat/supernova-async-exec    #7811   +/-   ##
==========================================================
  Coverage                      77.56%   77.56%           
==========================================================
  Files                            882      882           
  Lines                         123719   123784   +65     
==========================================================
+ Hits                           95958    96013   +55     
- Misses                         21402    21413   +11     
+ Partials                        6359     6358    -1     

☔ View full report in Codecov by Sentry.
📢 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.

sstanculeanu and others added 16 commits March 31, 2026 11:36
…multiversx/mx-chain-go into test-reject-proofs-without-header-round-boundaries-on-interceptor

# Conflicts:
#	process/block/interceptedBlocks/interceptedEquivalentProof_test.go
…tiversx/mx-chain-go into test-reject-proofs-without-header-round-boundaries-on-interceptor
…multiversx/mx-chain-go into test-reject-proofs-without-header-round-boundaries-on-interceptor
…multiversx/mx-chain-go into test-reject-proofs-without-header-round-boundaries-on-interceptor
…multiversx/mx-chain-go into test-reject-proofs-without-header-round-boundaries-on-interceptor
…multiversx/mx-chain-go into test-reject-proofs-without-header-round-boundaries-on-interceptor
Base automatically changed from feat/supernova-async-exec to rc/supernova April 6, 2026 07:58
sstanculeanu and others added 7 commits April 6, 2026 11:46
…multiversx/mx-chain-go into test-reject-proofs-without-header-round-boundaries-on-interceptor
…tiversx/mx-chain-go into test-reject-proofs-without-header-round-boundaries-on-interceptor

# Conflicts:
#	process/block/interceptedBlocks/argInterceptedBlockHeader.go
#	process/block/interceptedBlocks/interceptedBlockHeader.go
#	process/block/interceptedBlocks/interceptedBlockHeader_test.go
#	process/block/interceptedBlocks/interceptedMetaBlockHeader.go
#	process/block/interceptedBlocks/interceptedMetaBlockHeader_test.go
#	process/interceptors/factory/interceptedMetaHeaderDataFactory.go
#	process/interceptors/factory/interceptedShardHeaderDataFactory.go
…tiversx/mx-chain-go into test-reject-proofs-without-header-round-boundaries-on-interceptor
if !check.IfNil(header) &&
header.GetRound() != iep.proof.GetHeaderRound() &&
header.GetNonce() != iep.proof.GetHeaderNonce() &&
header.GetEpoch() != iep.proof.GetHeaderEpoch() {

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.

Shouldn't all this check be

  if header.GetRound() != iep.proof.GetHeaderRound() ||
     header.GetNonce() != iep.proof.GetHeaderNonce() ||
     header.GetEpoch() != iep.proof.GetHeaderEpoch() {
      return ErrInvalidProof
  }

It an attacker uses a correct round/nonce or epoch will by pass this entire check completly, no ?

@danidrasovean
danidrasovean deleted the test-reject-proofs-without-header-round-boundaries-on-interceptor branch June 17, 2026 08:03
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