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")
if blobQuarantine[].hasBlob(
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
# `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
# `block_header.parent_root`) passes validation.
let parent = dag.getBlockRef(block_header.parent_root).valueOr:
if block_header.parent_root in quarantine[].unviable:
quarantine[].addUnviable(block_root)
return dag.checkedReject("DataColumnSidecar: parent not validated")
# else:
# quarantine[].addMissing(block_header.parent_root)
# return errIgnore("DataColumnSidecar: parent not found")
# let parent = dag.getBlockRef(block_header.parent_root).valueOr:
# if block_header.parent_root in quarantine[].unviable:
# quarantine[].addUnviable(block_root)
# return dag.checkedReject("DataColumnSidecar: parent not validated")
# else:
# quarantine[].addMissing(block_header.parent_root)
# return errIgnore("DataColumnSidecar: parent not found")
# [REJECT] The sidecar is proposed by the expected `proposer_index`
# 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
# for the block's branch are calculated -- in such a case do not
# REJECT, instead IGNORE this message.
let proposer = getProposer(dag, parent, block_header.slot).valueOr:
warn "cannot compute proposer for blob"
return errIgnore("DataColumnSidecar: Cannot compute proposer") # internal issue
# let proposer = getProposer(dag, parent, block_header.slot).valueOr:
# warn "cannot compute proposer for blob"
# return errIgnore("DataColumnSidecar: Cannot compute proposer") # internal issue
if uint64(proposer) != block_header.proposer_index:
return dag.checkedReject("DataColumnSidecar: Unexpected proposer")
# if uint64(proposer) != block_header.proposer_index:
# return dag.checkedReject("DataColumnSidecar: Unexpected proposer")
# [REJECT] The proposer signature of `blob_sidecar.signed_block_header`,
# is valid with respect to the `block_header.proposer_index` pubkey.
if not verify_block_signature(
dag.forkAtEpoch(block_header.slot.epoch),
getStateField(dag.headState, genesis_validators_root),
block_header.slot,
block_root,
dag.validatorKey(proposer).get(),
data_column_sidecar.signed_block_header.signature):
return dag.checkedReject("DataColumnSidecar: Invalid proposer signature")
# if not verify_block_signature(
# dag.forkAtEpoch(block_header.slot.epoch),
# getStateField(dag.headState, genesis_validators_root),
# block_header.slot,
# block_root,
# dag.validatorKey(proposer).get(),
# data_column_sidecar.signed_block_header.signature):
# return dag.checkedReject("DataColumnSidecar: Invalid proposer signature")
# [REJECT] The sidecar is from a higher slot than the sidecar's
# block's parent (defined by `block_header.parent_root`).
if not (block_header.slot > parent.bid.slot):
return dag.checkedReject("DataColumnSidecar: slot lower than parents'")
# # [REJECT] The sidecar is from a higher slot than the sidecar's
# # block's parent (defined by `block_header.parent_root`).
# if not (block_header.slot > parent.bid.slot):
# return dag.checkedReject("DataColumnSidecar: slot lower than parents'")
# [REJECT] The current finalized_checkpoint is an ancestor of the sidecar's
# block -- i.e. `get_checkpoint_block(store, block_header.parent_root,
# store.finalized_checkpoint.epoch) == store.finalized_checkpoint.root`.
let
finalized_checkpoint = getStateField(dag.headState, finalized_checkpoint)
ancestor = get_ancestor(parent, finalized_checkpoint.epoch.start_slot)
# let
# finalized_checkpoint = getStateField(dag.headState, finalized_checkpoint)
# ancestor = get_ancestor(parent, finalized_checkpoint.epoch.start_slot)
if ancestor.isNil:
# 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)
return errIgnore("DataColumnSidecar: Can't find ancestor")
# if ancestor.isNil:
# # 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)
# return errIgnore("DataColumnSidecar: Can't find ancestor")
if not (
finalized_checkpoint.root == ancestor.root or
finalized_checkpoint.root.isZero):
quarantine[].addUnviable(block_root)
return dag.checkedReject(
"DataColumnSidecar: Finalized checkpoint not an ancestor")
# if not (
# finalized_checkpoint.root == ancestor.root or
# finalized_checkpoint.root.isZero):
# quarantine[].addUnviable(block_root)
# return dag.checkedReject(
# "DataColumnSidecar: Finalized checkpoint not an ancestor")
ok()