mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(engine): replace reth_primitives with alloy_primitives (#11064)
Signed-off-by: Abhishekkochar <abhishekkochar2@gmail.com>
This commit is contained in:
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -6951,6 +6951,7 @@ dependencies = [
|
||||
name = "reth-engine-local"
|
||||
version = "1.0.7"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"eyre",
|
||||
"futures-util",
|
||||
"reth-beacon-consensus",
|
||||
@ -6980,6 +6981,7 @@ dependencies = [
|
||||
name = "reth-engine-primitives"
|
||||
version = "1.0.7"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"reth-chainspec",
|
||||
"reth-execution-types",
|
||||
"reth-payload-primitives",
|
||||
@ -7020,6 +7022,8 @@ dependencies = [
|
||||
name = "reth-engine-tree"
|
||||
version = "1.0.7"
|
||||
dependencies = [
|
||||
"alloy-eips",
|
||||
"alloy-primitives",
|
||||
"alloy-rlp",
|
||||
"assert_matches",
|
||||
"futures",
|
||||
@ -7065,6 +7069,7 @@ dependencies = [
|
||||
name = "reth-engine-util"
|
||||
version = "1.0.7"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"eyre",
|
||||
"futures",
|
||||
"itertools 0.13.0",
|
||||
@ -7424,6 +7429,7 @@ dependencies = [
|
||||
name = "reth-invalid-block-hooks"
|
||||
version = "1.0.7"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"alloy-rlp",
|
||||
"alloy-rpc-types-debug",
|
||||
"eyre",
|
||||
|
||||
@ -23,6 +23,7 @@ reth-tracing.workspace = true
|
||||
reth-trie = { workspace = true, features = ["serde"] }
|
||||
|
||||
# alloy
|
||||
alloy-primitives.workspace = true
|
||||
alloy-rlp.workspace = true
|
||||
alloy-rpc-types-debug.workspace = true
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
use std::{collections::HashMap, fmt::Debug, fs::File, io::Write, path::PathBuf};
|
||||
|
||||
use alloy_primitives::{keccak256, B256, U256};
|
||||
use alloy_rpc_types_debug::ExecutionWitness;
|
||||
use eyre::OptionExt;
|
||||
use pretty_assertions::Comparison;
|
||||
@ -9,9 +10,7 @@ use reth_evm::{
|
||||
system_calls::{apply_beacon_root_contract_call, apply_blockhashes_contract_call},
|
||||
ConfigureEvm,
|
||||
};
|
||||
use reth_primitives::{
|
||||
keccak256, Header, Receipt, SealedBlockWithSenders, SealedHeader, B256, U256,
|
||||
};
|
||||
use reth_primitives::{Header, Receipt, SealedBlockWithSenders, SealedHeader};
|
||||
use reth_provider::{BlockExecutionOutput, ChainSpecProvider, StateProviderFactory};
|
||||
use reth_revm::{
|
||||
database::StateProviderDatabase,
|
||||
|
||||
@ -21,6 +21,9 @@ reth-prune.workspace = true
|
||||
reth-transaction-pool.workspace = true
|
||||
reth-stages-api.workspace = true
|
||||
|
||||
# alloy
|
||||
alloy-primitives.workspace = true
|
||||
|
||||
# async
|
||||
tokio.workspace = true
|
||||
tokio-stream.workspace = true
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//! Contains the implementation of the mining mode for the local engine.
|
||||
|
||||
use alloy_primitives::TxHash;
|
||||
use futures_util::{stream::Fuse, StreamExt};
|
||||
use reth_primitives::TxHash;
|
||||
use reth_transaction_pool::TransactionPool;
|
||||
use std::{
|
||||
future::Future,
|
||||
|
||||
@ -7,13 +7,13 @@
|
||||
//! building at a fixed interval.
|
||||
|
||||
use crate::miner::MiningMode;
|
||||
use alloy_primitives::B256;
|
||||
use reth_beacon_consensus::EngineNodeTypes;
|
||||
use reth_engine_tree::persistence::PersistenceHandle;
|
||||
use reth_payload_builder::PayloadBuilderHandle;
|
||||
use reth_payload_primitives::{
|
||||
BuiltPayload, PayloadAttributesBuilder, PayloadBuilderAttributes, PayloadTypes,
|
||||
};
|
||||
use reth_primitives::B256;
|
||||
use reth_provider::ProviderFactory;
|
||||
use reth_prune::PrunerWithFactory;
|
||||
use reth_stages_api::MetricEventsSender;
|
||||
@ -157,6 +157,7 @@ where
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use alloy_primitives::B256;
|
||||
use reth_chainspec::MAINNET;
|
||||
use reth_config::PruneConfig;
|
||||
use reth_db::test_utils::{create_test_rw_db, create_test_static_files_dir};
|
||||
@ -164,7 +165,6 @@ mod tests {
|
||||
use reth_exex_test_utils::TestNode;
|
||||
use reth_node_types::NodeTypesWithDBAdapter;
|
||||
use reth_payload_builder::test_utils::spawn_test_payload_service;
|
||||
use reth_primitives::B256;
|
||||
use reth_provider::{providers::StaticFileProvider, BlockReader, ProviderFactory};
|
||||
use reth_prune::PrunerBuilder;
|
||||
use reth_transaction_pool::{
|
||||
|
||||
@ -18,5 +18,8 @@ reth-payload-primitives.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-trie.workspace = true
|
||||
|
||||
# alloy
|
||||
alloy-primitives.workspace = true
|
||||
|
||||
# misc
|
||||
serde.workspace = true
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
use alloy_primitives::B256;
|
||||
use reth_execution_types::BlockExecutionOutput;
|
||||
use reth_primitives::{Receipt, SealedBlockWithSenders, SealedHeader, B256};
|
||||
use reth_primitives::{Receipt, SealedBlockWithSenders, SealedHeader};
|
||||
use reth_trie::updates::TrieUpdates;
|
||||
|
||||
/// An invalid block hook.
|
||||
|
||||
@ -35,6 +35,10 @@ reth-tasks.workspace = true
|
||||
reth-trie.workspace = true
|
||||
reth-trie-parallel.workspace = true
|
||||
|
||||
# alloy
|
||||
alloy-primitives.workspace = true
|
||||
alloy-eips.workspace = true
|
||||
|
||||
# common
|
||||
futures.workspace = true
|
||||
tokio = { workspace = true, features = ["macros", "sync"] }
|
||||
|
||||
@ -230,11 +230,12 @@ impl<N: ProviderNodeTypes> PipelineState<N> {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::test_utils::{insert_headers_into_client, TestPipelineBuilder};
|
||||
use alloy_primitives::{BlockNumber, B256};
|
||||
use assert_matches::assert_matches;
|
||||
use futures::poll;
|
||||
use reth_chainspec::{ChainSpecBuilder, MAINNET};
|
||||
use reth_network_p2p::test_utils::TestFullBlockClient;
|
||||
use reth_primitives::{BlockNumber, Header, B256};
|
||||
use reth_primitives::Header;
|
||||
use reth_provider::test_utils::MockNodeTypesWithDB;
|
||||
use reth_stages::ExecOutput;
|
||||
use reth_stages_api::StageCheckpoint;
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
//! Handler that can download blocks on demand (e.g. from the network).
|
||||
|
||||
use crate::{engine::DownloadRequest, metrics::BlockDownloaderMetrics};
|
||||
use alloy_primitives::B256;
|
||||
use futures::FutureExt;
|
||||
use reth_consensus::Consensus;
|
||||
use reth_network_p2p::{
|
||||
full_block::{FetchFullBlockFuture, FetchFullBlockRangeFuture, FullBlockClient},
|
||||
BlockClient,
|
||||
};
|
||||
use reth_primitives::{SealedBlock, SealedBlockWithSenders, B256};
|
||||
use reth_primitives::{SealedBlock, SealedBlockWithSenders};
|
||||
use std::{
|
||||
cmp::{Ordering, Reverse},
|
||||
collections::{binary_heap::PeekMut, BinaryHeap, HashSet, VecDeque},
|
||||
|
||||
@ -5,11 +5,12 @@ use crate::{
|
||||
chain::{ChainHandler, FromOrchestrator, HandlerEvent},
|
||||
download::{BlockDownloader, DownloadAction, DownloadOutcome},
|
||||
};
|
||||
use alloy_primitives::B256;
|
||||
use futures::{Stream, StreamExt};
|
||||
use reth_beacon_consensus::{BeaconConsensusEngineEvent, BeaconEngineMessage};
|
||||
use reth_chain_state::ExecutedBlock;
|
||||
use reth_engine_primitives::EngineTypes;
|
||||
use reth_primitives::{SealedBlockWithSenders, B256};
|
||||
use reth_primitives::SealedBlockWithSenders;
|
||||
use std::{
|
||||
collections::HashSet,
|
||||
fmt::Display,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
use crate::metrics::PersistenceMetrics;
|
||||
use alloy_eips::BlockNumHash;
|
||||
use reth_chain_state::ExecutedBlock;
|
||||
use reth_errors::ProviderError;
|
||||
use reth_primitives::BlockNumHash;
|
||||
use reth_provider::{
|
||||
providers::ProviderNodeTypes, writer::UnifiedStorageWriter, BlockHashReader,
|
||||
DatabaseProviderFactory, ProviderFactory, StaticFileProviderFactory,
|
||||
@ -264,9 +264,9 @@ impl PersistenceHandle {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use alloy_primitives::B256;
|
||||
use reth_chain_state::test_utils::TestBlockBuilder;
|
||||
use reth_exex_types::FinishedExExHeight;
|
||||
use reth_primitives::B256;
|
||||
use reth_provider::test_utils::create_test_provider_factory;
|
||||
use reth_prune::Pruner;
|
||||
use tokio::sync::mpsc::unbounded_channel;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
use alloy_primitives::B256;
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_network_p2p::test_utils::TestFullBlockClient;
|
||||
use reth_primitives::{BlockBody, SealedHeader, B256};
|
||||
use reth_primitives::{BlockBody, SealedHeader};
|
||||
use reth_provider::{
|
||||
test_utils::{create_test_provider_factory_with_chain_spec, MockNodeTypesWithDB},
|
||||
ExecutionOutcome,
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
use alloy_primitives::B256;
|
||||
use reth_engine_primitives::InvalidBlockHook;
|
||||
use reth_primitives::{Receipt, SealedBlockWithSenders, SealedHeader, B256};
|
||||
use reth_primitives::{Receipt, SealedBlockWithSenders, SealedHeader};
|
||||
use reth_provider::BlockExecutionOutput;
|
||||
use reth_trie::updates::TrieUpdates;
|
||||
|
||||
|
||||
@ -4,6 +4,8 @@ use crate::{
|
||||
engine::{DownloadRequest, EngineApiEvent, FromEngine},
|
||||
persistence::PersistenceHandle,
|
||||
};
|
||||
use alloy_eips::BlockNumHash;
|
||||
use alloy_primitives::{BlockNumber, B256, U256};
|
||||
use reth_beacon_consensus::{
|
||||
BeaconConsensusEngineEvent, BeaconEngineMessage, ForkchoiceStateTracker, InvalidHeaderCache,
|
||||
OnForkChoiceUpdated, MIN_BLOCKS_FOR_PIPELINE_RUN,
|
||||
@ -24,8 +26,7 @@ use reth_payload_builder::PayloadBuilderHandle;
|
||||
use reth_payload_primitives::{PayloadAttributes, PayloadBuilderAttributes};
|
||||
use reth_payload_validator::ExecutionPayloadValidator;
|
||||
use reth_primitives::{
|
||||
Block, BlockNumHash, BlockNumber, GotExpected, Header, SealedBlock, SealedBlockWithSenders,
|
||||
SealedHeader, B256, U256,
|
||||
Block, GotExpected, Header, SealedBlock, SealedBlockWithSenders, SealedHeader,
|
||||
};
|
||||
use reth_provider::{
|
||||
providers::ConsistentDbView, BlockReader, DatabaseProviderFactory, ExecutionOutcome,
|
||||
@ -2583,13 +2584,13 @@ impl PersistenceState {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::persistence::PersistenceAction;
|
||||
use alloy_primitives::Bytes;
|
||||
use alloy_rlp::Decodable;
|
||||
use reth_beacon_consensus::{EthBeaconConsensus, ForkchoiceStatus};
|
||||
use reth_chain_state::{test_utils::TestBlockBuilder, BlockState};
|
||||
use reth_chainspec::{ChainSpec, HOLESKY, MAINNET};
|
||||
use reth_ethereum_engine_primitives::EthEngineTypes;
|
||||
use reth_evm::test_utils::MockExecutorProvider;
|
||||
use reth_primitives::Bytes;
|
||||
use reth_provider::test_utils::MockEthProvider;
|
||||
use reth_rpc_types_compat::engine::{block_to_payload_v1, payload::block_to_payload_v3};
|
||||
use reth_trie::updates::TrieUpdates;
|
||||
|
||||
@ -27,6 +27,9 @@ reth-ethereum-forks.workspace = true
|
||||
revm-primitives.workspace = true
|
||||
reth-trie.workspace = true
|
||||
|
||||
# alloy
|
||||
alloy-primitives.workspace = true
|
||||
|
||||
# async
|
||||
tokio = { workspace = true, default-features = false }
|
||||
tokio-util.workspace = true
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
//! Stream wrapper that simulates reorgs.
|
||||
|
||||
use alloy_primitives::U256;
|
||||
use futures::{stream::FuturesUnordered, Stream, StreamExt, TryFutureExt};
|
||||
use itertools::Either;
|
||||
use reth_beacon_consensus::{BeaconEngineMessage, BeaconOnNewPayloadError, OnForkChoiceUpdated};
|
||||
@ -9,7 +10,7 @@ use reth_ethereum_forks::EthereumHardforks;
|
||||
use reth_evm::{system_calls::apply_beacon_root_contract_call, ConfigureEvm};
|
||||
use reth_payload_validator::ExecutionPayloadValidator;
|
||||
use reth_primitives::{
|
||||
eip4844::calculate_excess_blob_gas, proofs, Block, Header, Receipt, Receipts, U256,
|
||||
eip4844::calculate_excess_blob_gas, proofs, Block, Header, Receipt, Receipts,
|
||||
};
|
||||
use reth_provider::{BlockReader, ExecutionOutcome, ProviderError, StateProviderFactory};
|
||||
use reth_revm::{
|
||||
|
||||
Reference in New Issue
Block a user