chore: move revm_spec methods from reth-primitives to chain specific crates (#9152)

This commit is contained in:
joshieDo
2024-06-27 21:11:29 +02:00
committed by GitHub
parent 9fd2cf027f
commit d8e6d01308
14 changed files with 256 additions and 165 deletions

View File

@ -4,10 +4,10 @@
use alloy_rlp::Encodable;
use reth_chainspec::{ChainSpec, EthereumHardforks};
use reth_evm_optimism::revm_spec_by_timestamp_after_bedrock;
use reth_payload_builder::EthPayloadBuilderAttributes;
use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes};
use reth_primitives::{
revm::config::revm_spec_by_timestamp_after_merge,
revm_primitives::{BlobExcessGasAndPrice, BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, SpecId},
Address, BlobTransactionSidecar, Header, SealedBlock, TransactionSigned, Withdrawals, B256,
U256,
@ -113,7 +113,7 @@ impl PayloadBuilderAttributes for OptimismPayloadBuilderAttributes {
let cfg = CfgEnv::default().with_chain_id(chain_spec.chain().id());
// ensure we're not missing any timestamp based hardforks
let spec_id = revm_spec_by_timestamp_after_merge(chain_spec, self.timestamp());
let spec_id = revm_spec_by_timestamp_after_bedrock(chain_spec, self.timestamp());
// if the parent block did not have excess blob gas (i.e. it was pre-cancun), but it is
// cancun now, we need to set the excess blob gas to the default value