Add blob validation condition (#4902)
This commit is contained in:
parent
a23252c297
commit
53436c2b9b
|
@ -302,10 +302,18 @@ proc validateBlobSidecar*(
|
||||||
if not (sbs.message.slot > dag.finalizedHead.slot):
|
if not (sbs.message.slot > dag.finalizedHead.slot):
|
||||||
return errIgnore("SignedBlobSidecar: slot already finalized")
|
return errIgnore("SignedBlobSidecar: slot already finalized")
|
||||||
|
|
||||||
|
# [IGNORE] The block's parent (defined by block.parent_root) has
|
||||||
|
# been seen (via both gossip and non-gossip sources) (a client MAY
|
||||||
|
# queue blocks for processing once the parent block is retrieved).
|
||||||
# [REJECT] The sidecar's block's parent (defined by sidecar.block_parent_root)
|
# [REJECT] The sidecar's block's parent (defined by sidecar.block_parent_root)
|
||||||
# passes validation.
|
# passes validation.
|
||||||
let parent = dag.getBlockRef(sbs.message.block_parent_root).valueOr:
|
let parentRes = dag.getBlockRef(sbs.message.block_parent_root)
|
||||||
return dag.checkedReject("SignedBlobSidecar: parent not validated")
|
if parentRes.isErr:
|
||||||
|
if sbs.message.block_parent_root in quarantine[].unviable:
|
||||||
|
return dag.checkedReject("SignedBlobSidecar: parent not validated")
|
||||||
|
else:
|
||||||
|
return errIgnore("SignedBlobSidecar: parent not found")
|
||||||
|
template parent: untyped = parentRes.get
|
||||||
|
|
||||||
# [REJECT] The sidecar is from a higher slot than the sidecar's
|
# [REJECT] The sidecar is from a higher slot than the sidecar's
|
||||||
# block's parent (defined by sidecar.block_parent_root).
|
# block's parent (defined by sidecar.block_parent_root).
|
||||||
|
|
Loading…
Reference in New Issue