Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: clear reth rpc types from reth binary #11120

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bin/reth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ reth-consensus-common.workspace = true
reth-blockchain-tree.workspace = true
reth-rpc-builder.workspace = true
reth-rpc.workspace = true
reth-rpc-types.workspace = true
reth-rpc-types-compat.workspace = true
reth-rpc-api = { workspace = true, features = ["client"] }
reth-rpc-eth-types.workspace = true
Expand Down Expand Up @@ -68,6 +67,7 @@ reth-prune.workspace = true

# crypto
alloy-rlp.workspace = true
alloy-rpc-types = { workspace = true, features = ["engine"] }

# tracing
tracing.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion bin/reth/src/commands/debug_cmd/build_block.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Command for debugging block building.
use alloy_rlp::Decodable;
use alloy_rpc_types::engine::{BlobsBundleV1, PayloadAttributes};
use clap::Parser;
use eyre::Context;
use reth_basic_payload_builder::{
Expand Down Expand Up @@ -31,7 +32,6 @@ use reth_provider::{
ProviderFactory, StageCheckpointReader, StateProviderFactory,
};
use reth_revm::{database::StateProviderDatabase, primitives::EnvKzgSettings};
use reth_rpc_types::engine::{BlobsBundleV1, PayloadAttributes};
use reth_stages::StageId;
use reth_transaction_pool::{
blobstore::InMemoryBlobStore, BlobStore, EthPooledTransaction, PoolConfig, TransactionOrigin,
Expand Down
6 changes: 4 additions & 2 deletions bin/reth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ pub mod rpc {
pub use reth_rpc_builder::*;
}

/// Re-exported from `reth_rpc_types`.
/// Re-exported from `alloy_rpc_types`.
pub mod types {
pub use reth_rpc_types::*;
/// Alias for a peer identifier
pub type PeerId = reth_primitives::B512;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this, let me know if you want it somewhere else

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already duplicated as a type in a lot of places, so it's available in a re-export already, not sure we need to duplicate it here

see e.g. https://github.com/search?q=repo%3Aparadigmxyz%2Freth%20peerid&type=code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, just removed it

pub use alloy_rpc_types::*;
}

/// Re-exported from `reth_rpc_server_types`.
Expand Down
2 changes: 1 addition & 1 deletion crates/e2e-test-utils/src/traits.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use op_alloy_rpc_types_engine::OptimismExecutionPayloadEnvelopeV3;
use reth::rpc::types::{engine::ExecutionPayloadEnvelopeV3, ExecutionPayloadV3};
use reth::rpc::types::engine::{ExecutionPayloadEnvelopeV3, ExecutionPayloadV3};

/// The execution payload envelope type.
pub trait PayloadEnvelopeExt: Send + Sync + std::fmt::Debug {
Expand Down
3 changes: 0 additions & 3 deletions crates/rpc/rpc-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
#[allow(hidden_glob_reexports)]
mod eth;

/// Alias for a peer identifier
pub type PeerId = alloy_primitives::B512;

// Ethereum specific rpc types related to typed transaction requests and the engine API.
#[cfg(feature = "jsonrpsee-types")]
pub use eth::error::ToRpcError;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ use super::CustomRlpxConnection;
use crate::subprotocol::protocol::{
event::ProtocolEvent, handler::ProtocolState, proto::CustomRlpxProtoMessage,
};
use reth::rpc::types::PeerId;
use reth_eth_wire::{
capability::SharedCapabilities, multiplex::ProtocolConnection, protocol::Protocol,
};
use reth_network::protocol::{ConnectionHandler, OnNotSupported};
use reth_network_api::Direction;
use reth_rpc_types::PeerId;
use tokio::sync::mpsc;
use tokio_stream::wrappers::UnboundedReceiverStream;

Expand Down
Loading