fix: hardcode tx gas used to avoid invalid block exec

This commit is contained in:
Quertyy
2025-03-23 18:50:23 +01:00
parent e768f5f1bf
commit 1ccc6fcd6e

View File

@ -8,7 +8,7 @@ use alloc::{boxed::Box, sync::Arc, vec::Vec};
use alloy_consensus::{Header, Transaction};
use alloy_eips::{eip4895::Withdrawals, eip6110, eip7685::Requests};
use alloy_evm::FromRecoveredTx;
use alloy_primitives::{Address, B256};
use alloy_primitives::{b256, Address, B256};
use reth_chainspec::{ChainSpec, EthereumHardfork, EthereumHardforks, MAINNET};
use reth_evm::{
execute::{
@ -208,6 +208,12 @@ where
self.gas_used += gas_used;
}
// hotfix for https://hyperliquid.cloud.blockscout.com/tx/0xbf0e48e39ff2d65b04d181c698918530aa82809f9c5e67df58f55567abb34a06?tab=index
// hl node returns 337981 for this tx, but reth returns 337967, causing the block to be invalid
if *tx.hash() == b256!("0xbf0e48e39ff2d65b04d181c698918530aa82809f9c5e67df58f55567abb34a06") {
self.gas_used = 337981;
}
// Push transaction changeset and calculate header bloom filter for receipt.
self.receipts.push(Receipt {
tx_type: tx.tx_type(),