Skip to content

Extra checks epoch change proposed#7856

Merged
miiu96 merged 2 commits into
feat/testnet-fixesfrom
extra-checks-epoch-change-proposed
Jun 3, 2026
Merged

Extra checks epoch change proposed#7856
miiu96 merged 2 commits into
feat/testnet-fixesfrom
extra-checks-epoch-change-proposed

Conversation

@miiu96

@miiu96 miiu96 commented May 25, 2026

Copy link
Copy Markdown
Contributor

Reasoning behind the pull request

  • Added extra checks for epoch change proposed

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?

@miiu96 miiu96 self-assigned this May 25, 2026
@codecov

codecov Bot commented May 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.54%. Comparing base (5adab78) to head (92b69ab).

Additional details and impacted files
@@                  Coverage Diff                   @@
##           feat/testnet-fixes    #7856      +/-   ##
======================================================
+ Coverage               77.53%   77.54%   +0.01%     
======================================================
  Files                     883      883              
  Lines                  124506   124516      +10     
======================================================
+ Hits                    96536    96560      +24     
+ Misses                  21558    21544      -14     
  Partials                 6412     6412              

☔ 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.

Comment thread process/block/metablockProposal.go Outdated
}

shouldProposeEpochChange := mp.epochStartTrigger.ShouldProposeEpochChange(headerHandler.GetRound(), headerHandler.GetNonce())
if header.IsEpochChangeProposed() != shouldProposeEpochChange {

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.

how about the case when header is not epoch change proposed, but it is in the change trigger window?

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.

especially in the window between proposed and executed epoch start header

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.

changed the condition to match the trigger state for metachain blocks.
for shard blocks, epoch correctness is already validated through checkEpochCorrectnessCrossChain.

@ssd04 ssd04 May 27, 2026

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.

still not sure if it's fine; we have offset 2 for supernova, so trigger will return as true for at least 2 rounds (plus the time for the proposal to be executed) so if first block has EpochChangeProposed, the next block will not have it, it would fail on the check, because trigger will still return true

@miiu96 miiu96 merged commit a47e6fa into feat/testnet-fixes Jun 3, 2026
11 checks passed
@miiu96 miiu96 deleted the extra-checks-epoch-change-proposed branch June 3, 2026 07:23
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.

4 participants