don't prematurely process blocks waiting for blobs; fix cosmetic head block opt/non-opt logging (#5363)

This commit is contained in:
tersec 2023-08-27 07:45:24 +00:00 committed by GitHub
parent 060e89a07d
commit 29dbab916c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -70,7 +70,7 @@ func removeBlobs*(quarantine: var BlobQuarantine, digest: Eth2Digest) =
func hasBlobs*(quarantine: BlobQuarantine, blck: deneb.SignedBeaconBlock):
bool =
let idxs = quarantine.blobIndices(blck.root)
if len(blck.message.body.blob_kzg_commitments) < len(idxs):
if len(blck.message.body.blob_kzg_commitments) != len(idxs):
return false
for i in 0..<len(idxs):
if idxs[i] != uint64(i):

View File

@ -2426,7 +2426,7 @@ proc updateHead*(
justified = shortLog(getStateField(
dag.headState, current_justified_checkpoint)),
finalized = shortLog(getStateField(dag.headState, finalized_checkpoint)),
isOptHead = newHead.executionValid
isOptHead = not newHead.executionValid
if not(isNil(dag.onHeadChanged)):
let

View File

@ -301,8 +301,7 @@ template validateBeaconBlockBellatrix(
# cannot occur here, because Nimbus's optimistic sync waits for either
# `ACCEPTED` or `SYNCING` from the EL to get this far.
# https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/deneb/p2p-interface.md#blob_sidecar_index
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.1/specs/deneb/p2p-interface.md#blob_sidecar_subnet_id
proc validateBlobSidecar*(
dag: ChainDAGRef, quarantine: ref Quarantine,
blobQuarantine: ref BlobQuarantine,sbs: SignedBlobSidecar,