avoid marking blocks as unviable if `blobless` quarantine is full (#5858)

Full caches should not be used to mark blocks as unviable. The unviable
status is quite persistent and a block marked as such won't be processed
again once the cache empties. Problem originally introduced in #4808.
This commit is contained in:
Etan Kissling 2024-02-07 14:38:20 +01:00 committed by GitHub
parent 47704bde14
commit b7026a683a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 12 deletions

View File

@ -303,7 +303,7 @@ proc addBlobless*(
quarantine.cleanupBlobless(finalizedSlot) quarantine.cleanupBlobless(finalizedSlot)
if quarantine.blobless.lenu64 >= MaxBlobless: if quarantine.blobless.lenu64 >= MaxBlobless:
return false return true
debug "block quarantine: Adding blobless", blck = shortLog(signedBlock) debug "block quarantine: Adding blobless", blck = shortLog(signedBlock)
quarantine.blobless[signedBlock.root] = signedBlock quarantine.blobless[signedBlock.root] = signedBlock

View File

@ -742,11 +742,8 @@ proc storeBlock(
forkyBlck.root, forkyBlck) forkyBlck.root, forkyBlck)
self[].enqueueBlock(MsgSource.gossip, quarantined, Opt.some(blobs)) self[].enqueueBlock(MsgSource.gossip, quarantined, Opt.some(blobs))
else: else:
if not self.consensusManager.quarantine[].addBlobless( discard self.consensusManager.quarantine[].addBlobless(
dag.finalizedHead.slot, forkyBlck): dag.finalizedHead.slot, forkyBlck)
notice "Block quarantine full (blobless)",
blockRoot = shortLog(quarantined.root),
signature = shortLog(quarantined.signature)
ok blck.value() ok blck.value()

View File

@ -246,12 +246,8 @@ proc processSignedBeaconBlock*(
if self.blobQuarantine[].hasBlobs(signedBlock): if self.blobQuarantine[].hasBlobs(signedBlock):
Opt.some(self.blobQuarantine[].popBlobs(signedBlock.root, signedBlock)) Opt.some(self.blobQuarantine[].popBlobs(signedBlock.root, signedBlock))
else: else:
if not self.quarantine[].addBlobless(self.dag.finalizedHead.slot, discard self.quarantine[].addBlobless(self.dag.finalizedHead.slot,
signedBlock): signedBlock)
notice "Block quarantine full (blobless)",
blockRoot = shortLog(signedBlock.root),
blck = shortLog(signedBlock.message),
signature = shortLog(signedBlock.signature)
return v return v
else: else:
Opt.none(BlobSidecars) Opt.none(BlobSidecars)