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

This commit is contained in:
Thomas Coratger
2024-09-25 16:49:50 +02:00
committed by GitHub
parent 3d034519af
commit c00516c3f9
48 changed files with 111 additions and 134 deletions

View File

@ -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
@ -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"] }

View File

@ -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.

View File

@ -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,

View File

@ -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)]

View File

@ -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};

View File

@ -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,

View File

@ -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::{
@ -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;
@ -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;
@ -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]

View File

@ -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,
};
@ -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;