Skip to content

Commit

Permalink
reversing rman blockVerifier order
Browse files Browse the repository at this point in the history
  • Loading branch information
agnxsh committed Jan 25, 2025
1 parent a790995 commit 6db36ca
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions beacon_chain/nimbus_beacon_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -472,21 +472,8 @@ proc initFullNode(
maybeFinalized: bool):
Future[Result[void, VerifierError]] {.async: (raises: [CancelledError]).} =
withBlck(signedBlock):
when consensusFork >= ConsensusFork.Deneb:
if not blobQuarantine[].hasBlobs(forkyBlck):
# We don't have all the blobs for this block, so we have
# to put it in blobless quarantine.
if not quarantine[].addBlobless(dag.finalizedHead.slot, forkyBlck):
err(VerifierError.UnviableFork)
else:
err(VerifierError.MissingParent)
else:
let blobs = blobQuarantine[].popBlobs(forkyBlck.root, forkyBlck)
await blockProcessor[].addBlock(MsgSource.gossip, signedBlock,
Opt.some(blobs), Opt.none(DataColumnSidecars),
maybeFinalized = maybeFinalized)

elif consensusFork >= ConsensusFork.Fulu:
# Keeping Fulu first else >= Deneb means Fulu case never hits
when consensusFork >= ConsensusFork.Fulu:
if not dataColumnQuarantine[].supernode and
not dataColumnQuarantine[].hasMissingDataColumns(forkyBlck):
if not quarantine[].addColumnless(dag.finalizedHead.slot, forkyBlck):
Expand All @@ -505,6 +492,19 @@ proc initFullNode(
await blockProcessor[].addBlock(MsgSource.gossip, signedBlock,
Opt.none(BlobSidecars), Opt.some(dataColumns),
maybeFinalized = maybeFinalized)
elif consensusFork >= ConsensusFork.Deneb:
if not blobQuarantine[].hasBlobs(forkyBlck):
# We don't have all the blobs for this block, so we have
# to put it in blobless quarantine.
if not quarantine[].addBlobless(dag.finalizedHead.slot, forkyBlck):
err(VerifierError.UnviableFork)
else:
err(VerifierError.MissingParent)
else:
let blobs = blobQuarantine[].popBlobs(forkyBlck.root, forkyBlck)
await blockProcessor[].addBlock(MsgSource.gossip, signedBlock,
Opt.some(blobs), Opt.none(DataColumnSidecars),
maybeFinalized = maybeFinalized)

else:
await blockProcessor[].addBlock(MsgSource.gossip, signedBlock,
Expand Down

0 comments on commit 6db36ca

Please sign in to comment.