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.
This commit is contained in:
Etan Kissling 2024-10-17 02:15:34 +02:00 committed by GitHub
parent 8f1eaade8c
commit bd94c20325
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -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: