chore(op): unify crate name reth-optimism-* (#11223)

This commit is contained in:
nk_ysg
2024-09-28 18:49:17 +08:00
committed by GitHub
parent 50461281e7
commit 375acdfedc
23 changed files with 120 additions and 120 deletions

View File

@ -35,7 +35,6 @@ exclude_crates=(
reth-ethereum-payload-builder reth-ethereum-payload-builder
reth-etl reth-etl
reth-evm-ethereum reth-evm-ethereum
reth-evm-optimism
reth-execution-errors reth-execution-errors
reth-exex reth-exex
reth-exex-test-utils reth-exex-test-utils
@ -49,8 +48,9 @@ exclude_crates=(
reth-node-ethereum reth-node-ethereum
reth-node-events reth-node-events
reth-node-metrics reth-node-metrics
reth-node-optimism
reth-optimism-cli reth-optimism-cli
reth-optimism-evm
reth-optimism-node
reth-optimism-payload-builder reth-optimism-payload-builder
reth-optimism-rpc reth-optimism-rpc
reth-payload-builder reth-payload-builder

View File

@ -47,7 +47,7 @@ jobs:
name: Run tests name: Run tests
run: | run: |
cargo nextest run \ cargo nextest run \
--locked -p reth-node-optimism --features "optimism" --locked -p reth-optimism-node --features "optimism"
integration-success: integration-success:
name: integration success name: integration success

162
Cargo.lock generated
View File

@ -5213,8 +5213,8 @@ dependencies = [
"clap", "clap",
"reth-cli-util", "reth-cli-util",
"reth-node-builder", "reth-node-builder",
"reth-node-optimism",
"reth-optimism-cli", "reth-optimism-cli",
"reth-optimism-node",
"reth-optimism-rpc", "reth-optimism-rpc",
"reth-provider", "reth-provider",
] ]
@ -7337,30 +7337,6 @@ dependencies = [
"serde_json", "serde_json",
] ]
[[package]]
name = "reth-evm-optimism"
version = "1.0.7"
dependencies = [
"alloy-consensus",
"alloy-genesis",
"alloy-primitives",
"reth-chainspec",
"reth-ethereum-forks",
"reth-evm",
"reth-execution-errors",
"reth-execution-types",
"reth-optimism-chainspec",
"reth-optimism-consensus",
"reth-optimism-forks",
"reth-primitives",
"reth-prune-types",
"reth-revm",
"revm",
"revm-primitives",
"thiserror",
"tracing",
]
[[package]] [[package]]
name = "reth-execution-errors" name = "reth-execution-errors"
version = "1.0.7" version = "1.0.7"
@ -7973,58 +7949,6 @@ dependencies = [
"vergen", "vergen",
] ]
[[package]]
name = "reth-node-optimism"
version = "1.0.7"
dependencies = [
"alloy-genesis",
"alloy-primitives",
"alloy-rpc-types-engine",
"async-trait",
"clap",
"eyre",
"jsonrpsee",
"jsonrpsee-types",
"op-alloy-rpc-types-engine",
"parking_lot 0.12.3",
"reqwest",
"reth",
"reth-auto-seal-consensus",
"reth-basic-payload-builder",
"reth-beacon-consensus",
"reth-chainspec",
"reth-consensus",
"reth-db",
"reth-discv5",
"reth-e2e-test-utils",
"reth-evm",
"reth-evm-optimism",
"reth-network",
"reth-node-api",
"reth-node-builder",
"reth-optimism-chainspec",
"reth-optimism-consensus",
"reth-optimism-forks",
"reth-optimism-payload-builder",
"reth-optimism-rpc",
"reth-payload-builder",
"reth-primitives",
"reth-provider",
"reth-revm",
"reth-rpc",
"reth-rpc-eth-api",
"reth-rpc-eth-types",
"reth-rpc-types",
"reth-rpc-types-compat",
"reth-tracing",
"reth-transaction-pool",
"serde",
"serde_json",
"thiserror",
"tokio",
"tracing",
]
[[package]] [[package]]
name = "reth-node-types" name = "reth-node-types"
version = "1.0.7" version = "1.0.7"
@ -8071,14 +7995,14 @@ dependencies = [
"reth-db-common", "reth-db-common",
"reth-downloaders", "reth-downloaders",
"reth-errors", "reth-errors",
"reth-evm-optimism",
"reth-execution-types", "reth-execution-types",
"reth-network-p2p", "reth-network-p2p",
"reth-node-builder", "reth-node-builder",
"reth-node-core", "reth-node-core",
"reth-node-events", "reth-node-events",
"reth-node-optimism",
"reth-optimism-chainspec", "reth-optimism-chainspec",
"reth-optimism-evm",
"reth-optimism-node",
"reth-optimism-primitives", "reth-optimism-primitives",
"reth-primitives", "reth-primitives",
"reth-provider", "reth-provider",
@ -8109,6 +8033,30 @@ dependencies = [
"tracing", "tracing",
] ]
[[package]]
name = "reth-optimism-evm"
version = "1.0.7"
dependencies = [
"alloy-consensus",
"alloy-genesis",
"alloy-primitives",
"reth-chainspec",
"reth-ethereum-forks",
"reth-evm",
"reth-execution-errors",
"reth-execution-types",
"reth-optimism-chainspec",
"reth-optimism-consensus",
"reth-optimism-forks",
"reth-primitives",
"reth-prune-types",
"reth-revm",
"revm",
"revm-primitives",
"thiserror",
"tracing",
]
[[package]] [[package]]
name = "reth-optimism-forks" name = "reth-optimism-forks"
version = "1.0.7" version = "1.0.7"
@ -8120,6 +8068,58 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "reth-optimism-node"
version = "1.0.7"
dependencies = [
"alloy-genesis",
"alloy-primitives",
"alloy-rpc-types-engine",
"async-trait",
"clap",
"eyre",
"jsonrpsee",
"jsonrpsee-types",
"op-alloy-rpc-types-engine",
"parking_lot 0.12.3",
"reqwest",
"reth",
"reth-auto-seal-consensus",
"reth-basic-payload-builder",
"reth-beacon-consensus",
"reth-chainspec",
"reth-consensus",
"reth-db",
"reth-discv5",
"reth-e2e-test-utils",
"reth-evm",
"reth-network",
"reth-node-api",
"reth-node-builder",
"reth-optimism-chainspec",
"reth-optimism-consensus",
"reth-optimism-evm",
"reth-optimism-forks",
"reth-optimism-payload-builder",
"reth-optimism-rpc",
"reth-payload-builder",
"reth-primitives",
"reth-provider",
"reth-revm",
"reth-rpc",
"reth-rpc-eth-api",
"reth-rpc-eth-types",
"reth-rpc-types",
"reth-rpc-types-compat",
"reth-tracing",
"reth-transaction-pool",
"serde",
"serde_json",
"thiserror",
"tokio",
"tracing",
]
[[package]] [[package]]
name = "reth-optimism-payload-builder" name = "reth-optimism-payload-builder"
version = "1.0.7" version = "1.0.7"
@ -8132,9 +8132,9 @@ dependencies = [
"reth-chain-state", "reth-chain-state",
"reth-chainspec", "reth-chainspec",
"reth-evm", "reth-evm",
"reth-evm-optimism",
"reth-execution-types", "reth-execution-types",
"reth-optimism-consensus", "reth-optimism-consensus",
"reth-optimism-evm",
"reth-optimism-forks", "reth-optimism-forks",
"reth-payload-builder", "reth-payload-builder",
"reth-payload-primitives", "reth-payload-primitives",
@ -8176,12 +8176,12 @@ dependencies = [
"reqwest", "reqwest",
"reth-chainspec", "reth-chainspec",
"reth-evm", "reth-evm",
"reth-evm-optimism",
"reth-network-api", "reth-network-api",
"reth-node-api", "reth-node-api",
"reth-node-builder", "reth-node-builder",
"reth-optimism-chainspec", "reth-optimism-chainspec",
"reth-optimism-consensus", "reth-optimism-consensus",
"reth-optimism-evm",
"reth-optimism-forks", "reth-optimism-forks",
"reth-primitives", "reth-primitives",
"reth-provider", "reth-provider",

View File

@ -333,7 +333,7 @@ reth-ethereum-payload-builder = { path = "crates/ethereum/payload" }
reth-etl = { path = "crates/etl" } reth-etl = { path = "crates/etl" }
reth-evm = { path = "crates/evm" } reth-evm = { path = "crates/evm" }
reth-evm-ethereum = { path = "crates/ethereum/evm" } reth-evm-ethereum = { path = "crates/ethereum/evm" }
reth-evm-optimism = { path = "crates/optimism/evm" } reth-optimism-evm = { path = "crates/optimism/evm" }
reth-execution-errors = { path = "crates/evm/execution-errors" } reth-execution-errors = { path = "crates/evm/execution-errors" }
reth-execution-types = { path = "crates/evm/execution-types" } reth-execution-types = { path = "crates/evm/execution-types" }
reth-exex = { path = "crates/exex/exex" } reth-exex = { path = "crates/exex/exex" }
@ -360,7 +360,7 @@ reth-node-core = { path = "crates/node/core" }
reth-node-ethereum = { path = "crates/ethereum/node" } reth-node-ethereum = { path = "crates/ethereum/node" }
reth-node-events = { path = "crates/node/events" } reth-node-events = { path = "crates/node/events" }
reth-node-metrics = { path = "crates/node/metrics" } reth-node-metrics = { path = "crates/node/metrics" }
reth-node-optimism = { path = "crates/optimism/node" } reth-optimism-node = { path = "crates/optimism/node" }
reth-node-types = { path = "crates/node/types" } reth-node-types = { path = "crates/node/types" }
reth-optimism-chainspec = { path = "crates/optimism/chainspec" } reth-optimism-chainspec = { path = "crates/optimism/chainspec" }
reth-optimism-cli = { path = "crates/optimism/cli" } reth-optimism-cli = { path = "crates/optimism/cli" }

View File

@ -80,7 +80,7 @@ pub type RethFullAdapter<DB, Types> = FullNodeTypesAdapter<
/// configured components and can interact with the node. /// configured components and can interact with the node.
/// ///
/// There are convenience functions for networks that come with a preset of types and components via /// There are convenience functions for networks that come with a preset of types and components via
/// the [Node] trait, see `reth_node_ethereum::EthereumNode` or `reth_node_optimism::OptimismNode`. /// the [Node] trait, see `reth_node_ethereum::EthereumNode` or `reth_optimism_node::OptimismNode`.
/// ///
/// The [`NodeBuilder::node`] function configures the node's types and components in one step. /// The [`NodeBuilder::node`] function configures the node's types and components in one step.
/// ///

View File

@ -14,7 +14,7 @@ reth-cli-util.workspace = true
reth-optimism-cli.workspace = true reth-optimism-cli.workspace = true
reth-provider.workspace = true reth-provider.workspace = true
reth-optimism-rpc.workspace = true reth-optimism-rpc.workspace = true
reth-node-optimism.workspace = true reth-optimism-node.workspace = true
clap = { workspace = true, features = ["derive", "env"] } clap = { workspace = true, features = ["derive", "env"] }
@ -28,9 +28,9 @@ jemalloc = ["reth-cli-util/jemalloc"]
jemalloc-prof = ["reth-cli-util/jemalloc-prof"] jemalloc-prof = ["reth-cli-util/jemalloc-prof"]
tracy-allocator = ["reth-cli-util/tracy-allocator"] tracy-allocator = ["reth-cli-util/tracy-allocator"]
asm-keccak = ["reth-optimism-cli/asm-keccak", "reth-node-optimism/asm-keccak"] asm-keccak = ["reth-optimism-cli/asm-keccak", "reth-optimism-node/asm-keccak"]
optimism = ["reth-optimism-cli/optimism", "reth-node-optimism/optimism"] optimism = ["reth-optimism-cli/optimism", "reth-optimism-node/optimism"]
[[bin]] [[bin]]
name = "op-reth" name = "op-reth"

View File

@ -5,8 +5,8 @@
use clap::Parser; use clap::Parser;
use reth_node_builder::{engine_tree_config::TreeConfig, EngineNodeLauncher}; use reth_node_builder::{engine_tree_config::TreeConfig, EngineNodeLauncher};
use reth_node_optimism::{args::RollupArgs, node::OptimismAddOns, OptimismNode};
use reth_optimism_cli::{chainspec::OpChainSpecParser, Cli}; use reth_optimism_cli::{chainspec::OpChainSpecParser, Cli};
use reth_optimism_node::{args::RollupArgs, node::OptimismAddOns, OptimismNode};
use reth_optimism_rpc::SequencerClient; use reth_optimism_rpc::SequencerClient;
use reth_provider::providers::BlockchainProvider2; use reth_provider::providers::BlockchainProvider2;

View File

@ -24,7 +24,7 @@ reth-stages.workspace = true
reth-static-file.workspace = true reth-static-file.workspace = true
reth-execution-types.workspace = true reth-execution-types.workspace = true
reth-node-core.workspace = true reth-node-core.workspace = true
reth-node-optimism.workspace = true reth-optimism-node.workspace = true
reth-primitives.workspace = true reth-primitives.workspace = true
## optimism ## optimism
@ -37,7 +37,7 @@ reth-node-events.workspace = true
reth-network-p2p.workspace = true reth-network-p2p.workspace = true
reth-errors.workspace = true reth-errors.workspace = true
reth-config.workspace = true reth-config.workspace = true
reth-evm-optimism.workspace = true reth-optimism-evm.workspace = true
reth-cli.workspace = true reth-cli.workspace = true
reth-cli-runner.workspace = true reth-cli-runner.workspace = true
reth-node-builder.workspace = true reth-node-builder.workspace = true
@ -71,14 +71,14 @@ reth-cli-commands.workspace = true
[features] [features]
optimism = [ optimism = [
"reth-primitives/optimism", "reth-primitives/optimism",
"reth-evm-optimism/optimism", "reth-optimism-evm/optimism",
"reth-provider/optimism", "reth-provider/optimism",
"reth-node-core/optimism", "reth-node-core/optimism",
"reth-node-optimism/optimism", "reth-optimism-node/optimism",
] ]
asm-keccak = [ asm-keccak = [
"alloy-primitives/asm-keccak", "alloy-primitives/asm-keccak",
"reth-node-core/asm-keccak", "reth-node-core/asm-keccak",
"reth-node-optimism/asm-keccak", "reth-optimism-node/asm-keccak",
"reth-primitives/asm-keccak", "reth-primitives/asm-keccak",
] ]

View File

@ -8,13 +8,13 @@ use reth_downloaders::{
headers::reverse_headers::ReverseHeadersDownloaderBuilder, headers::reverse_headers::ReverseHeadersDownloaderBuilder,
}; };
use reth_errors::ProviderError; use reth_errors::ProviderError;
use reth_evm_optimism::OpExecutorProvider;
use reth_network_p2p::{ use reth_network_p2p::{
bodies::downloader::BodyDownloader, bodies::downloader::BodyDownloader,
headers::downloader::{HeaderDownloader, SyncTarget}, headers::downloader::{HeaderDownloader, SyncTarget},
}; };
use reth_node_builder::NodeTypesWithDB; use reth_node_builder::NodeTypesWithDB;
use reth_node_events::node::NodeEvent; use reth_node_events::node::NodeEvent;
use reth_optimism_evm::OpExecutorProvider;
use reth_provider::{BlockNumReader, ChainSpecProvider, HeaderProvider, ProviderFactory}; use reth_provider::{BlockNumReader, ChainSpecProvider, HeaderProvider, ProviderFactory};
use reth_prune::PruneModes; use reth_prune::PruneModes;
use reth_stages::{sets::DefaultStages, Pipeline, StageSet}; use reth_stages::{sets::DefaultStages, Pipeline, StageSet};

View File

@ -40,13 +40,13 @@ use reth_cli::chainspec::ChainSpecParser;
use reth_cli_commands::node::NoArgs; use reth_cli_commands::node::NoArgs;
use reth_cli_runner::CliRunner; use reth_cli_runner::CliRunner;
use reth_db::DatabaseEnv; use reth_db::DatabaseEnv;
use reth_evm_optimism::OpExecutorProvider;
use reth_node_builder::{NodeBuilder, WithLaunchContext}; use reth_node_builder::{NodeBuilder, WithLaunchContext};
use reth_node_core::{ use reth_node_core::{
args::LogArgs, args::LogArgs,
version::{LONG_VERSION, SHORT_VERSION}, version::{LONG_VERSION, SHORT_VERSION},
}; };
use reth_node_optimism::OptimismNode; use reth_optimism_evm::OpExecutorProvider;
use reth_optimism_node::OptimismNode;
use reth_tracing::FileWorkerGuard; use reth_tracing::FileWorkerGuard;
use tracing::info; use tracing::info;

View File

@ -1,5 +1,5 @@
[package] [package]
name = "reth-evm-optimism" name = "reth-optimism-evm"
version.workspace = true version.workspace = true
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true

View File

@ -1,5 +1,5 @@
[package] [package]
name = "reth-node-optimism" name = "reth-optimism-node"
version.workspace = true version.workspace = true
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true
@ -36,7 +36,7 @@ reth-rpc.workspace = true
# op-reth # op-reth
reth-optimism-payload-builder.workspace = true reth-optimism-payload-builder.workspace = true
reth-evm-optimism.workspace = true reth-optimism-evm.workspace = true
reth-optimism-rpc.workspace = true reth-optimism-rpc.workspace = true
reth-optimism-chainspec.workspace = true reth-optimism-chainspec.workspace = true
reth-optimism-consensus.workspace = true reth-optimism-consensus.workspace = true
@ -81,7 +81,7 @@ optimism = [
"reth-primitives/optimism", "reth-primitives/optimism",
"reth-provider/optimism", "reth-provider/optimism",
"reth-rpc-types-compat/optimism", "reth-rpc-types-compat/optimism",
"reth-evm-optimism/optimism", "reth-optimism-evm/optimism",
"reth-optimism-payload-builder/optimism", "reth-optimism-payload-builder/optimism",
"reth-beacon-consensus/optimism", "reth-beacon-consensus/optimism",
"reth-revm/optimism", "reth-revm/optimism",

View File

@ -26,4 +26,4 @@ pub use reth_optimism_payload_builder::{
OptimismBuiltPayload, OptimismPayloadBuilder, OptimismPayloadBuilderAttributes, OptimismBuiltPayload, OptimismPayloadBuilder, OptimismPayloadBuilderAttributes,
}; };
pub use reth_evm_optimism::*; pub use reth_optimism_evm::*;

View File

@ -5,7 +5,6 @@ use std::sync::Arc;
use reth_basic_payload_builder::{BasicPayloadJobGenerator, BasicPayloadJobGeneratorConfig}; use reth_basic_payload_builder::{BasicPayloadJobGenerator, BasicPayloadJobGeneratorConfig};
use reth_chainspec::ChainSpec; use reth_chainspec::ChainSpec;
use reth_evm::ConfigureEvm; use reth_evm::ConfigureEvm;
use reth_evm_optimism::{OpExecutorProvider, OptimismEvmConfig};
use reth_network::{NetworkHandle, NetworkManager}; use reth_network::{NetworkHandle, NetworkManager};
use reth_node_api::{EngineValidator, FullNodeComponents, NodeAddOns}; use reth_node_api::{EngineValidator, FullNodeComponents, NodeAddOns};
use reth_node_builder::{ use reth_node_builder::{
@ -18,6 +17,7 @@ use reth_node_builder::{
}; };
use reth_optimism_chainspec::OpChainSpec; use reth_optimism_chainspec::OpChainSpec;
use reth_optimism_consensus::OptimismBeaconConsensus; use reth_optimism_consensus::OptimismBeaconConsensus;
use reth_optimism_evm::{OpExecutorProvider, OptimismEvmConfig};
use reth_optimism_rpc::OpEthApi; use reth_optimism_rpc::OpEthApi;
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService}; use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
use reth_primitives::Header; use reth_primitives::Header;

View File

@ -1,7 +1,7 @@
//! OP transaction pool types //! OP transaction pool types
use parking_lot::RwLock; use parking_lot::RwLock;
use reth_chainspec::ChainSpec; use reth_chainspec::ChainSpec;
use reth_evm_optimism::RethL1BlockInfo; use reth_optimism_evm::RethL1BlockInfo;
use reth_primitives::{Block, GotExpected, InvalidTransactionError, SealedBlock}; use reth_primitives::{Block, GotExpected, InvalidTransactionError, SealedBlock};
use reth_provider::{BlockReaderIdExt, StateProviderFactory}; use reth_provider::{BlockReaderIdExt, StateProviderFactory};
use reth_revm::L1BlockInfo; use reth_revm::L1BlockInfo;
@ -98,7 +98,7 @@ where
/// Update the L1 block info. /// Update the L1 block info.
fn update_l1_block_info(&self, block: &Block) { fn update_l1_block_info(&self, block: &Block) {
self.block_info.timestamp.store(block.timestamp, Ordering::Relaxed); self.block_info.timestamp.store(block.timestamp, Ordering::Relaxed);
if let Ok(cost_addition) = reth_evm_optimism::extract_l1_info(block) { if let Ok(cost_addition) = reth_optimism_evm::extract_l1_info(block) {
*self.block_info.l1_block_info.write() = cost_addition; *self.block_info.l1_block_info.write() = cost_addition;
} }
} }

View File

@ -5,10 +5,10 @@ use alloy_primitives::{Address, B256};
use reth::{rpc::types::engine::PayloadAttributes, tasks::TaskManager}; use reth::{rpc::types::engine::PayloadAttributes, tasks::TaskManager};
use reth_chainspec::ChainSpecBuilder; use reth_chainspec::ChainSpecBuilder;
use reth_e2e_test_utils::{transaction::TransactionTestContext, wallet::Wallet, NodeHelperType}; use reth_e2e_test_utils::{transaction::TransactionTestContext, wallet::Wallet, NodeHelperType};
use reth_node_optimism::{ use reth_optimism_chainspec::BASE_MAINNET;
use reth_optimism_node::{
node::OptimismAddOns, OptimismBuiltPayload, OptimismNode, OptimismPayloadBuilderAttributes, node::OptimismAddOns, OptimismBuiltPayload, OptimismNode, OptimismPayloadBuilderAttributes,
}; };
use reth_optimism_chainspec::BASE_MAINNET;
use reth_payload_builder::EthPayloadBuilderAttributes; use reth_payload_builder::EthPayloadBuilderAttributes;
use tokio::sync::Mutex; use tokio::sync::Mutex;

View File

@ -3,7 +3,7 @@
use reth_db::test_utils::create_test_rw_db; use reth_db::test_utils::create_test_rw_db;
use reth_node_api::FullNodeComponents; use reth_node_api::FullNodeComponents;
use reth_node_builder::{NodeBuilder, NodeConfig}; use reth_node_builder::{NodeBuilder, NodeConfig};
use reth_node_optimism::node::{OptimismAddOns, OptimismNode}; use reth_optimism_node::node::{OptimismAddOns, OptimismNode};
#[test] #[test]
fn test_basic_setup() { fn test_basic_setup() {

View File

@ -28,8 +28,8 @@ reth-trie.workspace = true
reth-chain-state.workspace = true reth-chain-state.workspace = true
# op-reth # op-reth
reth-evm-optimism.workspace = true
reth-optimism-consensus.workspace = true reth-optimism-consensus.workspace = true
reth-optimism-evm.workspace = true
reth-optimism-forks.workspace = true reth-optimism-forks.workspace = true
# ethereum # ethereum
@ -51,6 +51,6 @@ optimism = [
"reth-primitives/optimism", "reth-primitives/optimism",
"reth-provider/optimism", "reth-provider/optimism",
"reth-rpc-types-compat/optimism", "reth-rpc-types-compat/optimism",
"reth-evm-optimism/optimism", "reth-optimism-evm/optimism",
"reth-revm/optimism", "reth-revm/optimism",
] ]

View File

@ -224,7 +224,7 @@ where
// blocks will always have at least a single transaction in them (the L1 info transaction), // blocks will always have at least a single transaction in them (the L1 info transaction),
// so we can safely assume that this will always be triggered upon the transition and that // so we can safely assume that this will always be triggered upon the transition and that
// the above check for empty blocks will never be hit on OP chains. // the above check for empty blocks will never be hit on OP chains.
reth_evm_optimism::ensure_create2_deployer( reth_optimism_evm::ensure_create2_deployer(
chain_spec.clone(), chain_spec.clone(),
attributes.payload_attributes.timestamp, attributes.payload_attributes.timestamp,
&mut db, &mut db,

View File

@ -28,8 +28,8 @@ reth-node-builder.workspace = true
reth-chainspec.workspace = true reth-chainspec.workspace = true
# op-reth # op-reth
reth-evm-optimism.workspace = true
reth-optimism-consensus.workspace = true reth-optimism-consensus.workspace = true
reth-optimism-evm.workspace = true
reth-optimism-forks.workspace = true reth-optimism-forks.workspace = true
# ethereum # ethereum
@ -60,7 +60,7 @@ reth-optimism-chainspec.workspace = true
[features] [features]
optimism = [ optimism = [
"reth-evm-optimism/optimism", "reth-optimism-evm/optimism",
"reth-primitives/optimism", "reth-primitives/optimism",
"reth-provider/optimism", "reth-provider/optimism",
"reth-rpc-eth-api/optimism", "reth-rpc-eth-api/optimism",

View File

@ -2,7 +2,7 @@
use alloy_rpc_types::error::EthRpcErrorCode; use alloy_rpc_types::error::EthRpcErrorCode;
use jsonrpsee_types::error::INTERNAL_ERROR_CODE; use jsonrpsee_types::error::INTERNAL_ERROR_CODE;
use reth_evm_optimism::OptimismBlockExecutionError; use reth_optimism_evm::OptimismBlockExecutionError;
use reth_primitives::revm_primitives::{InvalidTransaction, OptimismInvalidTransaction}; use reth_primitives::revm_primitives::{InvalidTransaction, OptimismInvalidTransaction};
use reth_rpc_eth_api::AsEthApiError; use reth_rpc_eth_api::AsEthApiError;
use reth_rpc_eth_types::EthApiError; use reth_rpc_eth_types::EthApiError;

View File

@ -44,7 +44,7 @@ where
let block = block.unseal(); let block = block.unseal();
let l1_block_info = let l1_block_info =
reth_evm_optimism::extract_l1_info(&block).map_err(OpEthApiError::from)?; reth_optimism_evm::extract_l1_info(&block).map_err(OpEthApiError::from)?;
return block return block
.body .body

View File

@ -6,8 +6,8 @@ use op_alloy_rpc_types::{
receipt::L1BlockInfo, OpTransactionReceipt, OptimismTransactionReceiptFields, receipt::L1BlockInfo, OpTransactionReceipt, OptimismTransactionReceiptFields,
}; };
use reth_chainspec::ChainSpec; use reth_chainspec::ChainSpec;
use reth_evm_optimism::RethL1BlockInfo;
use reth_node_api::{FullNodeComponents, NodeTypes}; use reth_node_api::{FullNodeComponents, NodeTypes};
use reth_optimism_evm::RethL1BlockInfo;
use reth_optimism_forks::OptimismHardforks; use reth_optimism_forks::OptimismHardforks;
use reth_primitives::{Receipt, TransactionMeta, TransactionSigned, TxType}; use reth_primitives::{Receipt, TransactionMeta, TransactionSigned, TxType};
use reth_provider::ChainSpecProvider; use reth_provider::ChainSpecProvider;
@ -42,7 +42,7 @@ where
let block = block.unseal(); let block = block.unseal();
let l1_block_info = let l1_block_info =
reth_evm_optimism::extract_l1_info(&block).map_err(OpEthApiError::from)?; reth_optimism_evm::extract_l1_info(&block).map_err(OpEthApiError::from)?;
Ok(OpReceiptBuilder::new( Ok(OpReceiptBuilder::new(
&self.inner.provider().chain_spec(), &self.inner.provider().chain_spec(),
@ -355,7 +355,7 @@ mod test {
}; };
let l1_block_info = let l1_block_info =
reth_evm_optimism::extract_l1_info(&block).expect("should extract l1 info"); reth_optimism_evm::extract_l1_info(&block).expect("should extract l1 info");
// test // test
assert!(OP_MAINNET.is_fjord_active_at_timestamp(BLOCK_124665056_TIMESTAMP)); assert!(OP_MAINNET.is_fjord_active_at_timestamp(BLOCK_124665056_TIMESTAMP));