Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion beacon_chain/gossip_processing/gossip_validation.nim
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,12 @@ proc validateDataColumnSidecar*(
if v.isErr:
return dag.checkedReject(v.error)

# Check if the sidecar respects the blob limit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to link to:

within the code itself in lieu of the usual spec link, which maybe can be replaced with a spec link later.

let epoch = block_header.slot.epoch()
if lenu64(data_column_sidecar.kzg_commitments) >
dag.cfg.get_blob_parameters(epoch).MAX_BLOBS_PER_BLOCK:
return errIgnore("DataColumnSidecar: The sidecar does not respect the blob limit")

# [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):
Expand Down Expand Up @@ -723,7 +729,6 @@ proc validateDataColumnSidecar*(
data_column_sidecar: gloas.DataColumnSidecar,
wallTime: BeaconTime, subnet_id: uint64):
Result[void, ValidationError] =

# [REJECT] The sidecar is valid as verified by verify_data_column_sidecar
block:
let v = verify_data_column_sidecar(data_column_sidecar)
Expand Down
Loading