fix kzg inclusion proof logic

This commit is contained in:
Agnish Ghosh 2024-07-04 23:51:38 +05:30
parent 6cdc6bfa32
commit eb46f4c486
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
1 changed files with 1 additions and 1 deletions

View File

@ -327,7 +327,7 @@ proc verify_data_column_sidecar_kzg_proofs*(sidecar: DataColumnSidecar): Result[
# https://github.com/ethereum/consensus-specs/blob/5f48840f4d768bf0e0a8156a3ed06ec333589007/specs/_features/eip7594/p2p-interface.md#verify_data_column_sidecar_inclusion_proof
proc verify_data_column_sidecar_inclusion_proof*(sidecar: DataColumnSidecar): Result[void, string] =
# Verify if the given KZG commitments are included in the beacon block
let gindex = 27.GeneralizedIndex
let gindex = kzg_commitment_inclusion_proof_gindex(sidecar.index)
if not is_valid_merkle_branch(
hash_tree_root(sidecar.kzg_commitments),
sidecar.kzg_commitments_inclusion_proof,