From 4e676c7fc9ef2a6295688ee6b43cddccd942299b Mon Sep 17 00:00:00 2001 From: matthewkeil Date: Mon, 21 Oct 2024 23:06:22 +0700 Subject: [PATCH] feat: check for no commitments on block or column in sidecar validation --- packages/beacon-node/src/chain/validation/dataColumnSidecar.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/beacon-node/src/chain/validation/dataColumnSidecar.ts b/packages/beacon-node/src/chain/validation/dataColumnSidecar.ts index 332b1982a5d..a1c831f7d5f 100644 --- a/packages/beacon-node/src/chain/validation/dataColumnSidecar.ts +++ b/packages/beacon-node/src/chain/validation/dataColumnSidecar.ts @@ -72,6 +72,8 @@ export function validateDataColumnsSidecars( if ( columnBlockHeader.slot !== blockSlot || !byteArrayEquals(columnBlockRoot, blockRoot) || + kzgCommitments.length === 0 || + blockKzgCommitments.length === 0 || blockKzgCommitments.length !== kzgCommitments.length || blockKzgCommitments .map((commitment, i) => byteArrayEquals(commitment, kzgCommitments[i]))