Test non zero `excess_data_gas`

This commit is contained in:
Hsiao-Wei Wang 2023-04-28 19:01:19 +08:00
parent 22da92e597
commit 2a1d998594
No known key found for this signature in database
GPG Key ID: AE3D6B174F971DE4
2 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,7 @@ def run_block_with_blobs(spec, state, blob_count):
opaque_tx, _, blob_kzg_commitments, _ = get_sample_opaque_tx(spec, blob_count=blob_count)
block.body.blob_kzg_commitments = blob_kzg_commitments
block.body.execution_payload.transactions = [opaque_tx]
block.body.execution_payload.excess_data_gas = 2
block.body.execution_payload.block_hash = compute_el_block_hash(spec, block.body.execution_payload)
signed_block = state_transition_and_sign_block(spec, state, block)

View File

@ -165,6 +165,8 @@ def build_empty_execution_payload(spec, state, randao_mix=None):
)
if is_post_capella(spec):
payload.withdrawals = spec.get_expected_withdrawals(state)
if is_post_deneb(spec):
payload.excess_data_gas = 0
payload.block_hash = compute_el_block_hash(spec, payload)