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

rpc-types: rm alloy-rpc-types-engine reexport #11206

Merged
merged 6 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
25 changes: 14 additions & 11 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/auto-seal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ reth-transaction-pool.workspace = true
reth-evm.workspace = true
reth-engine-primitives.workspace = true
reth-consensus.workspace = true
reth-rpc-types.workspace = true
reth-network-peers.workspace = true
reth-tokio-util.workspace = true
reth-trie.workspace = true

# ethereum
alloy-primitives.workspace = true
revm-primitives.workspace = true
alloy-rpc-types-engine.workspace = true

# async
futures-util.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/auto-seal/src/task.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use crate::{mode::MiningMode, Storage};
use alloy_rpc_types_engine::ForkchoiceState;
use futures_util::{future::BoxFuture, FutureExt};
use reth_beacon_consensus::{BeaconEngineMessage, ForkchoiceStatus};
use reth_chainspec::{EthChainSpec, EthereumHardforks};
use reth_engine_primitives::EngineTypes;
use reth_evm::execute::BlockExecutorProvider;
use reth_primitives::IntoRecoveredTransaction;
use reth_provider::{CanonChainTracker, StateProviderFactory};
use reth_rpc_types::engine::ForkchoiceState;
use reth_stages_api::PipelineEvent;
use reth_tokio_util::EventStream;
use reth_transaction_pool::{TransactionPool, ValidPoolTransaction};
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/beacon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ reth-primitives.workspace = true
reth-stages-api.workspace = true
reth-errors.workspace = true
reth-provider.workspace = true
reth-rpc-types.workspace = true
reth-tasks.workspace = true
reth-payload-builder.workspace = true
reth-payload-primitives.workspace = true
Expand All @@ -32,6 +31,7 @@ reth-node-types.workspace = true

# ethereum
alloy-primitives.workspace = true
alloy-rpc-types-engine.workspace = true

# async
tokio = { workspace = true, features = ["sync"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/beacon/src/engine/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::engine::hooks::EngineHookError;
use alloy_rpc_types_engine::ForkchoiceUpdateError;
use reth_errors::{DatabaseError, RethError};
use reth_rpc_types::engine::ForkchoiceUpdateError;
use reth_stages_api::PipelineError;

/// Beacon engine result.
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/beacon/src/engine/event.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::engine::forkchoice::ForkchoiceStatus;
use alloy_primitives::B256;
use alloy_rpc_types_engine::ForkchoiceState;
use reth_primitives::{SealedBlock, SealedHeader};
use reth_rpc_types::engine::ForkchoiceState;
use std::{
fmt::{Display, Formatter, Result},
sync::Arc,
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/beacon/src/engine/forkchoice.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use alloy_primitives::B256;
use reth_rpc_types::engine::{ForkchoiceState, PayloadStatusEnum};
use alloy_rpc_types_engine::{ForkchoiceState, PayloadStatusEnum};

/// The struct that keeps track of the received forkchoice state and their status.
#[derive(Debug, Clone, Default)]
Expand Down
6 changes: 3 additions & 3 deletions crates/consensus/beacon/src/engine/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ use crate::{
engine::message::OnForkChoiceUpdated, BeaconConsensusEngineEvent, BeaconEngineMessage,
BeaconForkChoiceUpdateError, BeaconOnNewPayloadError,
};
use alloy_rpc_types_engine::{
CancunPayloadFields, ExecutionPayload, ForkchoiceState, ForkchoiceUpdated, PayloadStatus,
};
use futures::TryFutureExt;
use reth_engine_primitives::EngineTypes;
use reth_errors::RethResult;
use reth_rpc_types::engine::{
CancunPayloadFields, ExecutionPayload, ForkchoiceState, ForkchoiceUpdated, PayloadStatus,
};
use reth_tokio_util::{EventSender, EventStream};
use tokio::sync::{mpsc::UnboundedSender, oneshot};

Expand Down
8 changes: 4 additions & 4 deletions crates/consensus/beacon/src/engine/message.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use crate::engine::{error::BeaconOnNewPayloadError, forkchoice::ForkchoiceStatus};
use alloy_rpc_types_engine::{
CancunPayloadFields, ExecutionPayload, ForkChoiceUpdateResult, ForkchoiceState,
ForkchoiceUpdateError, ForkchoiceUpdated, PayloadId, PayloadStatus, PayloadStatusEnum,
};
use futures::{future::Either, FutureExt};
use reth_engine_primitives::EngineTypes;
use reth_errors::RethResult;
use reth_payload_primitives::PayloadBuilderError;
use reth_rpc_types::engine::{
CancunPayloadFields, ExecutionPayload, ForkChoiceUpdateResult, ForkchoiceState,
ForkchoiceUpdateError, ForkchoiceUpdated, PayloadId, PayloadStatus, PayloadStatusEnum,
};
use std::{
fmt::Display,
future::Future,
Expand Down
12 changes: 6 additions & 6 deletions crates/consensus/beacon/src/engine/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
use alloy_primitives::{BlockNumber, B256};
use alloy_rpc_types_engine::{
CancunPayloadFields, ExecutionPayload, ForkchoiceState, PayloadStatus, PayloadStatusEnum,
PayloadValidationError,
};
use futures::{stream::BoxStream, Future, StreamExt};
use itertools::Either;
use reth_blockchain_tree_api::{
Expand All @@ -22,10 +26,6 @@ use reth_provider::{
providers::ProviderNodeTypes, BlockIdReader, BlockReader, BlockSource, CanonChainTracker,
ChainSpecProvider, ProviderError, StageCheckpointReader,
};
use reth_rpc_types::engine::{
CancunPayloadFields, ExecutionPayload, ForkchoiceState, PayloadStatus, PayloadStatusEnum,
PayloadValidationError,
};
use reth_stages_api::{ControlFlow, Pipeline, PipelineTarget, StageId};
use reth_tasks::TaskSpawner;
use reth_tokio_util::EventSender;
Expand Down Expand Up @@ -1984,10 +1984,10 @@ mod tests {
test_utils::{spawn_consensus_engine, TestConsensusEngineBuilder},
BeaconForkChoiceUpdateError,
};
use alloy_rpc_types_engine::{ForkchoiceState, ForkchoiceUpdated, PayloadStatus};
use assert_matches::assert_matches;
use reth_chainspec::{ChainSpecBuilder, MAINNET};
use reth_provider::{BlockWriter, ProviderFactory};
use reth_rpc_types::engine::{ForkchoiceState, ForkchoiceUpdated, PayloadStatus};
use reth_rpc_types_compat::engine::payload::block_to_payload_v1;
use reth_stages::{ExecOutput, PipelineError, StageError};
use reth_stages_api::StageCheckpoint;
Expand Down Expand Up @@ -2180,11 +2180,11 @@ mod tests {
mod fork_choice_updated {
use super::*;
use alloy_primitives::U256;
use alloy_rpc_types_engine::ForkchoiceUpdateError;
use generators::BlockParams;
use reth_db::{tables, test_utils::create_test_static_files_dir, Database};
use reth_db_api::transaction::DbTxMut;
use reth_provider::{providers::StaticFileProvider, test_utils::MockNodeTypesWithDB};
use reth_rpc_types::engine::ForkchoiceUpdateError;
use reth_testing_utils::generators::random_block;

#[tokio::test]
Expand Down
6 changes: 3 additions & 3 deletions crates/consensus/beacon/src/engine/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ use crate::{
BeaconOnNewPayloadError, EthBeaconConsensus, MIN_BLOCKS_FOR_PIPELINE_RUN,
};
use alloy_primitives::{BlockNumber, Sealable, B256};
use alloy_rpc_types_engine::{
CancunPayloadFields, ExecutionPayload, ForkchoiceState, ForkchoiceUpdated, PayloadStatus,
};
use reth_blockchain_tree::{
config::BlockchainTreeConfig, externals::TreeExternals, BlockchainTree, ShareableBlockchainTree,
};
Expand All @@ -30,9 +33,6 @@ use reth_provider::{
};
use reth_prune::Pruner;
use reth_prune_types::PruneModes;
use reth_rpc_types::engine::{
CancunPayloadFields, ExecutionPayload, ForkchoiceState, ForkchoiceUpdated, PayloadStatus,
};
use reth_stages::{sets::DefaultStages, test_utils::TestStages, ExecOutput, Pipeline, StageError};
use reth_static_file::StaticFileProducer;
use reth_tasks::TokioTaskExecutor;
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/debug-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ workspace = true
reth-node-api.workspace = true
reth-node-core.workspace = true
reth-rpc-api.workspace = true
reth-rpc-types.workspace = true
reth-rpc-builder.workspace = true
reth-tracing.workspace = true

Expand All @@ -24,6 +23,7 @@ alloy-consensus = { workspace = true, features = ["serde"] }
alloy-eips.workspace = true
alloy-provider = { workspace = true, features = ["ws"] }
alloy-rpc-types.workspace = true
alloy-rpc-types-engine.workspace = true

auto_impl.workspace = true
futures.workspace = true
Expand Down
Loading
Loading