mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(op): unify crate name reth-optimism-* (#11223)
This commit is contained in:
@ -80,7 +80,7 @@ pub type RethFullAdapter<DB, Types> = FullNodeTypesAdapter<
|
||||
/// configured components and can interact with the node.
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
|
||||
@ -14,7 +14,7 @@ reth-cli-util.workspace = true
|
||||
reth-optimism-cli.workspace = true
|
||||
reth-provider.workspace = true
|
||||
reth-optimism-rpc.workspace = true
|
||||
reth-node-optimism.workspace = true
|
||||
reth-optimism-node.workspace = true
|
||||
|
||||
clap = { workspace = true, features = ["derive", "env"] }
|
||||
|
||||
@ -28,9 +28,9 @@ jemalloc = ["reth-cli-util/jemalloc"]
|
||||
jemalloc-prof = ["reth-cli-util/jemalloc-prof"]
|
||||
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]]
|
||||
name = "op-reth"
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
|
||||
use clap::Parser;
|
||||
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_node::{args::RollupArgs, node::OptimismAddOns, OptimismNode};
|
||||
use reth_optimism_rpc::SequencerClient;
|
||||
use reth_provider::providers::BlockchainProvider2;
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ reth-stages.workspace = true
|
||||
reth-static-file.workspace = true
|
||||
reth-execution-types.workspace = true
|
||||
reth-node-core.workspace = true
|
||||
reth-node-optimism.workspace = true
|
||||
reth-optimism-node.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
|
||||
## optimism
|
||||
@ -37,7 +37,7 @@ reth-node-events.workspace = true
|
||||
reth-network-p2p.workspace = true
|
||||
reth-errors.workspace = true
|
||||
reth-config.workspace = true
|
||||
reth-evm-optimism.workspace = true
|
||||
reth-optimism-evm.workspace = true
|
||||
reth-cli.workspace = true
|
||||
reth-cli-runner.workspace = true
|
||||
reth-node-builder.workspace = true
|
||||
@ -71,14 +71,14 @@ reth-cli-commands.workspace = true
|
||||
[features]
|
||||
optimism = [
|
||||
"reth-primitives/optimism",
|
||||
"reth-evm-optimism/optimism",
|
||||
"reth-optimism-evm/optimism",
|
||||
"reth-provider/optimism",
|
||||
"reth-node-core/optimism",
|
||||
"reth-node-optimism/optimism",
|
||||
"reth-optimism-node/optimism",
|
||||
]
|
||||
asm-keccak = [
|
||||
"alloy-primitives/asm-keccak",
|
||||
"reth-node-core/asm-keccak",
|
||||
"reth-node-optimism/asm-keccak",
|
||||
"reth-optimism-node/asm-keccak",
|
||||
"reth-primitives/asm-keccak",
|
||||
]
|
||||
|
||||
@ -8,13 +8,13 @@ use reth_downloaders::{
|
||||
headers::reverse_headers::ReverseHeadersDownloaderBuilder,
|
||||
};
|
||||
use reth_errors::ProviderError;
|
||||
use reth_evm_optimism::OpExecutorProvider;
|
||||
use reth_network_p2p::{
|
||||
bodies::downloader::BodyDownloader,
|
||||
headers::downloader::{HeaderDownloader, SyncTarget},
|
||||
};
|
||||
use reth_node_builder::NodeTypesWithDB;
|
||||
use reth_node_events::node::NodeEvent;
|
||||
use reth_optimism_evm::OpExecutorProvider;
|
||||
use reth_provider::{BlockNumReader, ChainSpecProvider, HeaderProvider, ProviderFactory};
|
||||
use reth_prune::PruneModes;
|
||||
use reth_stages::{sets::DefaultStages, Pipeline, StageSet};
|
||||
|
||||
@ -40,13 +40,13 @@ use reth_cli::chainspec::ChainSpecParser;
|
||||
use reth_cli_commands::node::NoArgs;
|
||||
use reth_cli_runner::CliRunner;
|
||||
use reth_db::DatabaseEnv;
|
||||
use reth_evm_optimism::OpExecutorProvider;
|
||||
use reth_node_builder::{NodeBuilder, WithLaunchContext};
|
||||
use reth_node_core::{
|
||||
args::LogArgs,
|
||||
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 tracing::info;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "reth-evm-optimism"
|
||||
name = "reth-optimism-evm"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "reth-node-optimism"
|
||||
name = "reth-optimism-node"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
@ -36,7 +36,7 @@ reth-rpc.workspace = true
|
||||
|
||||
# op-reth
|
||||
reth-optimism-payload-builder.workspace = true
|
||||
reth-evm-optimism.workspace = true
|
||||
reth-optimism-evm.workspace = true
|
||||
reth-optimism-rpc.workspace = true
|
||||
reth-optimism-chainspec.workspace = true
|
||||
reth-optimism-consensus.workspace = true
|
||||
@ -81,7 +81,7 @@ optimism = [
|
||||
"reth-primitives/optimism",
|
||||
"reth-provider/optimism",
|
||||
"reth-rpc-types-compat/optimism",
|
||||
"reth-evm-optimism/optimism",
|
||||
"reth-optimism-evm/optimism",
|
||||
"reth-optimism-payload-builder/optimism",
|
||||
"reth-beacon-consensus/optimism",
|
||||
"reth-revm/optimism",
|
||||
|
||||
@ -26,4 +26,4 @@ pub use reth_optimism_payload_builder::{
|
||||
OptimismBuiltPayload, OptimismPayloadBuilder, OptimismPayloadBuilderAttributes,
|
||||
};
|
||||
|
||||
pub use reth_evm_optimism::*;
|
||||
pub use reth_optimism_evm::*;
|
||||
|
||||
@ -5,7 +5,6 @@ use std::sync::Arc;
|
||||
use reth_basic_payload_builder::{BasicPayloadJobGenerator, BasicPayloadJobGeneratorConfig};
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_evm::ConfigureEvm;
|
||||
use reth_evm_optimism::{OpExecutorProvider, OptimismEvmConfig};
|
||||
use reth_network::{NetworkHandle, NetworkManager};
|
||||
use reth_node_api::{EngineValidator, FullNodeComponents, NodeAddOns};
|
||||
use reth_node_builder::{
|
||||
@ -18,6 +17,7 @@ use reth_node_builder::{
|
||||
};
|
||||
use reth_optimism_chainspec::OpChainSpec;
|
||||
use reth_optimism_consensus::OptimismBeaconConsensus;
|
||||
use reth_optimism_evm::{OpExecutorProvider, OptimismEvmConfig};
|
||||
use reth_optimism_rpc::OpEthApi;
|
||||
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
|
||||
use reth_primitives::Header;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//! OP transaction pool types
|
||||
use parking_lot::RwLock;
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_evm_optimism::RethL1BlockInfo;
|
||||
use reth_optimism_evm::RethL1BlockInfo;
|
||||
use reth_primitives::{Block, GotExpected, InvalidTransactionError, SealedBlock};
|
||||
use reth_provider::{BlockReaderIdExt, StateProviderFactory};
|
||||
use reth_revm::L1BlockInfo;
|
||||
@ -98,7 +98,7 @@ where
|
||||
/// Update the L1 block info.
|
||||
fn update_l1_block_info(&self, block: &Block) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,10 +5,10 @@ use alloy_primitives::{Address, B256};
|
||||
use reth::{rpc::types::engine::PayloadAttributes, tasks::TaskManager};
|
||||
use reth_chainspec::ChainSpecBuilder;
|
||||
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,
|
||||
};
|
||||
use reth_optimism_chainspec::BASE_MAINNET;
|
||||
use reth_payload_builder::EthPayloadBuilderAttributes;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
use reth_db::test_utils::create_test_rw_db;
|
||||
use reth_node_api::FullNodeComponents;
|
||||
use reth_node_builder::{NodeBuilder, NodeConfig};
|
||||
use reth_node_optimism::node::{OptimismAddOns, OptimismNode};
|
||||
use reth_optimism_node::node::{OptimismAddOns, OptimismNode};
|
||||
|
||||
#[test]
|
||||
fn test_basic_setup() {
|
||||
|
||||
@ -28,8 +28,8 @@ reth-trie.workspace = true
|
||||
reth-chain-state.workspace = true
|
||||
|
||||
# op-reth
|
||||
reth-evm-optimism.workspace = true
|
||||
reth-optimism-consensus.workspace = true
|
||||
reth-optimism-evm.workspace = true
|
||||
reth-optimism-forks.workspace = true
|
||||
|
||||
# ethereum
|
||||
@ -51,6 +51,6 @@ optimism = [
|
||||
"reth-primitives/optimism",
|
||||
"reth-provider/optimism",
|
||||
"reth-rpc-types-compat/optimism",
|
||||
"reth-evm-optimism/optimism",
|
||||
"reth-optimism-evm/optimism",
|
||||
"reth-revm/optimism",
|
||||
]
|
||||
|
||||
@ -224,7 +224,7 @@ where
|
||||
// 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
|
||||
// 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(),
|
||||
attributes.payload_attributes.timestamp,
|
||||
&mut db,
|
||||
|
||||
@ -28,8 +28,8 @@ reth-node-builder.workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
|
||||
# op-reth
|
||||
reth-evm-optimism.workspace = true
|
||||
reth-optimism-consensus.workspace = true
|
||||
reth-optimism-evm.workspace = true
|
||||
reth-optimism-forks.workspace = true
|
||||
|
||||
# ethereum
|
||||
@ -60,7 +60,7 @@ reth-optimism-chainspec.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = [
|
||||
"reth-evm-optimism/optimism",
|
||||
"reth-optimism-evm/optimism",
|
||||
"reth-primitives/optimism",
|
||||
"reth-provider/optimism",
|
||||
"reth-rpc-eth-api/optimism",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
use alloy_rpc_types::error::EthRpcErrorCode;
|
||||
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_rpc_eth_api::AsEthApiError;
|
||||
use reth_rpc_eth_types::EthApiError;
|
||||
|
||||
@ -44,7 +44,7 @@ where
|
||||
let block = block.unseal();
|
||||
|
||||
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
|
||||
.body
|
||||
|
||||
@ -6,8 +6,8 @@ use op_alloy_rpc_types::{
|
||||
receipt::L1BlockInfo, OpTransactionReceipt, OptimismTransactionReceiptFields,
|
||||
};
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_evm_optimism::RethL1BlockInfo;
|
||||
use reth_node_api::{FullNodeComponents, NodeTypes};
|
||||
use reth_optimism_evm::RethL1BlockInfo;
|
||||
use reth_optimism_forks::OptimismHardforks;
|
||||
use reth_primitives::{Receipt, TransactionMeta, TransactionSigned, TxType};
|
||||
use reth_provider::ChainSpecProvider;
|
||||
@ -42,7 +42,7 @@ where
|
||||
|
||||
let block = block.unseal();
|
||||
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(
|
||||
&self.inner.provider().chain_spec(),
|
||||
@ -355,7 +355,7 @@ mod test {
|
||||
};
|
||||
|
||||
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
|
||||
assert!(OP_MAINNET.is_fjord_active_at_timestamp(BLOCK_124665056_TIMESTAMP));
|
||||
|
||||
Reference in New Issue
Block a user