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:
25
Cargo.lock
generated
25
Cargo.lock
generated
@ -6244,6 +6244,7 @@ name = "reth-auto-seal-consensus"
|
|||||||
version = "1.0.7"
|
version = "1.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"reth-beacon-consensus",
|
"reth-beacon-consensus",
|
||||||
"reth-chainspec",
|
"reth-chainspec",
|
||||||
@ -6257,7 +6258,6 @@ dependencies = [
|
|||||||
"reth-primitives",
|
"reth-primitives",
|
||||||
"reth-provider",
|
"reth-provider",
|
||||||
"reth-revm",
|
"reth-revm",
|
||||||
"reth-rpc-types",
|
|
||||||
"reth-stages-api",
|
"reth-stages-api",
|
||||||
"reth-tokio-util",
|
"reth-tokio-util",
|
||||||
"reth-transaction-pool",
|
"reth-transaction-pool",
|
||||||
@ -6297,6 +6297,7 @@ version = "1.0.7"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"alloy-genesis",
|
"alloy-genesis",
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"assert_matches",
|
"assert_matches",
|
||||||
"futures",
|
"futures",
|
||||||
"itertools 0.13.0",
|
"itertools 0.13.0",
|
||||||
@ -6326,7 +6327,6 @@ dependencies = [
|
|||||||
"reth-provider",
|
"reth-provider",
|
||||||
"reth-prune",
|
"reth-prune",
|
||||||
"reth-prune-types",
|
"reth-prune-types",
|
||||||
"reth-rpc-types",
|
|
||||||
"reth-rpc-types-compat",
|
"reth-rpc-types-compat",
|
||||||
"reth-stages",
|
"reth-stages",
|
||||||
"reth-stages-api",
|
"reth-stages-api",
|
||||||
@ -6654,6 +6654,7 @@ dependencies = [
|
|||||||
"alloy-eips",
|
"alloy-eips",
|
||||||
"alloy-provider",
|
"alloy-provider",
|
||||||
"alloy-rpc-types",
|
"alloy-rpc-types",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"auto_impl",
|
"auto_impl",
|
||||||
"eyre",
|
"eyre",
|
||||||
"futures",
|
"futures",
|
||||||
@ -6662,7 +6663,6 @@ dependencies = [
|
|||||||
"reth-node-core",
|
"reth-node-core",
|
||||||
"reth-rpc-api",
|
"reth-rpc-api",
|
||||||
"reth-rpc-builder",
|
"reth-rpc-builder",
|
||||||
"reth-rpc-types",
|
|
||||||
"reth-tracing",
|
"reth-tracing",
|
||||||
"ringbuffer",
|
"ringbuffer",
|
||||||
"serde",
|
"serde",
|
||||||
@ -6968,6 +6968,7 @@ name = "reth-engine-local"
|
|||||||
version = "1.0.7"
|
version = "1.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"eyre",
|
"eyre",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"reth-beacon-consensus",
|
"reth-beacon-consensus",
|
||||||
@ -7040,6 +7041,7 @@ dependencies = [
|
|||||||
"alloy-eips",
|
"alloy-eips",
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
"alloy-rlp",
|
"alloy-rlp",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"assert_matches",
|
"assert_matches",
|
||||||
"futures",
|
"futures",
|
||||||
"metrics",
|
"metrics",
|
||||||
@ -7066,7 +7068,6 @@ dependencies = [
|
|||||||
"reth-prune",
|
"reth-prune",
|
||||||
"reth-prune-types",
|
"reth-prune-types",
|
||||||
"reth-revm",
|
"reth-revm",
|
||||||
"reth-rpc-types",
|
|
||||||
"reth-rpc-types-compat",
|
"reth-rpc-types-compat",
|
||||||
"reth-stages",
|
"reth-stages",
|
||||||
"reth-stages-api",
|
"reth-stages-api",
|
||||||
@ -7085,6 +7086,7 @@ name = "reth-engine-util"
|
|||||||
version = "1.0.7"
|
version = "1.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"eyre",
|
"eyre",
|
||||||
"futures",
|
"futures",
|
||||||
"itertools 0.13.0",
|
"itertools 0.13.0",
|
||||||
@ -7099,7 +7101,6 @@ dependencies = [
|
|||||||
"reth-primitives",
|
"reth-primitives",
|
||||||
"reth-provider",
|
"reth-provider",
|
||||||
"reth-revm",
|
"reth-revm",
|
||||||
"reth-rpc-types",
|
|
||||||
"reth-rpc-types-compat",
|
"reth-rpc-types-compat",
|
||||||
"reth-trie",
|
"reth-trie",
|
||||||
"revm-primitives",
|
"revm-primitives",
|
||||||
@ -7212,12 +7213,12 @@ dependencies = [
|
|||||||
"alloy-eips",
|
"alloy-eips",
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
"alloy-rlp",
|
"alloy-rlp",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"reth-chain-state",
|
"reth-chain-state",
|
||||||
"reth-chainspec",
|
"reth-chainspec",
|
||||||
"reth-engine-primitives",
|
"reth-engine-primitives",
|
||||||
"reth-payload-primitives",
|
"reth-payload-primitives",
|
||||||
"reth-primitives",
|
"reth-primitives",
|
||||||
"reth-rpc-types",
|
|
||||||
"reth-rpc-types-compat",
|
"reth-rpc-types-compat",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@ -7960,6 +7961,7 @@ version = "1.0.7"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"alloy-genesis",
|
"alloy-genesis",
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"clap",
|
"clap",
|
||||||
"eyre",
|
"eyre",
|
||||||
@ -8106,6 +8108,7 @@ version = "1.0.7"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
"alloy-rlp",
|
"alloy-rlp",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"op-alloy-rpc-types-engine",
|
"op-alloy-rpc-types-engine",
|
||||||
"reth-basic-payload-builder",
|
"reth-basic-payload-builder",
|
||||||
"reth-chain-state",
|
"reth-chain-state",
|
||||||
@ -8119,7 +8122,6 @@ dependencies = [
|
|||||||
"reth-primitives",
|
"reth-primitives",
|
||||||
"reth-provider",
|
"reth-provider",
|
||||||
"reth-revm",
|
"reth-revm",
|
||||||
"reth-rpc-types",
|
|
||||||
"reth-rpc-types-compat",
|
"reth-rpc-types-compat",
|
||||||
"reth-transaction-pool",
|
"reth-transaction-pool",
|
||||||
"reth-trie",
|
"reth-trie",
|
||||||
@ -8490,6 +8492,7 @@ dependencies = [
|
|||||||
"alloy-rpc-types-anvil",
|
"alloy-rpc-types-anvil",
|
||||||
"alloy-rpc-types-beacon",
|
"alloy-rpc-types-beacon",
|
||||||
"alloy-rpc-types-debug",
|
"alloy-rpc-types-debug",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"alloy-rpc-types-eth",
|
"alloy-rpc-types-eth",
|
||||||
"alloy-rpc-types-mev",
|
"alloy-rpc-types-mev",
|
||||||
"alloy-rpc-types-trace",
|
"alloy-rpc-types-trace",
|
||||||
@ -8500,7 +8503,6 @@ dependencies = [
|
|||||||
"reth-network-peers",
|
"reth-network-peers",
|
||||||
"reth-primitives",
|
"reth-primitives",
|
||||||
"reth-rpc-eth-api",
|
"reth-rpc-eth-api",
|
||||||
"reth-rpc-types",
|
|
||||||
"serde_json",
|
"serde_json",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -8530,6 +8532,7 @@ dependencies = [
|
|||||||
"alloy-network",
|
"alloy-network",
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
"alloy-rpc-types",
|
"alloy-rpc-types",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"alloy-rpc-types-eth",
|
"alloy-rpc-types-eth",
|
||||||
"alloy-rpc-types-trace",
|
"alloy-rpc-types-trace",
|
||||||
"alloy-serde",
|
"alloy-serde",
|
||||||
@ -8582,6 +8585,7 @@ dependencies = [
|
|||||||
"alloy-eips",
|
"alloy-eips",
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
"alloy-rlp",
|
"alloy-rlp",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"assert_matches",
|
"assert_matches",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"jsonrpsee-core",
|
"jsonrpsee-core",
|
||||||
@ -8715,12 +8719,12 @@ name = "reth-rpc-server-types"
|
|||||||
version = "1.0.7"
|
version = "1.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"jsonrpsee-core",
|
"jsonrpsee-core",
|
||||||
"jsonrpsee-types",
|
"jsonrpsee-types",
|
||||||
"reth-errors",
|
"reth-errors",
|
||||||
"reth-network-api",
|
"reth-network-api",
|
||||||
"reth-primitives",
|
"reth-primitives",
|
||||||
"reth-rpc-types",
|
|
||||||
"serde",
|
"serde",
|
||||||
"strum",
|
"strum",
|
||||||
]
|
]
|
||||||
@ -8729,7 +8733,6 @@ dependencies = [
|
|||||||
name = "reth-rpc-types"
|
name = "reth-rpc-types"
|
||||||
version = "1.0.7"
|
version = "1.0.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alloy-rpc-types-engine",
|
|
||||||
"jsonrpsee-types",
|
"jsonrpsee-types",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -8740,10 +8743,10 @@ dependencies = [
|
|||||||
"alloy-primitives",
|
"alloy-primitives",
|
||||||
"alloy-rlp",
|
"alloy-rlp",
|
||||||
"alloy-rpc-types",
|
"alloy-rpc-types",
|
||||||
|
"alloy-rpc-types-engine",
|
||||||
"alloy-rpc-types-eth",
|
"alloy-rpc-types-eth",
|
||||||
"alloy-serde",
|
"alloy-serde",
|
||||||
"reth-primitives",
|
"reth-primitives",
|
||||||
"reth-rpc-types",
|
|
||||||
"reth-trie-common",
|
"reth-trie-common",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -26,7 +26,6 @@ reth-transaction-pool.workspace = true
|
|||||||
reth-evm.workspace = true
|
reth-evm.workspace = true
|
||||||
reth-engine-primitives.workspace = true
|
reth-engine-primitives.workspace = true
|
||||||
reth-consensus.workspace = true
|
reth-consensus.workspace = true
|
||||||
reth-rpc-types.workspace = true
|
|
||||||
reth-network-peers.workspace = true
|
reth-network-peers.workspace = true
|
||||||
reth-tokio-util.workspace = true
|
reth-tokio-util.workspace = true
|
||||||
reth-trie.workspace = true
|
reth-trie.workspace = true
|
||||||
@ -34,6 +33,7 @@ reth-trie.workspace = true
|
|||||||
# ethereum
|
# ethereum
|
||||||
alloy-primitives.workspace = true
|
alloy-primitives.workspace = true
|
||||||
revm-primitives.workspace = true
|
revm-primitives.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
# async
|
# async
|
||||||
futures-util.workspace = true
|
futures-util.workspace = true
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
use crate::{mode::MiningMode, Storage};
|
use crate::{mode::MiningMode, Storage};
|
||||||
|
use alloy_rpc_types_engine::ForkchoiceState;
|
||||||
use futures_util::{future::BoxFuture, FutureExt};
|
use futures_util::{future::BoxFuture, FutureExt};
|
||||||
use reth_beacon_consensus::{BeaconEngineMessage, ForkchoiceStatus};
|
use reth_beacon_consensus::{BeaconEngineMessage, ForkchoiceStatus};
|
||||||
use reth_chainspec::{EthChainSpec, EthereumHardforks};
|
use reth_chainspec::{EthChainSpec, EthereumHardforks};
|
||||||
@ -6,7 +7,6 @@ use reth_engine_primitives::EngineTypes;
|
|||||||
use reth_evm::execute::BlockExecutorProvider;
|
use reth_evm::execute::BlockExecutorProvider;
|
||||||
use reth_primitives::IntoRecoveredTransaction;
|
use reth_primitives::IntoRecoveredTransaction;
|
||||||
use reth_provider::{CanonChainTracker, StateProviderFactory};
|
use reth_provider::{CanonChainTracker, StateProviderFactory};
|
||||||
use reth_rpc_types::engine::ForkchoiceState;
|
|
||||||
use reth_stages_api::PipelineEvent;
|
use reth_stages_api::PipelineEvent;
|
||||||
use reth_tokio_util::EventStream;
|
use reth_tokio_util::EventStream;
|
||||||
use reth_transaction_pool::{TransactionPool, ValidPoolTransaction};
|
use reth_transaction_pool::{TransactionPool, ValidPoolTransaction};
|
||||||
|
|||||||
@ -18,7 +18,6 @@ reth-primitives.workspace = true
|
|||||||
reth-stages-api.workspace = true
|
reth-stages-api.workspace = true
|
||||||
reth-errors.workspace = true
|
reth-errors.workspace = true
|
||||||
reth-provider.workspace = true
|
reth-provider.workspace = true
|
||||||
reth-rpc-types.workspace = true
|
|
||||||
reth-tasks.workspace = true
|
reth-tasks.workspace = true
|
||||||
reth-payload-builder.workspace = true
|
reth-payload-builder.workspace = true
|
||||||
reth-payload-primitives.workspace = true
|
reth-payload-primitives.workspace = true
|
||||||
@ -32,6 +31,7 @@ reth-node-types.workspace = true
|
|||||||
|
|
||||||
# ethereum
|
# ethereum
|
||||||
alloy-primitives.workspace = true
|
alloy-primitives.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
# async
|
# async
|
||||||
tokio = { workspace = true, features = ["sync"] }
|
tokio = { workspace = true, features = ["sync"] }
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
use crate::engine::hooks::EngineHookError;
|
use crate::engine::hooks::EngineHookError;
|
||||||
|
use alloy_rpc_types_engine::ForkchoiceUpdateError;
|
||||||
use reth_errors::{DatabaseError, RethError};
|
use reth_errors::{DatabaseError, RethError};
|
||||||
use reth_rpc_types::engine::ForkchoiceUpdateError;
|
|
||||||
use reth_stages_api::PipelineError;
|
use reth_stages_api::PipelineError;
|
||||||
|
|
||||||
/// Beacon engine result.
|
/// Beacon engine result.
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
use crate::engine::forkchoice::ForkchoiceStatus;
|
use crate::engine::forkchoice::ForkchoiceStatus;
|
||||||
use alloy_primitives::B256;
|
use alloy_primitives::B256;
|
||||||
|
use alloy_rpc_types_engine::ForkchoiceState;
|
||||||
use reth_primitives::{SealedBlock, SealedHeader};
|
use reth_primitives::{SealedBlock, SealedHeader};
|
||||||
use reth_rpc_types::engine::ForkchoiceState;
|
|
||||||
use std::{
|
use std::{
|
||||||
fmt::{Display, Formatter, Result},
|
fmt::{Display, Formatter, Result},
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
use alloy_primitives::B256;
|
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.
|
/// The struct that keeps track of the received forkchoice state and their status.
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
|
|||||||
@ -4,12 +4,12 @@ use crate::{
|
|||||||
engine::message::OnForkChoiceUpdated, BeaconConsensusEngineEvent, BeaconEngineMessage,
|
engine::message::OnForkChoiceUpdated, BeaconConsensusEngineEvent, BeaconEngineMessage,
|
||||||
BeaconForkChoiceUpdateError, BeaconOnNewPayloadError,
|
BeaconForkChoiceUpdateError, BeaconOnNewPayloadError,
|
||||||
};
|
};
|
||||||
|
use alloy_rpc_types_engine::{
|
||||||
|
CancunPayloadFields, ExecutionPayload, ForkchoiceState, ForkchoiceUpdated, PayloadStatus,
|
||||||
|
};
|
||||||
use futures::TryFutureExt;
|
use futures::TryFutureExt;
|
||||||
use reth_engine_primitives::EngineTypes;
|
use reth_engine_primitives::EngineTypes;
|
||||||
use reth_errors::RethResult;
|
use reth_errors::RethResult;
|
||||||
use reth_rpc_types::engine::{
|
|
||||||
CancunPayloadFields, ExecutionPayload, ForkchoiceState, ForkchoiceUpdated, PayloadStatus,
|
|
||||||
};
|
|
||||||
use reth_tokio_util::{EventSender, EventStream};
|
use reth_tokio_util::{EventSender, EventStream};
|
||||||
use tokio::sync::{mpsc::UnboundedSender, oneshot};
|
use tokio::sync::{mpsc::UnboundedSender, oneshot};
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
use crate::engine::{error::BeaconOnNewPayloadError, forkchoice::ForkchoiceStatus};
|
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 futures::{future::Either, FutureExt};
|
||||||
use reth_engine_primitives::EngineTypes;
|
use reth_engine_primitives::EngineTypes;
|
||||||
use reth_errors::RethResult;
|
use reth_errors::RethResult;
|
||||||
use reth_payload_primitives::PayloadBuilderError;
|
use reth_payload_primitives::PayloadBuilderError;
|
||||||
use reth_rpc_types::engine::{
|
|
||||||
CancunPayloadFields, ExecutionPayload, ForkChoiceUpdateResult, ForkchoiceState,
|
|
||||||
ForkchoiceUpdateError, ForkchoiceUpdated, PayloadId, PayloadStatus, PayloadStatusEnum,
|
|
||||||
};
|
|
||||||
use std::{
|
use std::{
|
||||||
fmt::Display,
|
fmt::Display,
|
||||||
future::Future,
|
future::Future,
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
use alloy_primitives::{BlockNumber, B256};
|
use alloy_primitives::{BlockNumber, B256};
|
||||||
|
use alloy_rpc_types_engine::{
|
||||||
|
CancunPayloadFields, ExecutionPayload, ForkchoiceState, PayloadStatus, PayloadStatusEnum,
|
||||||
|
PayloadValidationError,
|
||||||
|
};
|
||||||
use futures::{stream::BoxStream, Future, StreamExt};
|
use futures::{stream::BoxStream, Future, StreamExt};
|
||||||
use itertools::Either;
|
use itertools::Either;
|
||||||
use reth_blockchain_tree_api::{
|
use reth_blockchain_tree_api::{
|
||||||
@ -22,10 +26,6 @@ use reth_provider::{
|
|||||||
providers::ProviderNodeTypes, BlockIdReader, BlockReader, BlockSource, CanonChainTracker,
|
providers::ProviderNodeTypes, BlockIdReader, BlockReader, BlockSource, CanonChainTracker,
|
||||||
ChainSpecProvider, ProviderError, StageCheckpointReader,
|
ChainSpecProvider, ProviderError, StageCheckpointReader,
|
||||||
};
|
};
|
||||||
use reth_rpc_types::engine::{
|
|
||||||
CancunPayloadFields, ExecutionPayload, ForkchoiceState, PayloadStatus, PayloadStatusEnum,
|
|
||||||
PayloadValidationError,
|
|
||||||
};
|
|
||||||
use reth_stages_api::{ControlFlow, Pipeline, PipelineTarget, StageId};
|
use reth_stages_api::{ControlFlow, Pipeline, PipelineTarget, StageId};
|
||||||
use reth_tasks::TaskSpawner;
|
use reth_tasks::TaskSpawner;
|
||||||
use reth_tokio_util::EventSender;
|
use reth_tokio_util::EventSender;
|
||||||
@ -1984,10 +1984,10 @@ mod tests {
|
|||||||
test_utils::{spawn_consensus_engine, TestConsensusEngineBuilder},
|
test_utils::{spawn_consensus_engine, TestConsensusEngineBuilder},
|
||||||
BeaconForkChoiceUpdateError,
|
BeaconForkChoiceUpdateError,
|
||||||
};
|
};
|
||||||
|
use alloy_rpc_types_engine::{ForkchoiceState, ForkchoiceUpdated, PayloadStatus};
|
||||||
use assert_matches::assert_matches;
|
use assert_matches::assert_matches;
|
||||||
use reth_chainspec::{ChainSpecBuilder, MAINNET};
|
use reth_chainspec::{ChainSpecBuilder, MAINNET};
|
||||||
use reth_provider::{BlockWriter, ProviderFactory};
|
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_rpc_types_compat::engine::payload::block_to_payload_v1;
|
||||||
use reth_stages::{ExecOutput, PipelineError, StageError};
|
use reth_stages::{ExecOutput, PipelineError, StageError};
|
||||||
use reth_stages_api::StageCheckpoint;
|
use reth_stages_api::StageCheckpoint;
|
||||||
@ -2180,11 +2180,11 @@ mod tests {
|
|||||||
mod fork_choice_updated {
|
mod fork_choice_updated {
|
||||||
use super::*;
|
use super::*;
|
||||||
use alloy_primitives::U256;
|
use alloy_primitives::U256;
|
||||||
|
use alloy_rpc_types_engine::ForkchoiceUpdateError;
|
||||||
use generators::BlockParams;
|
use generators::BlockParams;
|
||||||
use reth_db::{tables, test_utils::create_test_static_files_dir, Database};
|
use reth_db::{tables, test_utils::create_test_static_files_dir, Database};
|
||||||
use reth_db_api::transaction::DbTxMut;
|
use reth_db_api::transaction::DbTxMut;
|
||||||
use reth_provider::{providers::StaticFileProvider, test_utils::MockNodeTypesWithDB};
|
use reth_provider::{providers::StaticFileProvider, test_utils::MockNodeTypesWithDB};
|
||||||
use reth_rpc_types::engine::ForkchoiceUpdateError;
|
|
||||||
use reth_testing_utils::generators::random_block;
|
use reth_testing_utils::generators::random_block;
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
|
|||||||
@ -5,6 +5,9 @@ use crate::{
|
|||||||
BeaconOnNewPayloadError, EthBeaconConsensus, MIN_BLOCKS_FOR_PIPELINE_RUN,
|
BeaconOnNewPayloadError, EthBeaconConsensus, MIN_BLOCKS_FOR_PIPELINE_RUN,
|
||||||
};
|
};
|
||||||
use alloy_primitives::{BlockNumber, Sealable, B256};
|
use alloy_primitives::{BlockNumber, Sealable, B256};
|
||||||
|
use alloy_rpc_types_engine::{
|
||||||
|
CancunPayloadFields, ExecutionPayload, ForkchoiceState, ForkchoiceUpdated, PayloadStatus,
|
||||||
|
};
|
||||||
use reth_blockchain_tree::{
|
use reth_blockchain_tree::{
|
||||||
config::BlockchainTreeConfig, externals::TreeExternals, BlockchainTree, ShareableBlockchainTree,
|
config::BlockchainTreeConfig, externals::TreeExternals, BlockchainTree, ShareableBlockchainTree,
|
||||||
};
|
};
|
||||||
@ -30,9 +33,6 @@ use reth_provider::{
|
|||||||
};
|
};
|
||||||
use reth_prune::Pruner;
|
use reth_prune::Pruner;
|
||||||
use reth_prune_types::PruneModes;
|
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_stages::{sets::DefaultStages, test_utils::TestStages, ExecOutput, Pipeline, StageError};
|
||||||
use reth_static_file::StaticFileProducer;
|
use reth_static_file::StaticFileProducer;
|
||||||
use reth_tasks::TokioTaskExecutor;
|
use reth_tasks::TokioTaskExecutor;
|
||||||
|
|||||||
@ -15,7 +15,6 @@ workspace = true
|
|||||||
reth-node-api.workspace = true
|
reth-node-api.workspace = true
|
||||||
reth-node-core.workspace = true
|
reth-node-core.workspace = true
|
||||||
reth-rpc-api.workspace = true
|
reth-rpc-api.workspace = true
|
||||||
reth-rpc-types.workspace = true
|
|
||||||
reth-rpc-builder.workspace = true
|
reth-rpc-builder.workspace = true
|
||||||
reth-tracing.workspace = true
|
reth-tracing.workspace = true
|
||||||
|
|
||||||
@ -24,6 +23,7 @@ alloy-consensus = { workspace = true, features = ["serde"] }
|
|||||||
alloy-eips.workspace = true
|
alloy-eips.workspace = true
|
||||||
alloy-provider = { workspace = true, features = ["ws"] }
|
alloy-provider = { workspace = true, features = ["ws"] }
|
||||||
alloy-rpc-types.workspace = true
|
alloy-rpc-types.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
auto_impl.workspace = true
|
auto_impl.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
|
|||||||
@ -1,13 +1,10 @@
|
|||||||
use alloy_consensus::TxEnvelope;
|
use alloy_consensus::TxEnvelope;
|
||||||
use alloy_eips::eip2718::Encodable2718;
|
use alloy_eips::eip2718::Encodable2718;
|
||||||
use alloy_rpc_types::{Block, BlockTransactions};
|
use alloy_rpc_types::{Block, BlockTransactions};
|
||||||
|
use alloy_rpc_types_engine::{ExecutionPayloadV1, ExecutionPayloadV2, ExecutionPayloadV3};
|
||||||
use reth_node_api::EngineTypes;
|
use reth_node_api::EngineTypes;
|
||||||
use reth_node_core::{
|
use reth_node_core::primitives::B256;
|
||||||
primitives::B256,
|
|
||||||
rpc::types::{ExecutionPayloadV2, ExecutionPayloadV3},
|
|
||||||
};
|
|
||||||
use reth_rpc_builder::auth::AuthServerHandle;
|
use reth_rpc_builder::auth::AuthServerHandle;
|
||||||
use reth_rpc_types::ExecutionPayloadV1;
|
|
||||||
use reth_tracing::tracing::warn;
|
use reth_tracing::tracing::warn;
|
||||||
use ringbuffer::{AllocRingBuffer, RingBuffer};
|
use ringbuffer::{AllocRingBuffer, RingBuffer};
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
@ -133,7 +130,7 @@ impl<P: BlockProvider + Clone> DebugConsensusClient<P> {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let state = reth_rpc_types::engine::ForkchoiceState {
|
let state = alloy_rpc_types_engine::ForkchoiceState {
|
||||||
head_block_hash: block_hash,
|
head_block_hash: block_hash,
|
||||||
safe_block_hash,
|
safe_block_hash,
|
||||||
finalized_block_hash,
|
finalized_block_hash,
|
||||||
|
|||||||
@ -23,6 +23,7 @@ reth-stages-api.workspace = true
|
|||||||
|
|
||||||
# alloy
|
# alloy
|
||||||
alloy-primitives.workspace = true
|
alloy-primitives.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
# async
|
# async
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
|
|||||||
@ -178,11 +178,11 @@ mod tests {
|
|||||||
struct TestPayloadAttributesBuilder;
|
struct TestPayloadAttributesBuilder;
|
||||||
|
|
||||||
impl PayloadAttributesBuilder for TestPayloadAttributesBuilder {
|
impl PayloadAttributesBuilder for TestPayloadAttributesBuilder {
|
||||||
type PayloadAttributes = reth_rpc_types::engine::PayloadAttributes;
|
type PayloadAttributes = alloy_rpc_types_engine::PayloadAttributes;
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
|
|
||||||
fn build(&self) -> Result<Self::PayloadAttributes, Self::Error> {
|
fn build(&self) -> Result<Self::PayloadAttributes, Self::Error> {
|
||||||
Ok(reth_rpc_types::engine::PayloadAttributes {
|
Ok(alloy_rpc_types_engine::PayloadAttributes {
|
||||||
timestamp: 0,
|
timestamp: 0,
|
||||||
prev_randao: Default::default(),
|
prev_randao: Default::default(),
|
||||||
suggested_fee_recipient: Default::default(),
|
suggested_fee_recipient: Default::default(),
|
||||||
|
|||||||
@ -29,7 +29,6 @@ reth-primitives.workspace = true
|
|||||||
reth-provider.workspace = true
|
reth-provider.workspace = true
|
||||||
reth-prune.workspace = true
|
reth-prune.workspace = true
|
||||||
reth-revm.workspace = true
|
reth-revm.workspace = true
|
||||||
reth-rpc-types.workspace = true
|
|
||||||
reth-stages-api.workspace = true
|
reth-stages-api.workspace = true
|
||||||
reth-tasks.workspace = true
|
reth-tasks.workspace = true
|
||||||
reth-trie.workspace = true
|
reth-trie.workspace = true
|
||||||
@ -38,6 +37,7 @@ reth-trie-parallel.workspace = true
|
|||||||
# alloy
|
# alloy
|
||||||
alloy-primitives.workspace = true
|
alloy-primitives.workspace = true
|
||||||
alloy-eips.workspace = true
|
alloy-eips.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
# common
|
# common
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
|
|||||||
@ -6,6 +6,10 @@ use crate::{
|
|||||||
};
|
};
|
||||||
use alloy_eips::BlockNumHash;
|
use alloy_eips::BlockNumHash;
|
||||||
use alloy_primitives::{BlockNumber, B256, U256};
|
use alloy_primitives::{BlockNumber, B256, U256};
|
||||||
|
use alloy_rpc_types_engine::{
|
||||||
|
CancunPayloadFields, ExecutionPayload, ForkchoiceState, PayloadStatus, PayloadStatusEnum,
|
||||||
|
PayloadValidationError,
|
||||||
|
};
|
||||||
use reth_beacon_consensus::{
|
use reth_beacon_consensus::{
|
||||||
BeaconConsensusEngineEvent, BeaconEngineMessage, ForkchoiceStateTracker, InvalidHeaderCache,
|
BeaconConsensusEngineEvent, BeaconEngineMessage, ForkchoiceStateTracker, InvalidHeaderCache,
|
||||||
OnForkChoiceUpdated, MIN_BLOCKS_FOR_PIPELINE_RUN,
|
OnForkChoiceUpdated, MIN_BLOCKS_FOR_PIPELINE_RUN,
|
||||||
@ -34,13 +38,6 @@ use reth_provider::{
|
|||||||
TransactionVariant,
|
TransactionVariant,
|
||||||
};
|
};
|
||||||
use reth_revm::database::StateProviderDatabase;
|
use reth_revm::database::StateProviderDatabase;
|
||||||
use reth_rpc_types::{
|
|
||||||
engine::{
|
|
||||||
CancunPayloadFields, ForkchoiceState, PayloadStatus, PayloadStatusEnum,
|
|
||||||
PayloadValidationError,
|
|
||||||
},
|
|
||||||
ExecutionPayload,
|
|
||||||
};
|
|
||||||
use reth_stages_api::ControlFlow;
|
use reth_stages_api::ControlFlow;
|
||||||
use reth_trie::{updates::TrieUpdates, HashedPostState, TrieInput};
|
use reth_trie::{updates::TrieUpdates, HashedPostState, TrieInput};
|
||||||
use reth_trie_parallel::async_root::{AsyncStateRoot, AsyncStateRootError};
|
use reth_trie_parallel::async_root::{AsyncStateRoot, AsyncStateRootError};
|
||||||
|
|||||||
@ -15,7 +15,6 @@ workspace = true
|
|||||||
reth-primitives.workspace = true
|
reth-primitives.workspace = true
|
||||||
reth-errors.workspace = true
|
reth-errors.workspace = true
|
||||||
reth-fs-util.workspace = true
|
reth-fs-util.workspace = true
|
||||||
reth-rpc-types.workspace = true
|
|
||||||
reth-rpc-types-compat.workspace = true
|
reth-rpc-types-compat.workspace = true
|
||||||
reth-engine-primitives.workspace = true
|
reth-engine-primitives.workspace = true
|
||||||
reth-beacon-consensus.workspace = true
|
reth-beacon-consensus.workspace = true
|
||||||
@ -29,6 +28,7 @@ reth-trie.workspace = true
|
|||||||
|
|
||||||
# alloy
|
# alloy
|
||||||
alloy-primitives.workspace = true
|
alloy-primitives.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
# async
|
# async
|
||||||
tokio = { workspace = true, default-features = false }
|
tokio = { workspace = true, default-features = false }
|
||||||
|
|||||||
@ -1,13 +1,10 @@
|
|||||||
//! Stores engine API messages to disk for later inspection and replay.
|
//! Stores engine API messages to disk for later inspection and replay.
|
||||||
|
|
||||||
|
use alloy_rpc_types_engine::{CancunPayloadFields, ExecutionPayload, ForkchoiceState};
|
||||||
use futures::{Stream, StreamExt};
|
use futures::{Stream, StreamExt};
|
||||||
use reth_beacon_consensus::BeaconEngineMessage;
|
use reth_beacon_consensus::BeaconEngineMessage;
|
||||||
use reth_engine_primitives::EngineTypes;
|
use reth_engine_primitives::EngineTypes;
|
||||||
use reth_fs_util as fs;
|
use reth_fs_util as fs;
|
||||||
use reth_rpc_types::{
|
|
||||||
engine::{CancunPayloadFields, ForkchoiceState},
|
|
||||||
ExecutionPayload,
|
|
||||||
};
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::{
|
use std::{
|
||||||
collections::BTreeMap,
|
collections::BTreeMap,
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
//! Stream wrapper that simulates reorgs.
|
//! Stream wrapper that simulates reorgs.
|
||||||
|
|
||||||
use alloy_primitives::U256;
|
use alloy_primitives::U256;
|
||||||
|
use alloy_rpc_types_engine::{
|
||||||
|
CancunPayloadFields, ExecutionPayload, ForkchoiceState, PayloadStatus,
|
||||||
|
};
|
||||||
use futures::{stream::FuturesUnordered, Stream, StreamExt, TryFutureExt};
|
use futures::{stream::FuturesUnordered, Stream, StreamExt, TryFutureExt};
|
||||||
use itertools::Either;
|
use itertools::Either;
|
||||||
use reth_beacon_consensus::{BeaconEngineMessage, BeaconOnNewPayloadError, OnForkChoiceUpdated};
|
use reth_beacon_consensus::{BeaconEngineMessage, BeaconOnNewPayloadError, OnForkChoiceUpdated};
|
||||||
@ -17,10 +20,6 @@ use reth_revm::{
|
|||||||
state_change::post_block_withdrawals_balance_increments,
|
state_change::post_block_withdrawals_balance_increments,
|
||||||
DatabaseCommit,
|
DatabaseCommit,
|
||||||
};
|
};
|
||||||
use reth_rpc_types::{
|
|
||||||
engine::{CancunPayloadFields, ForkchoiceState, PayloadStatus},
|
|
||||||
ExecutionPayload,
|
|
||||||
};
|
|
||||||
use reth_rpc_types_compat::engine::payload::block_to_payload;
|
use reth_rpc_types_compat::engine::payload::block_to_payload;
|
||||||
use reth_trie::HashedPostState;
|
use reth_trie::HashedPostState;
|
||||||
use revm_primitives::{
|
use revm_primitives::{
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
//! Stream wrapper that skips specified number of new payload messages.
|
//! Stream wrapper that skips specified number of new payload messages.
|
||||||
|
|
||||||
|
use alloy_rpc_types_engine::{PayloadStatus, PayloadStatusEnum};
|
||||||
use futures::{Stream, StreamExt};
|
use futures::{Stream, StreamExt};
|
||||||
use reth_beacon_consensus::BeaconEngineMessage;
|
use reth_beacon_consensus::BeaconEngineMessage;
|
||||||
use reth_engine_primitives::EngineTypes;
|
use reth_engine_primitives::EngineTypes;
|
||||||
use reth_rpc_types::engine::{PayloadStatus, PayloadStatusEnum};
|
|
||||||
use std::{
|
use std::{
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
task::{ready, Context, Poll},
|
task::{ready, Context, Poll},
|
||||||
|
|||||||
@ -16,7 +16,6 @@ reth-chainspec.workspace = true
|
|||||||
reth-primitives.workspace = true
|
reth-primitives.workspace = true
|
||||||
reth-engine-primitives.workspace = true
|
reth-engine-primitives.workspace = true
|
||||||
reth-payload-primitives.workspace = true
|
reth-payload-primitives.workspace = true
|
||||||
reth-rpc-types.workspace = true
|
|
||||||
reth-rpc-types-compat.workspace = true
|
reth-rpc-types-compat.workspace = true
|
||||||
alloy-rlp.workspace = true
|
alloy-rlp.workspace = true
|
||||||
reth-chain-state.workspace = true
|
reth-chain-state.workspace = true
|
||||||
@ -24,6 +23,7 @@ reth-chain-state.workspace = true
|
|||||||
# alloy
|
# alloy
|
||||||
alloy-primitives.workspace = true
|
alloy-primitives.workspace = true
|
||||||
alloy-eips.workspace = true
|
alloy-eips.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
|
|||||||
@ -11,6 +11,10 @@
|
|||||||
mod payload;
|
mod payload;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
pub use alloy_rpc_types_engine::{
|
||||||
|
ExecutionPayloadEnvelopeV2, ExecutionPayloadEnvelopeV3, ExecutionPayloadEnvelopeV4,
|
||||||
|
ExecutionPayloadV1, PayloadAttributes as EthPayloadAttributes,
|
||||||
|
};
|
||||||
pub use payload::{EthBuiltPayload, EthPayloadBuilderAttributes};
|
pub use payload::{EthBuiltPayload, EthPayloadBuilderAttributes};
|
||||||
use reth_chainspec::ChainSpec;
|
use reth_chainspec::ChainSpec;
|
||||||
use reth_engine_primitives::{EngineTypes, EngineValidator};
|
use reth_engine_primitives::{EngineTypes, EngineValidator};
|
||||||
@ -18,13 +22,6 @@ use reth_payload_primitives::{
|
|||||||
validate_version_specific_fields, EngineApiMessageVersion, EngineObjectValidationError,
|
validate_version_specific_fields, EngineApiMessageVersion, EngineObjectValidationError,
|
||||||
PayloadOrAttributes, PayloadTypes,
|
PayloadOrAttributes, PayloadTypes,
|
||||||
};
|
};
|
||||||
pub use reth_rpc_types::{
|
|
||||||
engine::{
|
|
||||||
ExecutionPayloadEnvelopeV2, ExecutionPayloadEnvelopeV3, ExecutionPayloadEnvelopeV4,
|
|
||||||
PayloadAttributes as EthPayloadAttributes,
|
|
||||||
},
|
|
||||||
ExecutionPayloadV1,
|
|
||||||
};
|
|
||||||
|
|
||||||
/// The types used in the default mainnet ethereum beacon consensus engine.
|
/// The types used in the default mainnet ethereum beacon consensus engine.
|
||||||
#[derive(Debug, Default, Clone, serde::Deserialize, serde::Serialize)]
|
#[derive(Debug, Default, Clone, serde::Deserialize, serde::Serialize)]
|
||||||
|
|||||||
@ -3,13 +3,13 @@
|
|||||||
use alloy_eips::eip4844::BlobTransactionSidecar;
|
use alloy_eips::eip4844::BlobTransactionSidecar;
|
||||||
use alloy_primitives::{Address, B256, U256};
|
use alloy_primitives::{Address, B256, U256};
|
||||||
use alloy_rlp::Encodable;
|
use alloy_rlp::Encodable;
|
||||||
use reth_chain_state::ExecutedBlock;
|
use alloy_rpc_types_engine::{
|
||||||
use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes};
|
|
||||||
use reth_primitives::{SealedBlock, Withdrawals};
|
|
||||||
use reth_rpc_types::engine::{
|
|
||||||
ExecutionPayloadEnvelopeV2, ExecutionPayloadEnvelopeV3, ExecutionPayloadEnvelopeV4,
|
ExecutionPayloadEnvelopeV2, ExecutionPayloadEnvelopeV3, ExecutionPayloadEnvelopeV4,
|
||||||
ExecutionPayloadV1, PayloadAttributes, PayloadId,
|
ExecutionPayloadV1, PayloadAttributes, PayloadId,
|
||||||
};
|
};
|
||||||
|
use reth_chain_state::ExecutedBlock;
|
||||||
|
use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes};
|
||||||
|
use reth_primitives::{SealedBlock, Withdrawals};
|
||||||
use reth_rpc_types_compat::engine::payload::{
|
use reth_rpc_types_compat::engine::payload::{
|
||||||
block_to_payload_v1, block_to_payload_v3, block_to_payload_v4,
|
block_to_payload_v1, block_to_payload_v3, block_to_payload_v4,
|
||||||
convert_block_to_payload_field_v2,
|
convert_block_to_payload_field_v2,
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
//! blocks from the network.
|
//! blocks from the network.
|
||||||
|
|
||||||
use alloy_primitives::Sealable;
|
use alloy_primitives::Sealable;
|
||||||
|
use alloy_rpc_types_engine::{JwtError, JwtSecret};
|
||||||
use eyre::Result;
|
use eyre::Result;
|
||||||
use reth_chainspec::ChainSpec;
|
use reth_chainspec::ChainSpec;
|
||||||
use reth_consensus_common::validation::validate_block_pre_execution;
|
use reth_consensus_common::validation::validate_block_pre_execution;
|
||||||
@ -11,7 +12,6 @@ use reth_network_p2p::{
|
|||||||
priority::Priority,
|
priority::Priority,
|
||||||
};
|
};
|
||||||
use reth_primitives::{BlockHashOrNumber, SealedBlock, SealedHeader};
|
use reth_primitives::{BlockHashOrNumber, SealedBlock, SealedHeader};
|
||||||
use reth_rpc_types::engine::{JwtError, JwtSecret};
|
|
||||||
use std::{
|
use std::{
|
||||||
env::VarError,
|
env::VarError,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
//! Version information for reth.
|
//! Version information for reth.
|
||||||
|
use alloy_rpc_types_engine::ClientCode;
|
||||||
use reth_db::ClientVersion;
|
use reth_db::ClientVersion;
|
||||||
use reth_rpc_types::engine::ClientCode;
|
|
||||||
|
|
||||||
/// The client code for Reth
|
/// The client code for Reth
|
||||||
pub const CLIENT_CODE: ClientCode = ClientCode::RH;
|
pub const CLIENT_CODE: ClientCode = ClientCode::RH;
|
||||||
|
|||||||
@ -45,6 +45,7 @@ reth-optimism-forks.workspace = true
|
|||||||
# ethereum
|
# ethereum
|
||||||
alloy-primitives.workspace = true
|
alloy-primitives.workspace = true
|
||||||
op-alloy-rpc-types-engine.workspace = true
|
op-alloy-rpc-types-engine.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
# async
|
# async
|
||||||
async-trait.workspace = true
|
async-trait.workspace = true
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use alloy_rpc_types_engine::{ExecutionPayloadEnvelopeV2, ExecutionPayloadV1};
|
||||||
use op_alloy_rpc_types_engine::{
|
use op_alloy_rpc_types_engine::{
|
||||||
OptimismExecutionPayloadEnvelopeV3, OptimismExecutionPayloadEnvelopeV4,
|
OptimismExecutionPayloadEnvelopeV3, OptimismExecutionPayloadEnvelopeV4,
|
||||||
OptimismPayloadAttributes,
|
OptimismPayloadAttributes,
|
||||||
@ -15,7 +16,6 @@ use reth_node_api::{
|
|||||||
};
|
};
|
||||||
use reth_optimism_forks::OptimismHardfork;
|
use reth_optimism_forks::OptimismHardfork;
|
||||||
use reth_optimism_payload_builder::{OptimismBuiltPayload, OptimismPayloadBuilderAttributes};
|
use reth_optimism_payload_builder::{OptimismBuiltPayload, OptimismPayloadBuilderAttributes};
|
||||||
use reth_rpc_types::{engine::ExecutionPayloadEnvelopeV2, ExecutionPayloadV1};
|
|
||||||
|
|
||||||
/// The types used in the optimism beacon consensus engine.
|
/// The types used in the optimism beacon consensus engine.
|
||||||
#[derive(Debug, Default, Clone, serde::Deserialize, serde::Serialize)]
|
#[derive(Debug, Default, Clone, serde::Deserialize, serde::Serialize)]
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
use crate::utils::{advance_chain, setup};
|
use crate::utils::{advance_chain, setup};
|
||||||
|
use alloy_rpc_types_engine::PayloadStatusEnum;
|
||||||
use reth::blockchain_tree::error::BlockchainTreeError;
|
use reth::blockchain_tree::error::BlockchainTreeError;
|
||||||
use reth_rpc_types::engine::PayloadStatusEnum;
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use tokio::sync::Mutex;
|
use tokio::sync::Mutex;
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,6 @@ reth-primitives.workspace = true
|
|||||||
reth-revm.workspace = true
|
reth-revm.workspace = true
|
||||||
reth-transaction-pool.workspace = true
|
reth-transaction-pool.workspace = true
|
||||||
reth-provider.workspace = true
|
reth-provider.workspace = true
|
||||||
reth-rpc-types.workspace = true
|
|
||||||
reth-rpc-types-compat.workspace = true
|
reth-rpc-types-compat.workspace = true
|
||||||
reth-evm.workspace = true
|
reth-evm.workspace = true
|
||||||
reth-execution-types.workspace = true
|
reth-execution-types.workspace = true
|
||||||
@ -38,6 +37,7 @@ alloy-primitives.workspace = true
|
|||||||
alloy-rlp.workspace = true
|
alloy-rlp.workspace = true
|
||||||
op-alloy-rpc-types-engine.workspace = true
|
op-alloy-rpc-types-engine.workspace = true
|
||||||
revm-primitives.workspace = true
|
revm-primitives.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
use alloy_primitives::{Address, B256, U256};
|
use alloy_primitives::{Address, B256, U256};
|
||||||
use alloy_rlp::Encodable;
|
use alloy_rlp::Encodable;
|
||||||
|
use alloy_rpc_types_engine::{ExecutionPayloadEnvelopeV2, ExecutionPayloadV1, PayloadId};
|
||||||
/// Re-export for use in downstream arguments.
|
/// Re-export for use in downstream arguments.
|
||||||
pub use op_alloy_rpc_types_engine::OptimismPayloadAttributes;
|
pub use op_alloy_rpc_types_engine::OptimismPayloadAttributes;
|
||||||
use op_alloy_rpc_types_engine::{
|
use op_alloy_rpc_types_engine::{
|
||||||
@ -16,7 +17,6 @@ use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes};
|
|||||||
use reth_primitives::{
|
use reth_primitives::{
|
||||||
transaction::WithEncoded, BlobTransactionSidecar, SealedBlock, TransactionSigned, Withdrawals,
|
transaction::WithEncoded, BlobTransactionSidecar, SealedBlock, TransactionSigned, Withdrawals,
|
||||||
};
|
};
|
||||||
use reth_rpc_types::engine::{ExecutionPayloadEnvelopeV2, ExecutionPayloadV1, PayloadId};
|
|
||||||
use reth_rpc_types_compat::engine::payload::{
|
use reth_rpc_types_compat::engine::payload::{
|
||||||
block_to_payload_v1, block_to_payload_v3, block_to_payload_v4,
|
block_to_payload_v1, block_to_payload_v3, block_to_payload_v4,
|
||||||
convert_block_to_payload_field_v2,
|
convert_block_to_payload_field_v2,
|
||||||
|
|||||||
@ -14,7 +14,6 @@ workspace = true
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
# reth
|
# reth
|
||||||
reth-primitives.workspace = true
|
reth-primitives.workspace = true
|
||||||
reth-rpc-types.workspace = true
|
|
||||||
reth-rpc-eth-api.workspace = true
|
reth-rpc-eth-api.workspace = true
|
||||||
reth-engine-primitives.workspace = true
|
reth-engine-primitives.workspace = true
|
||||||
reth-network-peers.workspace = true
|
reth-network-peers.workspace = true
|
||||||
@ -33,6 +32,7 @@ alloy-rpc-types-txpool.workspace = true
|
|||||||
alloy-rpc-types-admin.workspace = true
|
alloy-rpc-types-admin.workspace = true
|
||||||
alloy-serde.workspace = true
|
alloy-serde.workspace = true
|
||||||
alloy-rpc-types-beacon.workspace = true
|
alloy-rpc-types-beacon.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
jsonrpsee = { workspace = true, features = ["server", "macros"] }
|
jsonrpsee = { workspace = true, features = ["server", "macros"] }
|
||||||
|
|||||||
@ -9,15 +9,15 @@ use alloy_primitives::{Address, BlockHash, Bytes, B256, U256, U64};
|
|||||||
use alloy_rpc_types::{
|
use alloy_rpc_types::{
|
||||||
state::StateOverride, BlockOverrides, EIP1186AccountProofResponse, Filter, Log, SyncStatus,
|
state::StateOverride, BlockOverrides, EIP1186AccountProofResponse, Filter, Log, SyncStatus,
|
||||||
};
|
};
|
||||||
use alloy_rpc_types_eth::transaction::TransactionRequest;
|
use alloy_rpc_types_engine::{
|
||||||
use alloy_serde::JsonStorageKey;
|
|
||||||
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
|
|
||||||
use reth_engine_primitives::EngineTypes;
|
|
||||||
use reth_rpc_types::engine::{
|
|
||||||
ClientVersionV1, ExecutionPayloadBodiesV1, ExecutionPayloadBodiesV2, ExecutionPayloadInputV2,
|
ClientVersionV1, ExecutionPayloadBodiesV1, ExecutionPayloadBodiesV2, ExecutionPayloadInputV2,
|
||||||
ExecutionPayloadV1, ExecutionPayloadV3, ExecutionPayloadV4, ForkchoiceState, ForkchoiceUpdated,
|
ExecutionPayloadV1, ExecutionPayloadV3, ExecutionPayloadV4, ForkchoiceState, ForkchoiceUpdated,
|
||||||
PayloadId, PayloadStatus, TransitionConfiguration,
|
PayloadId, PayloadStatus, TransitionConfiguration,
|
||||||
};
|
};
|
||||||
|
use alloy_rpc_types_eth::transaction::TransactionRequest;
|
||||||
|
use alloy_serde::JsonStorageKey;
|
||||||
|
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
|
||||||
|
use reth_engine_primitives::EngineTypes;
|
||||||
// NOTE: We can't use associated types in the `EngineApi` trait because of jsonrpsee, so we use a
|
// NOTE: We can't use associated types in the `EngineApi` trait because of jsonrpsee, so we use a
|
||||||
// generic here. It would be nice if the rpc macro would understand which types need to have serde.
|
// generic here. It would be nice if the rpc macro would understand which types need to have serde.
|
||||||
// By default, if the trait has a generic, the rpc macro will add e.g. `Engine: DeserializeOwned` to
|
// By default, if the trait has a generic, the rpc macro will add e.g. `Engine: DeserializeOwned` to
|
||||||
|
|||||||
@ -72,6 +72,7 @@ reth-rpc-types-compat.workspace = true
|
|||||||
alloy-primitives.workspace = true
|
alloy-primitives.workspace = true
|
||||||
alloy-rpc-types-eth.workspace = true
|
alloy-rpc-types-eth.workspace = true
|
||||||
alloy-rpc-types-trace.workspace = true
|
alloy-rpc-types-trace.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
tokio = { workspace = true, features = ["rt", "rt-multi-thread"] }
|
tokio = { workspace = true, features = ["rt", "rt-multi-thread"] }
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
|
|||||||
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
use crate::utils::launch_auth;
|
use crate::utils::launch_auth;
|
||||||
use alloy_primitives::U64;
|
use alloy_primitives::U64;
|
||||||
|
use alloy_rpc_types_engine::{ForkchoiceState, PayloadId, TransitionConfiguration};
|
||||||
use jsonrpsee::core::client::{ClientT, SubscriptionClientT};
|
use jsonrpsee::core::client::{ClientT, SubscriptionClientT};
|
||||||
use reth_ethereum_engine_primitives::EthEngineTypes;
|
use reth_ethereum_engine_primitives::EthEngineTypes;
|
||||||
use reth_primitives::Block;
|
use reth_primitives::Block;
|
||||||
use reth_rpc_api::clients::EngineApiClient;
|
use reth_rpc_api::clients::EngineApiClient;
|
||||||
use reth_rpc_layer::JwtSecret;
|
use reth_rpc_layer::JwtSecret;
|
||||||
use reth_rpc_types::engine::{ForkchoiceState, PayloadId, TransitionConfiguration};
|
|
||||||
use reth_rpc_types_compat::engine::payload::{
|
use reth_rpc_types_compat::engine::payload::{
|
||||||
block_to_payload_v1, convert_block_to_payload_input_v2,
|
block_to_payload_v1, convert_block_to_payload_input_v2,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
|
use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
|
||||||
|
|
||||||
|
use alloy_rpc_types_engine::{ClientCode, ClientVersionV1};
|
||||||
use reth_beacon_consensus::BeaconConsensusEngineHandle;
|
use reth_beacon_consensus::BeaconConsensusEngineHandle;
|
||||||
use reth_chainspec::MAINNET;
|
use reth_chainspec::MAINNET;
|
||||||
use reth_ethereum_engine_primitives::{EthEngineTypes, EthereumEngineValidator};
|
use reth_ethereum_engine_primitives::{EthEngineTypes, EthereumEngineValidator};
|
||||||
@ -15,7 +16,6 @@ use reth_rpc_builder::{
|
|||||||
use reth_rpc_engine_api::{capabilities::EngineCapabilities, EngineApi};
|
use reth_rpc_engine_api::{capabilities::EngineCapabilities, EngineApi};
|
||||||
use reth_rpc_layer::JwtSecret;
|
use reth_rpc_layer::JwtSecret;
|
||||||
use reth_rpc_server_types::RpcModuleSelection;
|
use reth_rpc_server_types::RpcModuleSelection;
|
||||||
use reth_rpc_types::engine::{ClientCode, ClientVersionV1};
|
|
||||||
use reth_tasks::TokioTaskExecutor;
|
use reth_tasks::TokioTaskExecutor;
|
||||||
use reth_transaction_pool::{
|
use reth_transaction_pool::{
|
||||||
noop::NoopTransactionPool,
|
noop::NoopTransactionPool,
|
||||||
|
|||||||
@ -30,6 +30,7 @@ reth-transaction-pool.workspace = true
|
|||||||
# ethereum
|
# ethereum
|
||||||
alloy-eips.workspace = true
|
alloy-eips.workspace = true
|
||||||
alloy-primitives.workspace = true
|
alloy-primitives.workspace = true
|
||||||
|
alloy-rpc-types-engine = { workspace = true, features = ["jsonrpsee-types"] }
|
||||||
|
|
||||||
# async
|
# async
|
||||||
tokio = { workspace = true, features = ["sync"] }
|
tokio = { workspace = true, features = ["sync"] }
|
||||||
|
|||||||
@ -3,6 +3,12 @@ use crate::{
|
|||||||
};
|
};
|
||||||
use alloy_eips::eip4844::BlobAndProofV1;
|
use alloy_eips::eip4844::BlobAndProofV1;
|
||||||
use alloy_primitives::{BlockHash, BlockNumber, B256, U64};
|
use alloy_primitives::{BlockHash, BlockNumber, B256, U64};
|
||||||
|
use alloy_rpc_types_engine::{
|
||||||
|
CancunPayloadFields, ClientVersionV1, ExecutionPayload, ExecutionPayloadBodiesV1,
|
||||||
|
ExecutionPayloadBodiesV2, ExecutionPayloadInputV2, ExecutionPayloadV1, ExecutionPayloadV3,
|
||||||
|
ExecutionPayloadV4, ForkchoiceState, ForkchoiceUpdated, PayloadId, PayloadStatus,
|
||||||
|
TransitionConfiguration,
|
||||||
|
};
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use jsonrpsee_core::RpcResult;
|
use jsonrpsee_core::RpcResult;
|
||||||
use reth_beacon_consensus::BeaconConsensusEngineHandle;
|
use reth_beacon_consensus::BeaconConsensusEngineHandle;
|
||||||
@ -16,12 +22,6 @@ use reth_payload_primitives::{
|
|||||||
};
|
};
|
||||||
use reth_primitives::{Block, BlockHashOrNumber, EthereumHardfork};
|
use reth_primitives::{Block, BlockHashOrNumber, EthereumHardfork};
|
||||||
use reth_rpc_api::EngineApiServer;
|
use reth_rpc_api::EngineApiServer;
|
||||||
use reth_rpc_types::engine::{
|
|
||||||
CancunPayloadFields, ClientVersionV1, ExecutionPayload, ExecutionPayloadBodiesV1,
|
|
||||||
ExecutionPayloadBodiesV2, ExecutionPayloadInputV2, ExecutionPayloadV1, ExecutionPayloadV3,
|
|
||||||
ExecutionPayloadV4, ForkchoiceState, ForkchoiceUpdated, PayloadId, PayloadStatus,
|
|
||||||
TransitionConfiguration,
|
|
||||||
};
|
|
||||||
use reth_rpc_types_compat::engine::payload::{
|
use reth_rpc_types_compat::engine::payload::{
|
||||||
convert_payload_input_v2_to_payload, convert_to_payload_body_v1, convert_to_payload_body_v2,
|
convert_payload_input_v2_to_payload, convert_to_payload_body_v1, convert_to_payload_body_v2,
|
||||||
};
|
};
|
||||||
@ -948,6 +948,7 @@ where
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use alloy_rpc_types_engine::{ClientCode, ClientVersionV1};
|
||||||
use assert_matches::assert_matches;
|
use assert_matches::assert_matches;
|
||||||
use reth_beacon_consensus::{BeaconConsensusEngineEvent, BeaconEngineMessage};
|
use reth_beacon_consensus::{BeaconConsensusEngineEvent, BeaconEngineMessage};
|
||||||
use reth_chainspec::{ChainSpec, MAINNET};
|
use reth_chainspec::{ChainSpec, MAINNET};
|
||||||
@ -955,7 +956,6 @@ mod tests {
|
|||||||
use reth_payload_builder::test_utils::spawn_test_payload_service;
|
use reth_payload_builder::test_utils::spawn_test_payload_service;
|
||||||
use reth_primitives::SealedBlock;
|
use reth_primitives::SealedBlock;
|
||||||
use reth_provider::test_utils::MockEthProvider;
|
use reth_provider::test_utils::MockEthProvider;
|
||||||
use reth_rpc_types::engine::{ClientCode, ClientVersionV1};
|
|
||||||
use reth_rpc_types_compat::engine::payload::execution_payload_from_sealed_block;
|
use reth_rpc_types_compat::engine::payload::execution_payload_from_sealed_block;
|
||||||
use reth_tasks::TokioTaskExecutor;
|
use reth_tasks::TokioTaskExecutor;
|
||||||
use reth_testing_utils::generators::random_block;
|
use reth_testing_utils::generators::random_block;
|
||||||
|
|||||||
@ -195,7 +195,7 @@ impl From<EngineApiError> for jsonrpsee_types::error::ErrorObject<'static> {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use reth_rpc_types::engine::ForkchoiceUpdateError;
|
use alloy_rpc_types_engine::ForkchoiceUpdateError;
|
||||||
|
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
fn ensure_engine_rpc_error(
|
fn ensure_engine_rpc_error(
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use crate::EngineApiError;
|
use crate::EngineApiError;
|
||||||
|
use alloy_rpc_types_engine::{ForkchoiceUpdated, PayloadStatus, PayloadStatusEnum};
|
||||||
use metrics::{Counter, Histogram};
|
use metrics::{Counter, Histogram};
|
||||||
use reth_metrics::Metrics;
|
use reth_metrics::Metrics;
|
||||||
use reth_rpc_types::engine::{ForkchoiceUpdated, PayloadStatus, PayloadStatusEnum};
|
|
||||||
|
|
||||||
/// All beacon consensus engine metrics
|
/// All beacon consensus engine metrics
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
@ -61,16 +61,16 @@ pub(crate) struct ForkchoiceUpdatedResponseMetrics {
|
|||||||
/// The total count of forkchoice updated messages received.
|
/// The total count of forkchoice updated messages received.
|
||||||
pub(crate) forkchoice_updated_messages: Counter,
|
pub(crate) forkchoice_updated_messages: Counter,
|
||||||
/// The total count of forkchoice updated messages that we responded to with
|
/// The total count of forkchoice updated messages that we responded to with
|
||||||
/// [Invalid](reth_rpc_types::engine::PayloadStatusEnum#Invalid).
|
/// [`Invalid`](alloy_rpc_types_engine::PayloadStatusEnum#Invalid).
|
||||||
pub(crate) forkchoice_updated_invalid: Counter,
|
pub(crate) forkchoice_updated_invalid: Counter,
|
||||||
/// The total count of forkchoice updated messages that we responded to with
|
/// The total count of forkchoice updated messages that we responded to with
|
||||||
/// [Valid](reth_rpc_types::engine::PayloadStatusEnum#Valid).
|
/// [`Valid`](alloy_rpc_types_engine::PayloadStatusEnum#Valid).
|
||||||
pub(crate) forkchoice_updated_valid: Counter,
|
pub(crate) forkchoice_updated_valid: Counter,
|
||||||
/// The total count of forkchoice updated messages that we responded to with
|
/// The total count of forkchoice updated messages that we responded to with
|
||||||
/// [Syncing](reth_rpc_types::engine::PayloadStatusEnum#Syncing).
|
/// [`Syncing`](alloy_rpc_types_engine::PayloadStatusEnum#Syncing).
|
||||||
pub(crate) forkchoice_updated_syncing: Counter,
|
pub(crate) forkchoice_updated_syncing: Counter,
|
||||||
/// The total count of forkchoice updated messages that we responded to with
|
/// The total count of forkchoice updated messages that we responded to with
|
||||||
/// [Accepted](reth_rpc_types::engine::PayloadStatusEnum#Accepted).
|
/// [`Accepted`](alloy_rpc_types_engine::PayloadStatusEnum#Accepted).
|
||||||
pub(crate) forkchoice_updated_accepted: Counter,
|
pub(crate) forkchoice_updated_accepted: Counter,
|
||||||
/// The total count of forkchoice updated messages that were unsuccessful, i.e. we responded
|
/// The total count of forkchoice updated messages that were unsuccessful, i.e. we responded
|
||||||
/// with an error type that is not a [`PayloadStatusEnum`].
|
/// with an error type that is not a [`PayloadStatusEnum`].
|
||||||
@ -84,16 +84,16 @@ pub(crate) struct NewPayloadStatusResponseMetrics {
|
|||||||
/// The total count of new payload messages received.
|
/// The total count of new payload messages received.
|
||||||
pub(crate) new_payload_messages: Counter,
|
pub(crate) new_payload_messages: Counter,
|
||||||
/// The total count of new payload messages that we responded to with
|
/// The total count of new payload messages that we responded to with
|
||||||
/// [Invalid](reth_rpc_types::engine::PayloadStatusEnum#Invalid).
|
/// [Invalid](alloy_rpc_types_engine::PayloadStatusEnum#Invalid).
|
||||||
pub(crate) new_payload_invalid: Counter,
|
pub(crate) new_payload_invalid: Counter,
|
||||||
/// The total count of new payload messages that we responded to with
|
/// The total count of new payload messages that we responded to with
|
||||||
/// [Valid](reth_rpc_types::engine::PayloadStatusEnum#Valid).
|
/// [Valid](alloy_rpc_types_engine::PayloadStatusEnum#Valid).
|
||||||
pub(crate) new_payload_valid: Counter,
|
pub(crate) new_payload_valid: Counter,
|
||||||
/// The total count of new payload messages that we responded to with
|
/// The total count of new payload messages that we responded to with
|
||||||
/// [Syncing](reth_rpc_types::engine::PayloadStatusEnum#Syncing).
|
/// [Syncing](alloy_rpc_types_engine::PayloadStatusEnum#Syncing).
|
||||||
pub(crate) new_payload_syncing: Counter,
|
pub(crate) new_payload_syncing: Counter,
|
||||||
/// The total count of new payload messages that we responded to with
|
/// The total count of new payload messages that we responded to with
|
||||||
/// [Accepted](reth_rpc_types::engine::PayloadStatusEnum#Accepted).
|
/// [Accepted](alloy_rpc_types_engine::PayloadStatusEnum#Accepted).
|
||||||
pub(crate) new_payload_accepted: Counter,
|
pub(crate) new_payload_accepted: Counter,
|
||||||
/// The total count of new payload messages that were unsuccessful, i.e. we responded with an
|
/// The total count of new payload messages that were unsuccessful, i.e. we responded with an
|
||||||
/// error type that is not a [`PayloadStatusEnum`].
|
/// error type that is not a [`PayloadStatusEnum`].
|
||||||
|
|||||||
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
use alloy_primitives::{Bytes, U256};
|
use alloy_primitives::{Bytes, U256};
|
||||||
use alloy_rlp::{Decodable, Error as RlpError};
|
use alloy_rlp::{Decodable, Error as RlpError};
|
||||||
|
use alloy_rpc_types_engine::{
|
||||||
|
ExecutionPayload, ExecutionPayloadBodyV1, ExecutionPayloadV1, PayloadError,
|
||||||
|
};
|
||||||
use assert_matches::assert_matches;
|
use assert_matches::assert_matches;
|
||||||
use reth_primitives::{
|
use reth_primitives::{
|
||||||
alloy_primitives::Sealable, proofs, Block, SealedBlock, SealedHeader, TransactionSigned,
|
alloy_primitives::Sealable, proofs, Block, SealedBlock, SealedHeader, TransactionSigned,
|
||||||
Withdrawals,
|
Withdrawals,
|
||||||
};
|
};
|
||||||
use reth_rpc_types::engine::{
|
|
||||||
ExecutionPayload, ExecutionPayloadBodyV1, ExecutionPayloadV1, PayloadError,
|
|
||||||
};
|
|
||||||
use reth_rpc_types_compat::engine::payload::{
|
use reth_rpc_types_compat::engine::payload::{
|
||||||
block_to_payload, block_to_payload_v1, convert_to_payload_body_v1, try_into_sealed_block,
|
block_to_payload, block_to_payload_v1, convert_to_payload_body_v1, try_into_sealed_block,
|
||||||
try_payload_v1_to_block,
|
try_payload_v1_to_block,
|
||||||
|
|||||||
@ -15,10 +15,10 @@ workspace = true
|
|||||||
reth-errors.workspace = true
|
reth-errors.workspace = true
|
||||||
reth-network-api.workspace = true
|
reth-network-api.workspace = true
|
||||||
reth-primitives.workspace = true
|
reth-primitives.workspace = true
|
||||||
reth-rpc-types.workspace = true
|
|
||||||
|
|
||||||
# ethereum
|
# ethereum
|
||||||
alloy-primitives.workspace = true
|
alloy-primitives.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
# rpc
|
# rpc
|
||||||
jsonrpsee-core.workspace = true
|
jsonrpsee-core.workspace = true
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
|
use alloy_rpc_types_engine::PayloadError;
|
||||||
use jsonrpsee_core::RpcResult;
|
use jsonrpsee_core::RpcResult;
|
||||||
use reth_primitives::BlockId;
|
use reth_primitives::BlockId;
|
||||||
use reth_rpc_types::engine::PayloadError;
|
|
||||||
|
|
||||||
/// Helper trait to easily convert various `Result` types into [`RpcResult`]
|
/// Helper trait to easily convert various `Result` types into [`RpcResult`]
|
||||||
pub trait ToRpcResult<Ok, Err>: Sized {
|
pub trait ToRpcResult<Ok, Err>: Sized {
|
||||||
|
|||||||
@ -14,7 +14,6 @@ workspace = true
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
# reth
|
# reth
|
||||||
reth-primitives.workspace = true
|
reth-primitives.workspace = true
|
||||||
reth-rpc-types.workspace = true
|
|
||||||
reth-trie-common.workspace = true
|
reth-trie-common.workspace = true
|
||||||
|
|
||||||
# ethereum
|
# ethereum
|
||||||
@ -23,6 +22,7 @@ alloy-rlp.workspace = true
|
|||||||
alloy-rpc-types.workspace = true
|
alloy-rpc-types.workspace = true
|
||||||
alloy-rpc-types-eth = { workspace = true, default-features = false, features = ["serde"] }
|
alloy-rpc-types-eth = { workspace = true, default-features = false, features = ["serde"] }
|
||||||
alloy-serde.workspace = true
|
alloy-serde.workspace = true
|
||||||
|
alloy-rpc-types-engine.workspace = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
|
|||||||
@ -2,16 +2,16 @@
|
|||||||
//! Ethereum's Engine
|
//! Ethereum's Engine
|
||||||
|
|
||||||
use alloy_primitives::{B256, U256};
|
use alloy_primitives::{B256, U256};
|
||||||
|
use alloy_rpc_types_engine::{
|
||||||
|
payload::{ExecutionPayloadBodyV1, ExecutionPayloadFieldV2, ExecutionPayloadInputV2},
|
||||||
|
ExecutionPayload, ExecutionPayloadBodyV2, ExecutionPayloadV1, ExecutionPayloadV2,
|
||||||
|
ExecutionPayloadV3, ExecutionPayloadV4, PayloadError,
|
||||||
|
};
|
||||||
use reth_primitives::{
|
use reth_primitives::{
|
||||||
constants::{EMPTY_OMMER_ROOT_HASH, MAXIMUM_EXTRA_DATA_SIZE},
|
constants::{EMPTY_OMMER_ROOT_HASH, MAXIMUM_EXTRA_DATA_SIZE},
|
||||||
proofs::{self},
|
proofs::{self},
|
||||||
Block, BlockBody, Header, Request, SealedBlock, TransactionSigned, Withdrawals,
|
Block, BlockBody, Header, Request, SealedBlock, TransactionSigned, Withdrawals,
|
||||||
};
|
};
|
||||||
use reth_rpc_types::engine::{
|
|
||||||
payload::{ExecutionPayloadBodyV1, ExecutionPayloadFieldV2, ExecutionPayloadInputV2},
|
|
||||||
ExecutionPayload, ExecutionPayloadBodyV2, ExecutionPayloadV1, ExecutionPayloadV2,
|
|
||||||
ExecutionPayloadV3, ExecutionPayloadV4, PayloadError,
|
|
||||||
};
|
|
||||||
|
|
||||||
/// Converts [`ExecutionPayloadV1`] to [`Block`]
|
/// Converts [`ExecutionPayloadV1`] to [`Block`]
|
||||||
pub fn try_payload_v1_to_block(payload: ExecutionPayloadV1) -> Result<Block, PayloadError> {
|
pub fn try_payload_v1_to_block(payload: ExecutionPayloadV1) -> Result<Block, PayloadError> {
|
||||||
@ -443,9 +443,9 @@ mod tests {
|
|||||||
validate_block_hash,
|
validate_block_hash,
|
||||||
};
|
};
|
||||||
use alloy_primitives::{b256, hex, Bytes, U256};
|
use alloy_primitives::{b256, hex, Bytes, U256};
|
||||||
use reth_rpc_types::{
|
use alloy_rpc_types_engine::{
|
||||||
engine::{CancunPayloadFields, ExecutionPayloadV3, ExecutionPayloadV4},
|
CancunPayloadFields, ExecutionPayload, ExecutionPayloadV1, ExecutionPayloadV2,
|
||||||
ExecutionPayload, ExecutionPayloadV1, ExecutionPayloadV2,
|
ExecutionPayloadV3, ExecutionPayloadV4,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@ -12,10 +12,6 @@ description = "Reth RPC types"
|
|||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
# ethereum
|
|
||||||
alloy-rpc-types-engine = { workspace = true, features = ["std", "serde", "jsonrpsee-types"], optional = true }
|
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
jsonrpsee-types = { workspace = true, optional = true }
|
jsonrpsee-types = { workspace = true, optional = true }
|
||||||
|
|
||||||
@ -25,6 +21,4 @@ jsonrpsee-types = { workspace = true, optional = true }
|
|||||||
default = ["jsonrpsee-types"]
|
default = ["jsonrpsee-types"]
|
||||||
jsonrpsee-types = [
|
jsonrpsee-types = [
|
||||||
"dep:jsonrpsee-types",
|
"dep:jsonrpsee-types",
|
||||||
"dep:alloy-rpc-types-engine",
|
|
||||||
"alloy-rpc-types-engine/jsonrpsee-types",
|
|
||||||
]
|
]
|
||||||
@ -1,7 +1,3 @@
|
|||||||
//! Ethereum related types
|
//! Ethereum related types
|
||||||
|
|
||||||
pub(crate) mod error;
|
pub(crate) mod error;
|
||||||
|
|
||||||
// re-export
|
|
||||||
#[cfg(feature = "jsonrpsee-types")]
|
|
||||||
pub use alloy_rpc_types_engine as engine;
|
|
||||||
|
|||||||
@ -15,10 +15,3 @@ mod eth;
|
|||||||
// Ethereum specific rpc types related to typed transaction requests and the engine API.
|
// Ethereum specific rpc types related to typed transaction requests and the engine API.
|
||||||
#[cfg(feature = "jsonrpsee-types")]
|
#[cfg(feature = "jsonrpsee-types")]
|
||||||
pub use eth::error::ToRpcError;
|
pub use eth::error::ToRpcError;
|
||||||
#[cfg(feature = "jsonrpsee-types")]
|
|
||||||
pub use eth::{
|
|
||||||
engine,
|
|
||||||
engine::{
|
|
||||||
ExecutionPayload, ExecutionPayloadV1, ExecutionPayloadV2, ExecutionPayloadV3, PayloadError,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|||||||
Reference in New Issue
Block a user