diff --git a/beacon_chain/spec/eip7594_helpers.nim b/beacon_chain/spec/eip7594_helpers.nim index 39646febb..7139c3ca9 100644 --- a/beacon_chain/spec/eip7594_helpers.nim +++ b/beacon_chain/spec/eip7594_helpers.nim @@ -387,6 +387,9 @@ proc verify_data_column_sidecar_kzg_proofs*(sidecar: DataColumnSidecar): ## Verify if the KZG Proofs consisting in the `DataColumnSidecar` ## is valid or not. + if not (sidecar.kzg_commitments.len == 0): + return err("Kzg commitments length cannot be 0") + # Check if the data column sidecar index < NUMBER_OF_COLUMNS if not (sidecar.index < NUMBER_OF_COLUMNS): return err("Data column sidecar index exceeds the NUMBER_OF_COLUMNS") diff --git a/beacon_chain/sync/request_manager.nim b/beacon_chain/sync/request_manager.nim index 6882d0bbd..a1691087f 100644 --- a/beacon_chain/sync/request_manager.nim +++ b/beacon_chain/sync/request_manager.nim @@ -153,6 +153,8 @@ proc checkResponse(colIdList: seq[DataColumnIdentifier], break if not found: return false + column[].verify_data_column_sidecar_kzg_proofs()isOkOr: + return false column[].verify_data_column_sidecar_inclusion_proof().isOkOr: return false true