diff --git a/beacon_chain/gossip_processing/gossip_validation.nim b/beacon_chain/gossip_processing/gossip_validation.nim index 861b93b88..499beb7a3 100644 --- a/beacon_chain/gossip_processing/gossip_validation.nim +++ b/beacon_chain/gossip_processing/gossip_validation.nim @@ -500,11 +500,15 @@ proc validateDataColumnSidecar*( if not (data_column_sidecar.index < NUMBER_OF_COLUMNS): return dag.checkedReject("DataColumnSidecar: The sidecar's index should be consistent with NUMBER_OF_COLUMNS") + debugEcho "1" + # [REJECT] The sidecar is for the correct subnet # -- i.e. `compute_subnet_for_data_column_sidecar(blob_sidecar.index) == subnet_id`. if not (compute_subnet_for_data_column_sidecar(data_column_sidecar.index) == subnet_id): return dag.checkedReject("DataColumnSidecar: The sidecar is not for the correct subnet") + debugEcho "2" + # [IGNORE] The sidecar is not from a future slot (with a `MAXIMUM_GOSSIP_CLOCK_DISPARITY` allowance) # -- i.e. validate that `block_header.slot <= current_slot` (a client MAY queue future sidecars for # processing at the appropriate slot). @@ -528,6 +532,8 @@ proc validateDataColumnSidecar*( block_header.slot, block_header.proposer_index, data_column_sidecar.index): return errIgnore("DataColumnSidecar: already have valid data column from same proposer") + debugEcho "3" + # [REJECT] The sidecar's `kzg_commitments` inclusion proof is valid as verified by # `verify_data_column_sidecar_inclusion_proof(sidecar)`. block: @@ -535,6 +541,8 @@ proc validateDataColumnSidecar*( if v.isErr: return dag.checkedReject(v.error) + debugEcho "4" + # [IGNORE] The sidecar's block's parent (defined by # `block_header.parent_root`) has been seen (via both gossip and # non-gossip sources) (a client MAY queue sidecars for processing @@ -605,11 +613,11 @@ proc validateDataColumnSidecar*( let r = check_data_column_sidecar_kzg_proofs(data_column_sidecar) if r.isErr: return dag.checkedReject(r.error) - + debugEcho "5" # Send notification about new data column sidecar via callback if not(isNil(dataColumnQuarantine.onDataColumnSidecarCallback)): dataColumnQuarantine.onDataColumnSidecarCallback(data_column_sidecar) - + debugEcho "6" ok()