primitives: rm alloy Withdrawals reexport (#12421)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Thomas Coratger
2024-11-09 14:09:46 +01:00
committed by GitHub
parent ae257f5685
commit 59ebebaa63
32 changed files with 104 additions and 71 deletions

View File

@ -18,6 +18,7 @@ reth-primitives-traits.workspace = true
# ethereum
alloy-primitives.workspace = true
alloy-eips.workspace = true
# codecs
modular-bitfield.workspace = true
@ -42,14 +43,15 @@ test-fuzz.workspace = true
[features]
test-utils = [
"reth-primitives-traits/test-utils",
"arbitrary",
"reth-codecs/test-utils"
"reth-primitives-traits/test-utils",
"arbitrary",
"reth-codecs/test-utils",
]
arbitrary = [
"reth-primitives-traits/arbitrary",
"dep:arbitrary",
"dep:proptest",
"alloy-primitives/arbitrary",
"reth-codecs/arbitrary"
"reth-primitives-traits/arbitrary",
"dep:arbitrary",
"dep:proptest",
"alloy-primitives/arbitrary",
"alloy-eips/arbitrary",
"reth-codecs/arbitrary",
]

View File

@ -1,8 +1,8 @@
use std::ops::Range;
use alloy_eips::eip4895::Withdrawals;
use alloy_primitives::TxNumber;
use reth_codecs::{add_arbitrary_tests, Compact};
use reth_primitives_traits::Withdrawals;
use serde::{Deserialize, Serialize};
/// Total number of transactions.

View File

@ -9,7 +9,10 @@ use crate::{
StageCheckpointReader, StateProviderBox, StateProviderFactory, StateReader,
StaticFileProviderFactory, TransactionVariant, TransactionsProvider, WithdrawalsProvider,
};
use alloy_eips::{eip4895::Withdrawal, BlockHashOrNumber, BlockId, BlockNumHash, BlockNumberOrTag};
use alloy_eips::{
eip4895::{Withdrawal, Withdrawals},
BlockHashOrNumber, BlockId, BlockNumHash, BlockNumberOrTag,
};
use alloy_primitives::{Address, BlockHash, BlockNumber, Sealable, TxHash, TxNumber, B256, U256};
use alloy_rpc_types_engine::ForkchoiceState;
use reth_chain_state::{
@ -25,7 +28,6 @@ use reth_node_types::NodeTypesWithDB;
use reth_primitives::{
Account, Block, BlockWithSenders, Header, Receipt, SealedBlock, SealedBlockWithSenders,
SealedHeader, StorageEntry, TransactionMeta, TransactionSigned, TransactionSignedNoHash,
Withdrawals,
};
use reth_prune_types::{PruneCheckpoint, PruneSegment};
use reth_stages_types::{StageCheckpoint, StageId};
@ -768,7 +770,7 @@ mod tests {
BlockWriter, CanonChainTracker, ProviderFactory, StaticFileProviderFactory,
StaticFileWriter,
};
use alloy_eips::{BlockHashOrNumber, BlockNumHash, BlockNumberOrTag};
use alloy_eips::{eip4895::Withdrawals, BlockHashOrNumber, BlockNumHash, BlockNumberOrTag};
use alloy_primitives::{BlockNumber, TxNumber, B256};
use itertools::Itertools;
use rand::Rng;
@ -786,9 +788,7 @@ mod tests {
use reth_db_api::{cursor::DbCursorRO, transaction::DbTx};
use reth_errors::ProviderError;
use reth_execution_types::{Chain, ExecutionOutcome};
use reth_primitives::{
Receipt, SealedBlock, StaticFileSegment, TransactionSignedNoHash, Withdrawals,
};
use reth_primitives::{Receipt, SealedBlock, StaticFileSegment, TransactionSignedNoHash};
use reth_storage_api::{
BlockHashReader, BlockIdReader, BlockNumReader, BlockReader, BlockReaderIdExt, BlockSource,
ChangeSetReader, DatabaseProviderFactory, HeaderProvider, ReceiptProvider,

View File

@ -7,7 +7,8 @@ use crate::{
TransactionsProvider, WithdrawalsProvider,
};
use alloy_eips::{
eip4895::Withdrawal, BlockHashOrNumber, BlockId, BlockNumHash, BlockNumberOrTag, HashOrNumber,
eip4895::{Withdrawal, Withdrawals},
BlockHashOrNumber, BlockId, BlockNumHash, BlockNumberOrTag, HashOrNumber,
};
use alloy_primitives::{Address, BlockHash, BlockNumber, Sealable, TxHash, TxNumber, B256, U256};
use reth_chain_state::{BlockState, CanonicalInMemoryState, MemoryOverlayStateProviderRef};
@ -19,7 +20,6 @@ use reth_execution_types::{BundleStateInit, ExecutionOutcome, RevertsInit};
use reth_primitives::{
Account, Block, BlockWithSenders, Header, Receipt, SealedBlock, SealedBlockWithSenders,
SealedHeader, StorageEntry, TransactionMeta, TransactionSigned, TransactionSignedNoHash,
Withdrawals,
};
use reth_prune_types::{PruneCheckpoint, PruneSegment};
use reth_stages_types::{StageCheckpoint, StageId};

View File

@ -7,7 +7,10 @@ use crate::{
PruneCheckpointReader, StageCheckpointReader, StateProviderBox, StaticFileProviderFactory,
TransactionVariant, TransactionsProvider, WithdrawalsProvider,
};
use alloy_eips::{eip4895::Withdrawal, BlockHashOrNumber};
use alloy_eips::{
eip4895::{Withdrawal, Withdrawals},
BlockHashOrNumber,
};
use alloy_primitives::{Address, BlockHash, BlockNumber, TxHash, TxNumber, B256, U256};
use core::fmt;
use reth_chainspec::{ChainInfo, EthereumHardforks};
@ -18,7 +21,7 @@ use reth_evm::ConfigureEvmEnv;
use reth_node_types::NodeTypesWithDB;
use reth_primitives::{
Block, BlockWithSenders, Header, Receipt, SealedBlock, SealedBlockWithSenders, SealedHeader,
StaticFileSegment, TransactionMeta, TransactionSigned, TransactionSignedNoHash, Withdrawals,
StaticFileSegment, TransactionMeta, TransactionSigned, TransactionSignedNoHash,
};
use reth_prune_types::{PruneCheckpoint, PruneModes, PruneSegment};
use reth_stages_types::{StageCheckpoint, StageId};

View File

@ -15,7 +15,10 @@ use crate::{
StaticFileProviderFactory, StatsReader, StorageReader, StorageTrieWriter, TransactionVariant,
TransactionsProvider, TransactionsProviderExt, TrieWriter, WithdrawalsProvider,
};
use alloy_eips::{eip4895::Withdrawal, BlockHashOrNumber};
use alloy_eips::{
eip4895::{Withdrawal, Withdrawals},
BlockHashOrNumber,
};
use alloy_primitives::{keccak256, Address, BlockHash, BlockNumber, TxHash, TxNumber, B256, U256};
use itertools::{izip, Itertools};
use rayon::slice::ParallelSliceMut;
@ -42,7 +45,6 @@ use reth_primitives::{
Account, Block, BlockBody, BlockWithSenders, Bytecode, GotExpected, Header, Receipt,
SealedBlock, SealedBlockWithSenders, SealedHeader, StaticFileSegment, StorageEntry,
TransactionMeta, TransactionSigned, TransactionSignedEcRecovered, TransactionSignedNoHash,
Withdrawals,
};
use reth_prune_types::{PruneCheckpoint, PruneModes, PruneSegment};
use reth_stages_types::{StageCheckpoint, StageId};

View File

@ -7,7 +7,10 @@ use crate::{
StageCheckpointReader, StateProviderBox, StateProviderFactory, StaticFileProviderFactory,
TransactionVariant, TransactionsProvider, TreeViewer, WithdrawalsProvider,
};
use alloy_eips::{eip4895::Withdrawal, BlockHashOrNumber, BlockId, BlockNumHash, BlockNumberOrTag};
use alloy_eips::{
eip4895::{Withdrawal, Withdrawals},
BlockHashOrNumber, BlockId, BlockNumHash, BlockNumberOrTag,
};
use alloy_primitives::{Address, BlockHash, BlockNumber, Sealable, TxHash, TxNumber, B256, U256};
use reth_blockchain_tree_api::{
error::{CanonicalError, InsertBlockError},
@ -21,7 +24,7 @@ use reth_evm::ConfigureEvmEnv;
use reth_node_types::NodeTypesWithDB;
use reth_primitives::{
Account, Block, BlockWithSenders, Header, Receipt, SealedBlock, SealedBlockWithSenders,
SealedHeader, TransactionMeta, TransactionSigned, TransactionSignedNoHash, Withdrawals,
SealedHeader, TransactionMeta, TransactionSigned, TransactionSignedNoHash,
};
use reth_prune_types::{PruneCheckpoint, PruneSegment};
use reth_stages_types::{StageCheckpoint, StageId};

View File

@ -7,7 +7,10 @@ use crate::{
ReceiptProvider, StageCheckpointReader, StatsReader, TransactionVariant, TransactionsProvider,
TransactionsProviderExt, WithdrawalsProvider,
};
use alloy_eips::{eip4895::Withdrawal, BlockHashOrNumber};
use alloy_eips::{
eip4895::{Withdrawal, Withdrawals},
BlockHashOrNumber,
};
use alloy_primitives::{keccak256, Address, BlockHash, BlockNumber, TxHash, TxNumber, B256, U256};
use dashmap::DashMap;
use notify::{RecommendedWatcher, RecursiveMode, Watcher};
@ -31,7 +34,7 @@ use reth_primitives::{
DEFAULT_BLOCKS_PER_STATIC_FILE,
},
Block, BlockWithSenders, Header, Receipt, SealedBlock, SealedBlockWithSenders, SealedHeader,
StaticFileSegment, TransactionMeta, TransactionSigned, TransactionSignedNoHash, Withdrawals,
StaticFileSegment, TransactionMeta, TransactionSigned, TransactionSignedNoHash,
};
use reth_stages_types::{PipelineTarget, StageId};
use reth_storage_api::DBProvider;

View File

@ -6,14 +6,14 @@ use alloy_primitives::{
U256,
};
use alloy_eips::eip4895::Withdrawal;
use alloy_eips::eip4895::{Withdrawal, Withdrawals};
use alloy_primitives::PrimitiveSignature as Signature;
use reth_db::tables;
use reth_db_api::{database::Database, models::StoredBlockBodyIndices};
use reth_node_types::NodeTypes;
use reth_primitives::{
Account, BlockBody, Header, Receipt, SealedBlock, SealedBlockWithSenders, SealedHeader,
Transaction, TransactionSigned, TxType, Withdrawals,
Transaction, TransactionSigned, TxType,
};
use reth_trie::root::{state_root_unhashed, storage_root_unhashed};
use revm::{db::BundleState, primitives::AccountInfo};

View File

@ -6,7 +6,10 @@ use crate::{
StateRootProvider, TransactionVariant, TransactionsProvider, WithdrawalsProvider,
};
use alloy_consensus::constants::EMPTY_ROOT_HASH;
use alloy_eips::{eip4895::Withdrawal, BlockHashOrNumber, BlockId, BlockNumberOrTag};
use alloy_eips::{
eip4895::{Withdrawal, Withdrawals},
BlockHashOrNumber, BlockId, BlockNumberOrTag,
};
use alloy_primitives::{
keccak256,
map::{HashMap, HashSet},
@ -23,7 +26,7 @@ use reth_node_types::NodeTypes;
use reth_primitives::{
Account, Block, BlockWithSenders, Bytecode, GotExpected, Header, Receipt, SealedBlock,
SealedBlockWithSenders, SealedHeader, TransactionMeta, TransactionSigned,
TransactionSignedNoHash, Withdrawals,
TransactionSignedNoHash,
};
use reth_stages_types::{StageCheckpoint, StageId};
use reth_storage_api::{

View File

@ -4,7 +4,10 @@ use std::{
sync::Arc,
};
use alloy_eips::{eip4895::Withdrawal, BlockHashOrNumber, BlockId, BlockNumberOrTag};
use alloy_eips::{
eip4895::{Withdrawal, Withdrawals},
BlockHashOrNumber, BlockId, BlockNumberOrTag,
};
use alloy_primitives::{
map::{HashMap, HashSet},
Address, BlockHash, BlockNumber, Bytes, StorageKey, StorageValue, TxHash, TxNumber, B256, U256,
@ -20,7 +23,7 @@ use reth_evm::ConfigureEvmEnv;
use reth_primitives::{
Account, Block, BlockWithSenders, Bytecode, Header, Receipt, SealedBlock,
SealedBlockWithSenders, SealedHeader, TransactionMeta, TransactionSigned,
TransactionSignedNoHash, Withdrawals,
TransactionSignedNoHash,
};
use reth_prune_types::{PruneCheckpoint, PruneSegment};
use reth_stages_types::{StageCheckpoint, StageId};

View File

@ -1,5 +1,7 @@
use alloy_eips::{eip4895::Withdrawal, BlockHashOrNumber};
use reth_primitives::Withdrawals;
use alloy_eips::{
eip4895::{Withdrawal, Withdrawals},
BlockHashOrNumber,
};
use reth_storage_errors::provider::ProviderResult;
/// Client trait for fetching [Withdrawal] related data.