Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix blinded block conversion for Deneb and Electra #6569

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion beacon_chain/spec/mev/deneb_mev.nim
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ func toSignedBlindedBeaconBlock*(blck: deneb.SignedBeaconBlock):
transactions_root:
hash_tree_root(blck.message.body.execution_payload.transactions),
withdrawals_root:
hash_tree_root(blck.message.body.execution_payload.withdrawals)),
hash_tree_root(blck.message.body.execution_payload.withdrawals),
blob_gas_used: blck.message.body.execution_payload.blob_gas_used,
excess_blob_gas: blck.message.body.execution_payload.excess_blob_gas),
bls_to_execution_changes: blck.message.body.bls_to_execution_changes,
blob_kzg_commitments: blck.message.body.blob_kzg_commitments)),
signature: blck.signature)
2 changes: 2 additions & 0 deletions beacon_chain/spec/mev/electra_mev.nim
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ func toSignedBlindedBeaconBlock*(blck: electra.SignedBeaconBlock):
hash_tree_root(blck.message.body.execution_payload.transactions),
withdrawals_root:
hash_tree_root(blck.message.body.execution_payload.withdrawals),
blob_gas_used: blck.message.body.execution_payload.blob_gas_used,
excess_blob_gas: blck.message.body.execution_payload.excess_blob_gas,
deposit_requests_root: hash_tree_root(
blck.message.body.execution_payload.deposit_requests),
withdrawal_requests_root: hash_tree_root(
Expand Down
4 changes: 4 additions & 0 deletions tests/test_toblindedblock.nim
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ template capella_steps() =
do_check

template deneb_steps() =
b.message.body.execution_payload.blob_gas_used = 8
do_check
b.message.body.execution_payload.excess_blob_gas = 9
do_check
check: b.message.body.blob_kzg_commitments.add(default(KzgCommitment))
do_check

Expand Down
Loading