disable more

This commit is contained in:
Agnish Ghosh 2024-06-02 10:52:13 +05:30
parent caf5557d8b
commit c35b5f1b4b
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
1 changed files with 38 additions and 38 deletions

View File

@ -536,7 +536,7 @@ proc validateDataColumnSidecar*(
return errIgnore("DataColumnSidecar: already have block") return errIgnore("DataColumnSidecar: already have block")
if blobQuarantine[].hasBlob( if blobQuarantine[].hasBlob(
block_header.slot, block_header.proposer_index, data_column_sidecar.index): block_header.slot, block_header.proposer_index, data_column_sidecar.index):
return errIgnore("DataColumnSidecar: already have valid blob from same proposer") return errIgnore("DataColumnSidecar: already have valid data column from same proposer")
# [IGNORE] The sidecar's block's parent (defined by # [IGNORE] The sidecar's block's parent (defined by
# `block_header.parent_root`) has been seen (via both gossip and # `block_header.parent_root`) has been seen (via both gossip and
@ -545,13 +545,13 @@ proc validateDataColumnSidecar*(
# #
# [REJECT] The sidecar's block's parent (defined by # [REJECT] The sidecar's block's parent (defined by
# `block_header.parent_root`) passes validation. # `block_header.parent_root`) passes validation.
let parent = dag.getBlockRef(block_header.parent_root).valueOr: # let parent = dag.getBlockRef(block_header.parent_root).valueOr:
if block_header.parent_root in quarantine[].unviable: # if block_header.parent_root in quarantine[].unviable:
quarantine[].addUnviable(block_root) # quarantine[].addUnviable(block_root)
return dag.checkedReject("DataColumnSidecar: parent not validated") # return dag.checkedReject("DataColumnSidecar: parent not validated")
# else: # else:
# quarantine[].addMissing(block_header.parent_root) # quarantine[].addMissing(block_header.parent_root)
# return errIgnore("DataColumnSidecar: parent not found") # return errIgnore("DataColumnSidecar: parent not found")
# [REJECT] The sidecar is proposed by the expected `proposer_index` # [REJECT] The sidecar is proposed by the expected `proposer_index`
# for the block's slot in the context of the current shuffling # for the block's slot in the context of the current shuffling
@ -560,47 +560,47 @@ proc validateDataColumnSidecar*(
# shuffling, the sidecar MAY be queued for later processing while proposers # shuffling, the sidecar MAY be queued for later processing while proposers
# for the block's branch are calculated -- in such a case do not # for the block's branch are calculated -- in such a case do not
# REJECT, instead IGNORE this message. # REJECT, instead IGNORE this message.
let proposer = getProposer(dag, parent, block_header.slot).valueOr: # let proposer = getProposer(dag, parent, block_header.slot).valueOr:
warn "cannot compute proposer for blob" # warn "cannot compute proposer for blob"
return errIgnore("DataColumnSidecar: Cannot compute proposer") # internal issue # return errIgnore("DataColumnSidecar: Cannot compute proposer") # internal issue
if uint64(proposer) != block_header.proposer_index: # if uint64(proposer) != block_header.proposer_index:
return dag.checkedReject("DataColumnSidecar: Unexpected proposer") # return dag.checkedReject("DataColumnSidecar: Unexpected proposer")
# [REJECT] The proposer signature of `blob_sidecar.signed_block_header`, # [REJECT] The proposer signature of `blob_sidecar.signed_block_header`,
# is valid with respect to the `block_header.proposer_index` pubkey. # is valid with respect to the `block_header.proposer_index` pubkey.
if not verify_block_signature( # if not verify_block_signature(
dag.forkAtEpoch(block_header.slot.epoch), # dag.forkAtEpoch(block_header.slot.epoch),
getStateField(dag.headState, genesis_validators_root), # getStateField(dag.headState, genesis_validators_root),
block_header.slot, # block_header.slot,
block_root, # block_root,
dag.validatorKey(proposer).get(), # dag.validatorKey(proposer).get(),
data_column_sidecar.signed_block_header.signature): # data_column_sidecar.signed_block_header.signature):
return dag.checkedReject("DataColumnSidecar: Invalid proposer signature") # return dag.checkedReject("DataColumnSidecar: Invalid proposer signature")
# [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 `block_header.parent_root`). # # block's parent (defined by `block_header.parent_root`).
if not (block_header.slot > parent.bid.slot): # if not (block_header.slot > parent.bid.slot):
return dag.checkedReject("DataColumnSidecar: slot lower than parents'") # return dag.checkedReject("DataColumnSidecar: slot lower than parents'")
# [REJECT] The current finalized_checkpoint is an ancestor of the sidecar's # [REJECT] The current finalized_checkpoint is an ancestor of the sidecar's
# block -- i.e. `get_checkpoint_block(store, block_header.parent_root, # block -- i.e. `get_checkpoint_block(store, block_header.parent_root,
# store.finalized_checkpoint.epoch) == store.finalized_checkpoint.root`. # store.finalized_checkpoint.epoch) == store.finalized_checkpoint.root`.
let # let
finalized_checkpoint = getStateField(dag.headState, finalized_checkpoint) # finalized_checkpoint = getStateField(dag.headState, finalized_checkpoint)
ancestor = get_ancestor(parent, finalized_checkpoint.epoch.start_slot) # ancestor = get_ancestor(parent, finalized_checkpoint.epoch.start_slot)
if ancestor.isNil: # if ancestor.isNil:
# This shouldn't happen: we should always be able to trace the parent back # # This shouldn't happen: we should always be able to trace the parent back
# to the finalized checkpoint (else it wouldn't be in the DAG) # # to the finalized checkpoint (else it wouldn't be in the DAG)
return errIgnore("DataColumnSidecar: Can't find ancestor") # return errIgnore("DataColumnSidecar: Can't find ancestor")
if not ( # if not (
finalized_checkpoint.root == ancestor.root or # finalized_checkpoint.root == ancestor.root or
finalized_checkpoint.root.isZero): # finalized_checkpoint.root.isZero):
quarantine[].addUnviable(block_root) # quarantine[].addUnviable(block_root)
return dag.checkedReject( # return dag.checkedReject(
"DataColumnSidecar: Finalized checkpoint not an ancestor") # "DataColumnSidecar: Finalized checkpoint not an ancestor")
ok() ok()