mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
rpc-types: rm alloy-rpc-types-engine reexport (#11206)
This commit is contained in:
@ -26,7 +26,6 @@ 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
|
||||
@ -34,6 +33,7 @@ reth-trie.workspace = true
|
||||
# ethereum
|
||||
alloy-primitives.workspace = true
|
||||
revm-primitives.workspace = true
|
||||
alloy-rpc-types-engine.workspace = true
|
||||
|
||||
# async
|
||||
futures-util.workspace = true
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
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};
|
||||
@ -6,7 +7,6 @@ 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};
|
||||
|
||||
@ -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"] }
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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)]
|
||||
|
||||
@ -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};
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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]
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
use alloy_consensus::TxEnvelope;
|
||||
use alloy_eips::eip2718::Encodable2718;
|
||||
use alloy_rpc_types::{Block, BlockTransactions};
|
||||
use alloy_rpc_types_engine::{ExecutionPayloadV1, ExecutionPayloadV2, ExecutionPayloadV3};
|
||||
use reth_node_api::EngineTypes;
|
||||
use reth_node_core::{
|
||||
primitives::B256,
|
||||
rpc::types::{ExecutionPayloadV2, ExecutionPayloadV3},
|
||||
};
|
||||
use reth_node_core::primitives::B256;
|
||||
use reth_rpc_builder::auth::AuthServerHandle;
|
||||
use reth_rpc_types::ExecutionPayloadV1;
|
||||
use reth_tracing::tracing::warn;
|
||||
use ringbuffer::{AllocRingBuffer, RingBuffer};
|
||||
use std::future::Future;
|
||||
@ -133,7 +130,7 @@ impl<P: BlockProvider + Clone> DebugConsensusClient<P> {
|
||||
continue;
|
||||
}
|
||||
};
|
||||
let state = reth_rpc_types::engine::ForkchoiceState {
|
||||
let state = alloy_rpc_types_engine::ForkchoiceState {
|
||||
head_block_hash: block_hash,
|
||||
safe_block_hash,
|
||||
finalized_block_hash,
|
||||
|
||||
Reference in New Issue
Block a user