From bd94c20325b8fe8a1501d5be84eefcabb5bf11af Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Thu, 17 Oct 2024 02:15:34 +0200 Subject: [PATCH] fix migration of `blob_gas_used`/`excess_blob_gas` from Deneb to Electra (#6655) `blob_gas_used` and `excess_blob_gas` were reset on fork transition from Deneb to Electra, which is not according to spec. Fix it. --- beacon_chain/spec/beaconstate.nim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/beacon_chain/spec/beaconstate.nim b/beacon_chain/spec/beaconstate.nim index 7d205efd1..1973042d9 100644 --- a/beacon_chain/spec/beaconstate.nim +++ b/beacon_chain/spec/beaconstate.nim @@ -2056,9 +2056,8 @@ func upgrade_to_electra*( block_hash: pre.latest_execution_payload_header.block_hash, transactions_root: pre.latest_execution_payload_header.transactions_root, withdrawals_root: pre.latest_execution_payload_header.withdrawals_root, - blob_gas_used: 0, - excess_blob_gas: 0 - ) + blob_gas_used: pre.latest_execution_payload_header.blob_gas_used, + excess_blob_gas: pre.latest_execution_payload_header.excess_blob_gas) var max_exit_epoch = FAR_FUTURE_EPOCH for v in pre.validators: