Extra checks epoch change proposed#7856
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
| } | ||
|
|
||
| shouldProposeEpochChange := mp.epochStartTrigger.ShouldProposeEpochChange(headerHandler.GetRound(), headerHandler.GetNonce()) | ||
| if header.IsEpochChangeProposed() != shouldProposeEpochChange { |
There was a problem hiding this comment.
how about the case when header is not epoch change proposed, but it is in the change trigger window?
There was a problem hiding this comment.
especially in the window between proposed and executed epoch start header
There was a problem hiding this comment.
changed the condition to match the trigger state for metachain blocks.
for shard blocks, epoch correctness is already validated through checkEpochCorrectnessCrossChain.
There was a problem hiding this comment.
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
Reasoning behind the pull request
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
featbranch created?featbranch merging, do all satellite projects have a proper tag insidego.mod?