primitives: rm more alloy_primitives reexports (#11255)

This commit is contained in:
Thomas Coratger
2024-09-29 18:48:54 +02:00
committed by GitHub
parent 55bf29e6d2
commit ea1d04aa75
70 changed files with 150 additions and 128 deletions

View File

@ -10,6 +10,7 @@ reth.workspace = true
reth-node-ethereum.workspace = true
alloy-rpc-types-beacon.workspace = true
alloy-primitives.workspace = true
clap.workspace = true
eyre.workspace = true

View File

@ -18,11 +18,12 @@ use std::{
net::{IpAddr, Ipv4Addr},
};
use alloy_primitives::B256;
use clap::Parser;
use futures_util::{stream::FuturesUnordered, StreamExt};
use mined_sidecar::MinedSidecarStream;
use reth::{
args::utils::DefaultChainSpecParser, builder::NodeHandle, cli::Cli, primitives::B256,
args::utils::DefaultChainSpecParser, builder::NodeHandle, cli::Cli,
providers::CanonStateSubscriptions,
};
use reth_node_ethereum::EthereumNode;

View File

@ -1,10 +1,11 @@
use crate::BeaconSidecarConfig;
use alloy_primitives::B256;
use alloy_rpc_types_beacon::sidecar::{BeaconBlobBundle, SidecarIterator};
use eyre::Result;
use futures_util::{stream::FuturesUnordered, Future, Stream, StreamExt};
use reqwest::{Error, StatusCode};
use reth::{
primitives::{BlobTransaction, SealedBlockWithSenders, B256},
primitives::{BlobTransaction, SealedBlockWithSenders},
providers::CanonStateNotification,
transaction_pool::{BlobStoreError, TransactionPoolExt},
};

View File

@ -16,9 +16,15 @@ reth-network-peers.workspace = true
reth-primitives.workspace = true
reth-tracing.workspace = true
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] }
secp256k1 = { workspace = true, features = [
"global-context",
"rand-std",
"recovery",
] }
tokio.workspace = true
tokio-stream.workspace = true
serde_json.workspace = true
alloy-primitives.workspace = true

View File

@ -1,8 +1,8 @@
use alloy_primitives::{b256, B256};
use reth_chainspec::{
once_cell_set, BaseFeeParams, Chain, ChainHardforks, ChainSpec, EthereumHardfork, ForkCondition,
};
use reth_network_peers::NodeRecord;
use reth_primitives::{b256, B256};
use std::sync::Arc;

View File

@ -19,3 +19,4 @@ tokio.workspace = true
serde_json.workspace = true
alloy-genesis.workspace = true
alloy-primitives.workspace = true

View File

@ -6,6 +6,7 @@
use std::sync::Arc;
use alloy_genesis::Genesis;
use alloy_primitives::{b256, hex};
use futures_util::StreamExt;
use reth::{
builder::{NodeBuilder, NodeHandle},
@ -16,7 +17,6 @@ use reth::{
use reth_chainspec::ChainSpec;
use reth_node_core::{args::RpcServerArgs, node_config::NodeConfig};
use reth_node_ethereum::EthereumNode;
use reth_primitives::{b256, hex};
#[tokio::main]
async fn main() -> eyre::Result<()> {

View File

@ -23,7 +23,7 @@ use serde::{Deserialize, Serialize};
use thiserror::Error;
use alloy_genesis::Genesis;
use alloy_primitives::Address;
use alloy_primitives::{Address, B256};
use alloy_rpc_types::{
engine::{
ExecutionPayloadEnvelopeV2, ExecutionPayloadEnvelopeV3, ExecutionPayloadEnvelopeV4,
@ -64,7 +64,7 @@ use reth_payload_builder::{
EthBuiltPayload, EthPayloadBuilderAttributes, PayloadBuilderError, PayloadBuilderHandle,
PayloadBuilderService,
};
use reth_primitives::{Withdrawals, B256};
use reth_primitives::Withdrawals;
use reth_tracing::{RethTracer, Tracer};
/// A custom payload attributes type.

View File

@ -3,7 +3,7 @@
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
use alloy_genesis::Genesis;
use alloy_primitives::Address;
use alloy_primitives::{address, Address, U256};
use reth::{
builder::{
components::{ExecutorBuilder, PayloadServiceBuilder},
@ -11,7 +11,6 @@ use reth::{
},
payload::{EthBuiltPayload, EthPayloadBuilderAttributes},
primitives::{
address,
revm_primitives::{Env, PrecompileResult},
Bytes,
},
@ -39,7 +38,7 @@ use reth_node_ethereum::{
};
use reth_primitives::{
revm_primitives::{CfgEnvWithHandlerCfg, TxEnv},
Header, TransactionSigned, U256,
Header, TransactionSigned,
};
use reth_tracing::{RethTracer, Tracer};
use std::sync::Arc;

View File

@ -21,3 +21,4 @@ tokio-stream.workspace = true
eyre.workspace = true
rand.workspace = true
tracing.workspace = true
alloy-primitives.workspace = true

View File

@ -1,7 +1,7 @@
use super::protocol::proto::{CustomRlpxProtoMessage, CustomRlpxProtoMessageKind};
use alloy_primitives::bytes::BytesMut;
use futures::{Stream, StreamExt};
use reth_eth_wire::multiplex::ProtocolConnection;
use reth_primitives::BytesMut;
use std::{
pin::Pin,
task::{ready, Context, Poll},

View File

@ -1,8 +1,8 @@
//! Simple RLPx Ping Pong protocol that also support sending messages,
//! following [RLPx specs](https://github.com/ethereum/devp2p/blob/master/rlpx.md)
use alloy_primitives::bytes::{Buf, BufMut, BytesMut};
use reth_eth_wire::{protocol::Protocol, Capability};
use reth_primitives::{Buf, BufMut, BytesMut};
#[repr(u8)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]

View File

@ -1,9 +1,9 @@
use alloy_primitives::Address;
use alloy_primitives::{Address, B256};
use alloy_rpc_types::{Filter, FilteredParams};
use reth_chainspec::ChainSpecBuilder;
use reth_node_ethereum::EthereumNode;
use reth_node_types::NodeTypesWithDBAdapter;
use reth_primitives::{alloy_primitives::Sealable, SealedHeader, B256};
use reth_primitives::{alloy_primitives::Sealable, SealedHeader};
use reth_provider::{
providers::StaticFileProvider, AccountReader, BlockReader, BlockSource, HeaderProvider,
ProviderFactory, ReceiptProvider, StateProvider, TransactionsProvider,

View File

@ -8,7 +8,11 @@ license.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] }
secp256k1 = { workspace = true, features = [
"global-context",
"rand-std",
"recovery",
] }
tokio.workspace = true
reth-network.workspace = true
reth-chainspec.workspace = true
@ -18,3 +22,4 @@ reth-tracing.workspace = true
tokio-stream.workspace = true
reth-provider = { workspace = true, features = ["test-utils"] }
reth-discv4 = { workspace = true, features = ["test-utils"] }
alloy-primitives.workspace = true

View File

@ -1,8 +1,9 @@
use alloy_primitives::{b256, B256};
use reth_chainspec::{
once_cell_set, BaseFeeParams, Chain, ChainHardforks, ChainSpec, EthereumHardfork, ForkCondition,
};
use reth_discv4::NodeRecord;
use reth_primitives::{b256, Head, B256};
use reth_primitives::Head;
use std::sync::Arc;

View File

@ -3,14 +3,14 @@
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
use alloy_genesis::Genesis;
use alloy_primitives::Address;
use alloy_primitives::{Address, U256};
use parking_lot::RwLock;
use reth::{
api::NextBlockEnvAttributes,
builder::{components::ExecutorBuilder, BuilderContext, NodeBuilder},
primitives::{
revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg, Env, PrecompileResult, TxEnv},
Bytes, U256,
Bytes,
},
revm::{
handler::register::EvmHandler,