From a8e2c3e9a2b6b84d9982f715095c4e4706287a6c Mon Sep 17 00:00:00 2001 From: Agnish Ghosh Date: Tue, 2 Jul 2024 04:45:23 +0530 Subject: [PATCH] exp: disable some gossip conditions --- .../gossip_processing/gossip_validation.nim | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/beacon_chain/gossip_processing/gossip_validation.nim b/beacon_chain/gossip_processing/gossip_validation.nim index 1f1af30fc..81a56ac39 100644 --- a/beacon_chain/gossip_processing/gossip_validation.nim +++ b/beacon_chain/gossip_processing/gossip_validation.nim @@ -538,13 +538,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") debugEcho "check 6" # [REJECT] The sidecar is proposed by the expected `proposer_index` # for the block's slot in the context of the current shuffling @@ -553,23 +553,23 @@ 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 data column" - return errIgnore("DataColumnSidecar: Cannot compute proposer") # internal issue + # let proposer = getProposer(dag, parent, block_header.slot).valueOr: + # warn "cannot compute proposer for data column" + # return errIgnore("DataColumnSidecar: Cannot compute proposer") # internal issue if uint64(proposer) != block_header.proposer_index: return dag.checkedReject("DataColumnSidecar: Unexpected proposer") debugEcho "check 7" # [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") debugEcho "check 8" # [REJECT] The sidecar's `kzg_commitments` inclusion proof is valid as verified by # `verify_data_column_sidecar_inclusion_proof(sidecar)`. @@ -587,27 +587,27 @@ proc validateDataColumnSidecar*( # # [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'") + # if not (block_header.slot > parent.bid.slot): + # return dag.checkedReject("DataColumnSidecar: slot lower than parents'") debugEcho "check 9" # [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") debugEcho "check 10" ok()