Move OptimismHardfork to new crate reth_optimism_forks (#10963)

This commit is contained in:
Emilia Hane
2024-09-20 18:51:45 +02:00
committed by GitHub
parent 63f2d59068
commit 66089682d7
42 changed files with 302 additions and 120 deletions

View File

@ -19,6 +19,9 @@ reth-consensus.workspace = true
reth-primitives.workspace = true
reth-trie-common.workspace = true
# op-reth
reth-optimism-forks.workspace = true
# ethereum
alloy-primitives.workspace = true

View File

@ -10,7 +10,7 @@
#![cfg(feature = "optimism")]
use alloy_primitives::U256;
use reth_chainspec::{ChainSpec, EthereumHardforks, OptimismHardforks};
use reth_chainspec::{ChainSpec, EthereumHardforks};
use reth_consensus::{Consensus, ConsensusError, PostExecutionInput};
use reth_consensus_common::validation::{
validate_against_parent_4844, validate_against_parent_eip1559_base_fee,
@ -18,6 +18,7 @@ use reth_consensus_common::validation::{
validate_header_base_fee, validate_header_extradata, validate_header_gas,
validate_shanghai_withdrawals,
};
use reth_optimism_forks::OptimismHardforks;
use reth_primitives::{
BlockWithSenders, GotExpected, Header, SealedBlock, SealedHeader, EMPTY_OMMER_ROOT_HASH,
};

View File

@ -1,7 +1,8 @@
//! Helper function for Receipt root calculation for Optimism hardforks.
use alloy_primitives::B256;
use reth_chainspec::{ChainSpec, OptimismHardfork};
use reth_chainspec::ChainSpec;
use reth_optimism_forks::OptimismHardfork;
use reth_primitives::ReceiptWithBloom;
use reth_trie_common::root::ordered_trie_root_with_encoder;