exp: disable some gossip conditions
This commit is contained in:
parent
0e02eb4ce7
commit
a8e2c3e9a2
|
@ -538,13 +538,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")
|
||||||
debugEcho "check 6"
|
debugEcho "check 6"
|
||||||
# [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
|
||||||
|
@ -553,23 +553,23 @@ 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 data column"
|
# warn "cannot compute proposer for data column"
|
||||||
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")
|
||||||
debugEcho "check 7"
|
debugEcho "check 7"
|
||||||
# [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")
|
||||||
debugEcho "check 8"
|
debugEcho "check 8"
|
||||||
# [REJECT] The sidecar's `kzg_commitments` inclusion proof is valid as verified by
|
# [REJECT] The sidecar's `kzg_commitments` inclusion proof is valid as verified by
|
||||||
# `verify_data_column_sidecar_inclusion_proof(sidecar)`.
|
# `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
|
# # [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'")
|
||||||
debugEcho "check 9"
|
debugEcho "check 9"
|
||||||
# [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")
|
||||||
debugEcho "check 10"
|
debugEcho "check 10"
|
||||||
ok()
|
ok()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue