chore: Add ClientInput struct to reth-stateless (#16320)

This commit is contained in:
kevaundray
2025-05-22 11:50:04 +01:00
committed by GitHub
parent 877c16aa8d
commit 9060b6eb94
3 changed files with 21 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ alloy-rpc-types-debug.workspace = true
# reth
reth-ethereum-consensus.workspace = true
reth-primitives-traits.workspace = true
reth-ethereum-primitives.workspace = true
reth-ethereum-primitives = { workspace = true, features = ["serde", "serde-bincode-compat"] }
reth-errors.workspace = true
reth-evm.workspace = true
reth-revm.workspace = true
@@ -34,3 +34,5 @@ reth-consensus.workspace = true
# misc
thiserror.workspace = true
itertools.workspace = true
serde.workspace = true
serde_with.workspace = true

View File

@@ -42,3 +42,19 @@ pub(crate) mod witness_db;
#[doc(inline)]
pub use alloy_rpc_types_debug::ExecutionWitness;
use reth_ethereum_primitives::Block;
/// StatelessInput is a convenience structure for serializing the input needed
/// for the stateless validation function.
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, serde::Serialize, serde::Deserialize)]
pub struct StatelessInput {
/// The block being executed in the stateless validation function
#[serde_as(
as = "reth_primitives_traits::serde_bincode_compat::Block<reth_ethereum_primitives::TransactionSigned, alloy_consensus::Header>"
)]
pub block: Block,
/// ExecutionWitness for the stateless validation function
pub witness: ExecutionWitness,
}