chore(exex): replace reth-primitives with alloy (#11104)

Signed-off-by: Abhishekkochar <abhishekkochar2@gmail.com>
This commit is contained in:
Abhishek kochar
2024-09-23 14:32:01 +08:00
committed by GitHub
parent 875e0e5b11
commit 242a3ab06b
10 changed files with 19 additions and 11 deletions

View File

@ -30,6 +30,9 @@ reth-stages-api.workspace = true
reth-tasks.workspace = true
reth-tracing.workspace = true
# alloy
alloy-primitives.workspace = true
## async
futures.workspace = true
tokio-util.workspace = true

View File

@ -1,8 +1,8 @@
use crate::BackfillJob;
use std::ops::RangeInclusive;
use alloy_primitives::BlockNumber;
use reth_node_api::FullNodeComponents;
use reth_primitives::BlockNumber;
use reth_prune_types::PruneModes;
use reth_stages_api::ExecutionStageThresholds;

View File

@ -4,10 +4,11 @@ use std::{
time::{Duration, Instant},
};
use alloy_primitives::BlockNumber;
use reth_evm::execute::{
BatchExecutor, BlockExecutionError, BlockExecutionOutput, BlockExecutorProvider, Executor,
};
use reth_primitives::{Block, BlockNumber, BlockWithSenders, Receipt};
use reth_primitives::{Block, BlockWithSenders, Receipt};
use reth_primitives_traits::format_gas_throughput;
use reth_provider::{
BlockReader, Chain, HeaderProvider, ProviderError, StateProviderFactory, TransactionVariant,

View File

@ -5,12 +5,13 @@ use std::{
task::{ready, Context, Poll},
};
use alloy_primitives::BlockNumber;
use futures::{
stream::{FuturesOrdered, Stream},
StreamExt,
};
use reth_evm::execute::{BlockExecutionError, BlockExecutionOutput, BlockExecutorProvider};
use reth_primitives::{BlockNumber, BlockWithSenders, Receipt};
use reth_primitives::{BlockWithSenders, Receipt};
use reth_provider::{BlockReader, Chain, HeaderProvider, StateProviderFactory};
use reth_prune_types::PruneModes;
use reth_stages_api::ExecutionStageThresholds;

View File

@ -1,5 +1,6 @@
use std::sync::Arc;
use alloy_primitives::{b256, Address, TxKind, U256};
use eyre::OptionExt;
use reth_chainspec::{ChainSpec, ChainSpecBuilder, EthereumHardfork, MAINNET, MIN_TRANSACTION_GAS};
use reth_evm::execute::{
@ -7,8 +8,8 @@ use reth_evm::execute::{
};
use reth_evm_ethereum::execute::EthExecutorProvider;
use reth_primitives::{
b256, constants::ETH_TO_WEI, Address, Block, BlockWithSenders, Genesis, GenesisAccount, Header,
Receipt, Requests, SealedBlockWithSenders, Transaction, TxEip2930, TxKind, U256,
constants::ETH_TO_WEI, Block, BlockWithSenders, Genesis, GenesisAccount, Header, Receipt,
Requests, SealedBlockWithSenders, Transaction, TxEip2930,
};
use reth_provider::{
providers::ProviderNodeTypes, BlockWriter as _, ExecutionOutcome, LatestStateProviderRef,

View File

@ -1,4 +1,4 @@
use reth_primitives::BlockNumber;
use alloy_primitives::BlockNumber;
/// Events emitted by an `ExEx`.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]

View File

@ -1,6 +1,7 @@
use crate::{
BackfillJobFactory, ExExEvent, ExExNotification, FinishedExExHeight, StreamBackfillJob,
};
use alloy_primitives::{BlockNumber, U256};
use eyre::OptionExt;
use futures::{Stream, StreamExt};
use metrics::Gauge;
@ -8,7 +9,6 @@ use reth_chainspec::Head;
use reth_evm::execute::BlockExecutorProvider;
use reth_exex_types::ExExHead;
use reth_metrics::{metrics::Counter, Metrics};
use reth_primitives::{BlockNumber, U256};
use reth_provider::{BlockReader, Chain, HeaderProvider, StateProviderFactory};
use reth_tracing::tracing::debug;
use std::{
@ -809,10 +809,11 @@ impl Clone for ExExManagerHandle {
#[cfg(test)]
mod tests {
use super::*;
use alloy_primitives::B256;
use futures::StreamExt;
use reth_db_common::init::init_genesis;
use reth_evm_ethereum::execute::EthExecutorProvider;
use reth_primitives::{Block, BlockNumHash, Header, SealedBlockWithSenders, B256};
use reth_primitives::{Block, BlockNumHash, Header, SealedBlockWithSenders};
use reth_provider::{
providers::BlockchainProvider2, test_utils::create_test_provider_factory, BlockReader,
BlockWriter, Chain,

View File

@ -13,11 +13,11 @@ workspace = true
[dependencies]
# reth
reth-primitives.workspace = true
reth-provider.workspace = true
# reth
alloy-primitives.workspace = true
alloy-eips.workspace = true
# misc
serde = { workspace = true, optional = true }

View File

@ -1,4 +1,4 @@
use reth_primitives::BlockNumHash;
use alloy_eips::BlockNumHash;
/// A head of the ExEx. It determines the highest block committed to the internal ExEx state.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]