Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
greged93 committed Sep 18, 2024
1 parent 0f9f752 commit 07b720a
Show file tree
Hide file tree
Showing 29 changed files with 135 additions and 182 deletions.
12 changes: 8 additions & 4 deletions 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 crates/consensus/beacon/src/engine/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::engine::{error::BeaconOnNewPayloadError, forkchoice::ForkchoiceStatus
use futures::{future::Either, FutureExt};
use reth_engine_primitives::EngineTypes;
use reth_errors::RethResult;
use reth_payload_builder::error::PayloadBuilderError;
use reth_payload_primitives::PayloadBuilderError;
use reth_rpc_types::engine::{
CancunPayloadFields, ExecutionPayload, ForkChoiceUpdateResult, ForkchoiceState,
ForkchoiceUpdateError, ForkchoiceUpdated, PayloadId, PayloadStatus, PayloadStatusEnum,
Expand Down
4 changes: 2 additions & 2 deletions crates/consensus/beacon/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use reth_network_p2p::{
BlockClient,
};
use reth_node_types::NodeTypesWithEngine;
use reth_payload_builder::{PayloadBuilder, PayloadBuilderHandle};
use reth_payload_primitives::{PayloadAttributes, PayloadBuilderAttributes};
use reth_payload_builder::PayloadBuilderHandle;
use reth_payload_primitives::{PayloadAttributes, PayloadBuilder, PayloadBuilderAttributes};
use reth_payload_validator::ExecutionPayloadValidator;
use reth_primitives::{
constants::EPOCH_SLOTS, BlockNumHash, Head, Header, SealedBlock, SealedHeader,
Expand Down
1 change: 1 addition & 0 deletions crates/e2e-test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ reth-db = { workspace = true, features = ["test-utils"] }
reth-rpc.workspace = true
reth-rpc-layer.workspace = true
reth-payload-builder = { workspace = true, features = ["test-utils"] }
reth-payload-primitives.workspace = true
reth-provider.workspace = true
reth-node-builder = { workspace = true, features = ["test-utils"] }
reth-tokio-util.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion crates/e2e-test-utils/src/payload.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use futures_util::StreamExt;
use reth::api::{BuiltPayload, EngineTypes, PayloadBuilderAttributes};
use reth_payload_builder::{Events, PayloadBuilder, PayloadBuilderHandle, PayloadId};
use reth_payload_builder::{PayloadBuilderHandle, PayloadId};
use reth_payload_primitives::{Events, PayloadBuilder};
use tokio_stream::wrappers::BroadcastStream;

/// Helper for payload operations
Expand Down
4 changes: 2 additions & 2 deletions crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use reth_consensus::{Consensus, PostExecutionInput};
use reth_engine_primitives::EngineTypes;
use reth_errors::{ConsensusError, ProviderResult};
use reth_evm::execute::{BlockExecutorProvider, Executor};
use reth_payload_builder::{PayloadBuilder, PayloadBuilderHandle};
use reth_payload_primitives::{PayloadAttributes, PayloadBuilderAttributes};
use reth_payload_builder::PayloadBuilderHandle;
use reth_payload_primitives::{PayloadAttributes, PayloadBuilder, PayloadBuilderAttributes};
use reth_payload_validator::ExecutionPayloadValidator;
use reth_primitives::{
Block, BlockNumHash, BlockNumber, GotExpected, Header, SealedBlock, SealedBlockWithSenders,
Expand Down
6 changes: 2 additions & 4 deletions crates/ethereum/payload/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ use reth_evm::{
};
use reth_evm_ethereum::{eip6110::parse_deposits_from_receipts, EthEvmConfig};
use reth_execution_types::ExecutionOutcome;
use reth_payload_builder::{
error::PayloadBuilderError, EthBuiltPayload, EthPayloadBuilderAttributes,
};
use reth_payload_primitives::PayloadBuilderAttributes;
use reth_payload_builder::{EthBuiltPayload, EthPayloadBuilderAttributes};
use reth_payload_primitives::{PayloadBuilderAttributes, PayloadBuilderError};
use reth_primitives::{
constants::{eip4844::MAX_DATA_GAS_PER_BLOCK, BEACON_NONCE},
eip4844::calculate_excess_blob_gas,
Expand Down
15 changes: 8 additions & 7 deletions crates/node/builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ reth-node-core.workspace = true
reth-node-events.workspace = true
reth-node-metrics.workspace = true
reth-payload-builder.workspace = true
reth-payload-primitives.workspace = true
reth-payload-validator.workspace = true
reth-primitives.workspace = true
reth-provider.workspace = true
Expand All @@ -65,18 +66,18 @@ alloy-primitives.workspace = true
## async
futures.workspace = true
tokio = { workspace = true, features = [
"sync",
"macros",
"time",
"rt-multi-thread",
"sync",
"macros",
"time",
"rt-multi-thread",
] }
tokio-stream.workspace = true

## crypto
secp256k1 = { workspace = true, features = [
"global-context",
"rand-std",
"recovery",
"global-context",
"rand-std",
"recovery",
] }

## misc
Expand Down
17 changes: 8 additions & 9 deletions crates/node/builder/src/launch/engine.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
//! Engine node related functionality.

use crate::{
hooks::NodeHooks,
rpc::{launch_rpc_servers, EthApiBuilderProvider},
setup::build_networked_pipeline,
AddOns, ExExLauncher, FullNode, LaunchContext, LaunchNode, NodeAdapter,
NodeBuilderWithComponents, NodeComponents, NodeComponentsBuilder, NodeHandle, NodeTypesAdapter,
};
use futures::{future::Either, stream, stream_select, StreamExt};
use reth_beacon_consensus::{
hooks::{EngineHooks, StaticFileHook},
Expand Down Expand Up @@ -31,7 +38,7 @@ use reth_node_core::{
version::{CARGO_PKG_VERSION, CLIENT_CODE, NAME_CLIENT, VERGEN_GIT_SHA},
};
use reth_node_events::{cl::ConsensusLayerHealthEvents, node};
use reth_payload_builder::PayloadBuilder;
use reth_payload_primitives::PayloadBuilder;
use reth_provider::providers::BlockchainProvider2;
use reth_rpc_engine_api::{capabilities::EngineCapabilities, EngineApi};
use reth_rpc_types::{engine::ClientVersionV1, WithOtherFields};
Expand All @@ -42,14 +49,6 @@ use std::sync::Arc;
use tokio::sync::{mpsc::unbounded_channel, oneshot};
use tokio_stream::wrappers::UnboundedReceiverStream;

use crate::{
hooks::NodeHooks,
rpc::{launch_rpc_servers, EthApiBuilderProvider},
setup::build_networked_pipeline,
AddOns, ExExLauncher, FullNode, LaunchContext, LaunchNode, NodeAdapter,
NodeBuilderWithComponents, NodeComponents, NodeComponentsBuilder, NodeHandle, NodeTypesAdapter,
};

/// The engine node launcher.
#[derive(Debug)]
pub struct EngineNodeLauncher {
Expand Down
3 changes: 1 addition & 2 deletions crates/optimism/payload/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ use reth_evm::{
NextBlockEnvAttributes,
};
use reth_execution_types::ExecutionOutcome;
use reth_payload_builder::error::PayloadBuilderError;
use reth_payload_primitives::PayloadBuilderAttributes;
use reth_payload_primitives::{PayloadBuilderAttributes, PayloadBuilderError};
use reth_primitives::{
constants::BEACON_NONCE,
eip4844::calculate_excess_blob_gas,
Expand Down
5 changes: 2 additions & 3 deletions crates/payload/basic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ use futures_core::ready;
use futures_util::FutureExt;
use reth_chainspec::{ChainSpec, EthereumHardforks};
use reth_payload_builder::{
database::CachedReads, error::PayloadBuilderError, KeepPayloadJobAlive, PayloadId, PayloadJob,
PayloadJobGenerator,
database::CachedReads, KeepPayloadJobAlive, PayloadId, PayloadJob, PayloadJobGenerator,
};
use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes};
use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes, PayloadBuilderError};
use reth_primitives::{
constants::{EMPTY_WITHDRAWALS, RETH_CLIENT_VERSION, SLOT_DURATION},
proofs, BlockNumberOrTag, Bytes, SealedBlock, Withdrawals, B256, U256,
Expand Down
4 changes: 0 additions & 4 deletions crates/payload/builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ workspace = true
# reth
reth-primitives.workspace = true
reth-rpc-types.workspace = true
reth-transaction-pool.workspace = true
reth-errors.workspace = true
reth-provider.workspace = true
reth-payload-primitives.workspace = true
reth-ethereum-engine-primitives.workspace = true
Expand All @@ -26,14 +24,12 @@ async-trait.workspace = true
tokio = { workspace = true, features = ["sync"] }
tokio-stream.workspace = true
futures-util.workspace = true
pin-project.workspace = true

# metrics
reth-metrics.workspace = true
metrics.workspace = true

# misc
thiserror.workspace = true
tracing.workspace = true

[dev-dependencies]
Expand Down
57 changes: 0 additions & 57 deletions crates/payload/builder/src/error.rs

This file was deleted.

7 changes: 2 additions & 5 deletions crates/payload/builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//! use std::pin::Pin;
//! use std::task::{Context, Poll};
//! use reth_payload_builder::{EthBuiltPayload, KeepPayloadJobAlive, EthPayloadBuilderAttributes, PayloadJob, PayloadJobGenerator};
//! use reth_payload_builder::error::PayloadBuilderError;
//! use reth_payload_primitives::PayloadBuilderError;
//! use reth_primitives::{Block, Header, U256};
//!
//! /// The generator type that creates new jobs that builds empty blocks.
Expand Down Expand Up @@ -102,8 +102,6 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]

pub mod database;
pub mod error;
mod events;
mod metrics;
mod service;
mod traits;
Expand All @@ -113,12 +111,11 @@ pub mod noop;
#[cfg(any(test, feature = "test-utils"))]
pub mod test_utils;

pub use events::{Events, PayloadEvents};
pub use reth_rpc_types::engine::PayloadId;
pub use service::{
PayloadBuilderHandle, PayloadBuilderService, PayloadServiceCommand, PayloadStore,
};
pub use traits::{KeepPayloadJobAlive, PayloadBuilder, PayloadJob, PayloadJobGenerator};
pub use traits::{KeepPayloadJobAlive, PayloadJob, PayloadJobGenerator};

// re-export the Ethereum engine primitives for convenience
#[doc(inline)]
Expand Down
2 changes: 1 addition & 1 deletion crates/payload/builder/src/noop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct NoopPayloadBuilderService<T: PayloadTypes> {

impl<T> NoopPayloadBuilderService<T>
where
T: PayloadTypes + 'static,
T: PayloadTypes,
{
/// Creates a new [`NoopPayloadBuilderService`].
pub fn new() -> (Self, PayloadBuilderHandle<T>) {
Expand Down
Loading

0 comments on commit 07b720a

Please sign in to comment.