mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
primitives: rm alloy BlockNumHash reexport (#12304)
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -6550,6 +6550,7 @@ dependencies = [
|
|||||||
name = "reth-blockchain-tree-api"
|
name = "reth-blockchain-tree-api"
|
||||||
version = "1.1.0"
|
version = "1.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"alloy-eips",
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
"reth-consensus",
|
"reth-consensus",
|
||||||
"reth-execution-errors",
|
"reth-execution-errors",
|
||||||
@ -7557,6 +7558,7 @@ dependencies = [
|
|||||||
name = "reth-exex-test-utils"
|
name = "reth-exex-test-utils"
|
||||||
version = "1.1.0"
|
version = "1.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"alloy-eips",
|
||||||
"eyre",
|
"eyre",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
|
|||||||
@ -18,6 +18,7 @@ reth-storage-errors.workspace = true
|
|||||||
|
|
||||||
# alloy
|
# alloy
|
||||||
alloy-primitives.workspace = true
|
alloy-primitives.workspace = true
|
||||||
|
alloy-eips.workspace = true
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
thiserror.workspace = true
|
thiserror.workspace = true
|
||||||
|
|||||||
@ -9,8 +9,9 @@
|
|||||||
|
|
||||||
use self::error::CanonicalError;
|
use self::error::CanonicalError;
|
||||||
use crate::error::InsertBlockError;
|
use crate::error::InsertBlockError;
|
||||||
|
use alloy_eips::BlockNumHash;
|
||||||
use alloy_primitives::{BlockHash, BlockNumber};
|
use alloy_primitives::{BlockHash, BlockNumber};
|
||||||
use reth_primitives::{BlockNumHash, Receipt, SealedBlock, SealedBlockWithSenders, SealedHeader};
|
use reth_primitives::{Receipt, SealedBlock, SealedBlockWithSenders, SealedHeader};
|
||||||
use reth_storage_errors::provider::{ProviderError, ProviderResult};
|
use reth_storage_errors::provider::{ProviderError, ProviderResult};
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
use alloy_eips::merge::EPOCH_SLOTS;
|
use alloy_eips::{merge::EPOCH_SLOTS, BlockNumHash};
|
||||||
use alloy_primitives::{BlockNumber, B256};
|
use alloy_primitives::{BlockNumber, B256};
|
||||||
use alloy_rpc_types_engine::{
|
use alloy_rpc_types_engine::{
|
||||||
ExecutionPayload, ExecutionPayloadSidecar, ForkchoiceState, PayloadStatus, PayloadStatusEnum,
|
ExecutionPayload, ExecutionPayloadSidecar, ForkchoiceState, PayloadStatus, PayloadStatusEnum,
|
||||||
@ -20,7 +20,7 @@ use reth_node_types::NodeTypesWithEngine;
|
|||||||
use reth_payload_builder::PayloadBuilderHandle;
|
use reth_payload_builder::PayloadBuilderHandle;
|
||||||
use reth_payload_primitives::{PayloadAttributes, PayloadBuilder, PayloadBuilderAttributes};
|
use reth_payload_primitives::{PayloadAttributes, PayloadBuilder, PayloadBuilderAttributes};
|
||||||
use reth_payload_validator::ExecutionPayloadValidator;
|
use reth_payload_validator::ExecutionPayloadValidator;
|
||||||
use reth_primitives::{BlockNumHash, Head, Header, SealedBlock, SealedHeader};
|
use reth_primitives::{Head, Header, SealedBlock, SealedHeader};
|
||||||
use reth_provider::{
|
use reth_provider::{
|
||||||
providers::ProviderNodeTypes, BlockIdReader, BlockReader, BlockSource, CanonChainTracker,
|
providers::ProviderNodeTypes, BlockIdReader, BlockReader, BlockSource, CanonChainTracker,
|
||||||
ChainSpecProvider, ProviderError, StageCheckpointReader,
|
ChainSpecProvider, ProviderError, StageCheckpointReader,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
use reth_primitives::BlockNumHash;
|
use alloy_eips::BlockNumHash;
|
||||||
|
|
||||||
/// Events emitted by an `ExEx`.
|
/// Events emitted by an `ExEx`.
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
wal::Wal, ExExEvent, ExExNotification, ExExNotifications, FinishedExExHeight, WalHandle,
|
wal::Wal, ExExEvent, ExExNotification, ExExNotifications, FinishedExExHeight, WalHandle,
|
||||||
};
|
};
|
||||||
|
use alloy_eips::BlockNumHash;
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use metrics::Gauge;
|
use metrics::Gauge;
|
||||||
use reth_chain_state::ForkChoiceStream;
|
use reth_chain_state::ForkChoiceStream;
|
||||||
use reth_chainspec::Head;
|
use reth_chainspec::Head;
|
||||||
use reth_metrics::{metrics::Counter, Metrics};
|
use reth_metrics::{metrics::Counter, Metrics};
|
||||||
use reth_primitives::{BlockNumHash, SealedHeader};
|
use reth_primitives::SealedHeader;
|
||||||
use reth_provider::HeaderProvider;
|
use reth_provider::HeaderProvider;
|
||||||
use reth_tracing::tracing::debug;
|
use reth_tracing::tracing::debug;
|
||||||
use std::{
|
use std::{
|
||||||
|
|||||||
@ -33,6 +33,9 @@ reth-tasks.workspace = true
|
|||||||
reth-transaction-pool = { workspace = true, features = ["test-utils"] }
|
reth-transaction-pool = { workspace = true, features = ["test-utils"] }
|
||||||
reth-trie-db.workspace = true
|
reth-trie-db.workspace = true
|
||||||
|
|
||||||
|
## alloy
|
||||||
|
alloy-eips.workspace = true
|
||||||
|
|
||||||
## async
|
## async
|
||||||
futures-util.workspace = true
|
futures-util.workspace = true
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
|
|||||||
@ -15,6 +15,7 @@ use std::{
|
|||||||
task::Poll,
|
task::Poll,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use alloy_eips::BlockNumHash;
|
||||||
use futures_util::FutureExt;
|
use futures_util::FutureExt;
|
||||||
use reth_blockchain_tree::noop::NoopBlockchainTree;
|
use reth_blockchain_tree::noop::NoopBlockchainTree;
|
||||||
use reth_chainspec::{ChainSpec, MAINNET};
|
use reth_chainspec::{ChainSpec, MAINNET};
|
||||||
@ -44,7 +45,7 @@ use reth_node_ethereum::{
|
|||||||
EthEngineTypes, EthEvmConfig,
|
EthEngineTypes, EthEvmConfig,
|
||||||
};
|
};
|
||||||
use reth_payload_builder::noop::NoopPayloadBuilderService;
|
use reth_payload_builder::noop::NoopPayloadBuilderService;
|
||||||
use reth_primitives::{BlockNumHash, Head, SealedBlockWithSenders};
|
use reth_primitives::{Head, SealedBlockWithSenders};
|
||||||
use reth_provider::{
|
use reth_provider::{
|
||||||
providers::{BlockchainProvider, StaticFileProvider},
|
providers::{BlockchainProvider, StaticFileProvider},
|
||||||
BlockReader, ProviderFactory,
|
BlockReader, ProviderFactory,
|
||||||
|
|||||||
@ -2,7 +2,7 @@ use crate::{
|
|||||||
GotExpected, Header, SealedHeader, TransactionSigned, TransactionSignedEcRecovered, Withdrawals,
|
GotExpected, Header, SealedHeader, TransactionSigned, TransactionSignedEcRecovered, Withdrawals,
|
||||||
};
|
};
|
||||||
use alloc::vec::Vec;
|
use alloc::vec::Vec;
|
||||||
pub use alloy_eips::eip1898::{BlockNumHash, BlockNumberOrTag, ForkBlock, RpcBlockHash};
|
pub use alloy_eips::eip1898::{BlockNumberOrTag, ForkBlock, RpcBlockHash};
|
||||||
use alloy_eips::eip2718::Encodable2718;
|
use alloy_eips::eip2718::Encodable2718;
|
||||||
use alloy_primitives::{Address, Bytes, Sealable, B256};
|
use alloy_primitives::{Address, Bytes, Sealable, B256};
|
||||||
use alloy_rlp::{Decodable, Encodable, RlpDecodable, RlpEncodable};
|
use alloy_rlp::{Decodable, Encodable, RlpDecodable, RlpEncodable};
|
||||||
|
|||||||
@ -34,8 +34,8 @@ pub mod transaction;
|
|||||||
#[cfg(any(test, feature = "arbitrary"))]
|
#[cfg(any(test, feature = "arbitrary"))]
|
||||||
pub use block::{generate_valid_header, valid_header_strategy};
|
pub use block::{generate_valid_header, valid_header_strategy};
|
||||||
pub use block::{
|
pub use block::{
|
||||||
Block, BlockBody, BlockNumHash, BlockNumberOrTag, BlockWithSenders, ForkBlock, RpcBlockHash,
|
Block, BlockBody, BlockNumberOrTag, BlockWithSenders, ForkBlock, RpcBlockHash, SealedBlock,
|
||||||
SealedBlock, SealedBlockWithSenders,
|
SealedBlockWithSenders,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "reth-codec")]
|
#[cfg(feature = "reth-codec")]
|
||||||
pub use compression::*;
|
pub use compression::*;
|
||||||
|
|||||||
@ -2,11 +2,12 @@
|
|||||||
//!
|
//!
|
||||||
//! Log parsing for building filter.
|
//! Log parsing for building filter.
|
||||||
|
|
||||||
|
use alloy_eips::BlockNumHash;
|
||||||
use alloy_primitives::TxHash;
|
use alloy_primitives::TxHash;
|
||||||
use alloy_rpc_types::{FilteredParams, Log};
|
use alloy_rpc_types::{FilteredParams, Log};
|
||||||
use reth_chainspec::ChainInfo;
|
use reth_chainspec::ChainInfo;
|
||||||
use reth_errors::ProviderError;
|
use reth_errors::ProviderError;
|
||||||
use reth_primitives::{BlockNumHash, Receipt, SealedBlockWithSenders};
|
use reth_primitives::{Receipt, SealedBlockWithSenders};
|
||||||
use reth_storage_api::BlockReader;
|
use reth_storage_api::BlockReader;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
|||||||
@ -463,15 +463,15 @@ impl BlockNumReader for MockEthProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl BlockIdReader for MockEthProvider {
|
impl BlockIdReader for MockEthProvider {
|
||||||
fn pending_block_num_hash(&self) -> ProviderResult<Option<reth_primitives::BlockNumHash>> {
|
fn pending_block_num_hash(&self) -> ProviderResult<Option<alloy_eips::BlockNumHash>> {
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn safe_block_num_hash(&self) -> ProviderResult<Option<reth_primitives::BlockNumHash>> {
|
fn safe_block_num_hash(&self) -> ProviderResult<Option<alloy_eips::BlockNumHash>> {
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn finalized_block_num_hash(&self) -> ProviderResult<Option<reth_primitives::BlockNumHash>> {
|
fn finalized_block_num_hash(&self) -> ProviderResult<Option<alloy_eips::BlockNumHash>> {
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -175,15 +175,15 @@ impl BlockReaderIdExt for NoopProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl BlockIdReader for NoopProvider {
|
impl BlockIdReader for NoopProvider {
|
||||||
fn pending_block_num_hash(&self) -> ProviderResult<Option<reth_primitives::BlockNumHash>> {
|
fn pending_block_num_hash(&self) -> ProviderResult<Option<alloy_eips::BlockNumHash>> {
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn safe_block_num_hash(&self) -> ProviderResult<Option<reth_primitives::BlockNumHash>> {
|
fn safe_block_num_hash(&self) -> ProviderResult<Option<alloy_eips::BlockNumHash>> {
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn finalized_block_num_hash(&self) -> ProviderResult<Option<reth_primitives::BlockNumHash>> {
|
fn finalized_block_num_hash(&self) -> ProviderResult<Option<alloy_eips::BlockNumHash>> {
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,13 +99,13 @@ pub trait BlockIdReader: BlockNumReader + Send + Sync {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get the current pending block number and hash.
|
/// Get the current pending block number and hash.
|
||||||
fn pending_block_num_hash(&self) -> ProviderResult<Option<reth_primitives::BlockNumHash>>;
|
fn pending_block_num_hash(&self) -> ProviderResult<Option<alloy_eips::BlockNumHash>>;
|
||||||
|
|
||||||
/// Get the current safe block number and hash.
|
/// Get the current safe block number and hash.
|
||||||
fn safe_block_num_hash(&self) -> ProviderResult<Option<reth_primitives::BlockNumHash>>;
|
fn safe_block_num_hash(&self) -> ProviderResult<Option<alloy_eips::BlockNumHash>>;
|
||||||
|
|
||||||
/// Get the current finalized block number and hash.
|
/// Get the current finalized block number and hash.
|
||||||
fn finalized_block_num_hash(&self) -> ProviderResult<Option<reth_primitives::BlockNumHash>>;
|
fn finalized_block_num_hash(&self) -> ProviderResult<Option<alloy_eips::BlockNumHash>>;
|
||||||
|
|
||||||
/// Get the safe block number.
|
/// Get the safe block number.
|
||||||
fn safe_block_number(&self) -> ProviderResult<Option<BlockNumber>> {
|
fn safe_block_number(&self) -> ProviderResult<Option<BlockNumber>> {
|
||||||
|
|||||||
Reference in New Issue
Block a user