don't prematurely process blocks waiting for blobs; fix cosmetic head block opt/non-opt logging (#5363)
This commit is contained in:
parent
060e89a07d
commit
29dbab916c
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue