chore: make op-node-testing- leaner (#12958)

This commit is contained in:
Matthias Seitz
2024-11-28 13:48:36 +01:00
committed by GitHub
parent c274462059
commit 1d5bd46594
13 changed files with 99 additions and 94 deletions

View File

@ -32,6 +32,7 @@ reth-revm = { workspace = true, features = ["std"] }
reth-beacon-consensus.workspace = true
reth-trie-db.workspace = true
reth-rpc-server-types.workspace = true
reth-tasks = { workspace = true, optional = true }
# op-reth
reth-optimism-payload-builder.workspace = true
@ -62,7 +63,6 @@ parking_lot.workspace = true
serde_json.workspace = true
# test-utils dependencies
reth = { workspace = true, optional = true }
reth-e2e-test-utils = { workspace = true, optional = true }
alloy-genesis = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
@ -70,9 +70,12 @@ tokio = { workspace = true, optional = true }
[dev-dependencies]
reth-optimism-node = { workspace = true, features = ["test-utils"] }
reth-db.workspace = true
reth-node-core.workspace = true
reth-node-builder = { workspace = true, features = ["test-utils"] }
reth-provider = { workspace = true, features = ["test-utils"] }
reth-revm = { workspace = true, features = ["test-utils"] }
reth-tasks.workspace = true
alloy-primitives.workspace = true
op-alloy-consensus.workspace = true
alloy-signer-local.workspace = true
@ -82,27 +85,28 @@ futures.workspace = true
[features]
optimism = [
"reth-primitives/optimism",
"reth-provider/optimism",
"reth-optimism-evm/optimism",
"reth-optimism-payload-builder/optimism",
"reth-beacon-consensus/optimism",
"revm/optimism",
"reth-optimism-rpc/optimism",
"reth-engine-local/optimism",
"reth-optimism-consensus/optimism",
"reth-db/optimism",
"reth-optimism-node/optimism",
"reth-primitives/optimism",
"reth-provider/optimism",
"reth-optimism-evm/optimism",
"reth-optimism-payload-builder/optimism",
"reth-beacon-consensus/optimism",
"revm/optimism",
"reth-optimism-rpc/optimism",
"reth-engine-local/optimism",
"reth-optimism-consensus/optimism",
"reth-db/optimism",
"reth-optimism-node/optimism",
"reth-node-core/optimism"
]
asm-keccak = [
"reth-primitives/asm-keccak",
"reth/asm-keccak",
"alloy-primitives/asm-keccak",
"revm/asm-keccak",
"reth-optimism-node/asm-keccak",
"reth-primitives/asm-keccak",
"alloy-primitives/asm-keccak",
"revm/asm-keccak",
"reth-optimism-node/asm-keccak",
"reth-node-core/asm-keccak"
]
test-utils = [
"reth",
"reth-tasks",
"reth-e2e-test-utils",
"alloy-genesis",
"tokio",
@ -125,4 +129,4 @@ test-utils = [
reth-codec = [
"reth-primitives/reth-codec",
"reth-optimism-primitives/reth-codec",
]
]

View File

@ -1,12 +1,13 @@
use crate::{node::OpAddOns, OpBuiltPayload, OpNode as OtherOpNode, OpPayloadBuilderAttributes};
use alloy_genesis::Genesis;
use alloy_primitives::{Address, B256};
use reth::{rpc::types::engine::PayloadAttributes, tasks::TaskManager};
use alloy_rpc_types_engine::PayloadAttributes;
use reth_e2e_test_utils::{
transaction::TransactionTestContext, wallet::Wallet, Adapter, NodeHelperType,
};
use reth_optimism_chainspec::OpChainSpecBuilder;
use reth_payload_builder::EthPayloadBuilderAttributes;
use reth_tasks::TaskManager;
use std::sync::Arc;
use tokio::sync::Mutex;

View File

@ -1,6 +1,5 @@
use alloy_rpc_types_engine::PayloadStatusEnum;
use futures::StreamExt;
use reth::blockchain_tree::error::BlockchainTreeError;
use reth_optimism_node::utils::{advance_chain, setup};
use std::sync::Arc;
use tokio::sync::Mutex;
@ -90,10 +89,10 @@ async fn can_sync() -> eyre::Result<()> {
canonical_payload_chain[tip_index - reorg_depth + 1].0.clone(),
canonical_payload_chain[tip_index - reorg_depth + 1].1.clone(),
PayloadStatusEnum::Invalid {
validation_error: BlockchainTreeError::PendingBlockIsFinalized {
last_finalized: (tip - reorg_depth) as u64 + 1,
}
.to_string(),
validation_error: format!(
"block number is lower than the last finalized block number {}",
(tip - reorg_depth) as u64 + 1
),
},
)
.await;

View File

@ -4,7 +4,6 @@ use alloy_consensus::TxEip1559;
use alloy_genesis::Genesis;
use alloy_network::TxSignerSync;
use alloy_primitives::{Address, ChainId, TxKind};
use reth::{args::DatadirArgs, tasks::TaskManager};
use reth_chainspec::EthChainSpec;
use reth_db::test_utils::create_test_rw_db_with_path;
use reth_e2e_test_utils::{
@ -14,6 +13,7 @@ use reth_node_api::{FullNodeTypes, NodeTypesWithEngine};
use reth_node_builder::{
components::ComponentsBuilder, EngineNodeLauncher, NodeBuilder, NodeConfig,
};
use reth_node_core::args::DatadirArgs;
use reth_optimism_chainspec::{OpChainSpec, OpChainSpecBuilder};
use reth_optimism_node::{
args::RollupArgs,
@ -29,6 +29,7 @@ use reth_optimism_primitives::OpPrimitives;
use reth_payload_util::{PayloadTransactions, PayloadTransactionsChain, PayloadTransactionsFixed};
use reth_primitives::{SealedBlock, Transaction, TransactionSigned, TransactionSignedEcRecovered};
use reth_provider::providers::BlockchainProvider2;
use reth_tasks::TaskManager;
use reth_transaction_pool::pool::BestPayloadTransactions;
use std::sync::Arc;
use tokio::sync::Mutex;