Skip to content

Commit

Permalink
Merge pull request #6778 from multiversx/fix_missing_nodes_config_for…
Browse files Browse the repository at this point in the history
…_epoch

reverted a previous commit leading to improper epoch usage for header verification
  • Loading branch information
AdoAdoAdo authored Feb 6, 2025
2 parents fcbe82a + afee01a commit 996d495
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions process/block/interceptedBlocks/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,8 @@ func checkMetaShardInfo(
}

isSelfMeta := coordinator.SelfId() == core.MetachainShardId
isHeaderFromMeta := sd.GetShardID() == core.MetachainShardId
isHeaderFromSelf := sd.GetShardID() == coordinator.SelfId()
if !(isSelfMeta || isHeaderFromMeta || isHeaderFromSelf) {
if !(isSelfMeta || isHeaderFromSelf) {
continue
}

Expand Down
6 changes: 5 additions & 1 deletion process/headerCheck/headerSignatureVerify.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,12 @@ func (hsv *HeaderSigVerifier) getConsensusSignersForEquivalentProofs(proof data.
return nil, process.ErrUnexpectedHeaderProof
}

// safe to use proof.GetHeaderEpoch, as the transition block will be treated separately
// TODO: remove if start of epochForConsensus block needs to be validated by the new epochForConsensus nodes
epochForConsensus := proof.GetHeaderEpoch()
if proof.GetIsStartOfEpoch() && epochForConsensus > 0 {
epochForConsensus = epochForConsensus - 1
}

consensusPubKeys, err := hsv.nodesCoordinator.GetAllEligibleValidatorsPublicKeysForShard(
epochForConsensus,
proof.GetHeaderShardId(),
Expand Down

0 comments on commit 996d495

Please sign in to comment.