Skip to content

Commit bd94c20

Browse files
authored
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.
1 parent 8f1eaad commit bd94c20

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: beacon_chain/spec/beaconstate.nim

+2-3
Original file line numberDiff line numberDiff line change
@@ -2056,9 +2056,8 @@ func upgrade_to_electra*(
20562056
block_hash: pre.latest_execution_payload_header.block_hash,
20572057
transactions_root: pre.latest_execution_payload_header.transactions_root,
20582058
withdrawals_root: pre.latest_execution_payload_header.withdrawals_root,
2059-
blob_gas_used: 0,
2060-
excess_blob_gas: 0
2061-
)
2059+
blob_gas_used: pre.latest_execution_payload_header.blob_gas_used,
2060+
excess_blob_gas: pre.latest_execution_payload_header.excess_blob_gas)
20622061

20632062
var max_exit_epoch = FAR_FUTURE_EPOCH
20642063
for v in pre.validators:

0 commit comments

Comments
 (0)