Verify kzg-commitments length with the payload

This commit is contained in:
Potuz 2024-07-09 13:58:10 -03:00
parent f97f0b4ef2
commit 096e5649c9

View File

@ -635,6 +635,8 @@ def process_execution_payload(state: BeaconState,
assert payload.prev_randao == get_randao_mix(state, get_current_epoch(state))
# Verify timestamp
assert payload.timestamp == compute_timestamp_at_slot(state, state.slot)
# Verify commitments are under limit
assert len(envelope.blob_kzg_commitments) <= MAX_BLOBS_PER_BLOCK
# Verify the execution payload is valid
versioned_hashes = [kzg_commitment_to_versioned_hash(commitment)
for commitment in envelope.blob_kzg_commitments]