⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
93cb8fd
create primitives
randygrok Jan 13, 2026
d525ad2
work until rpc
randygrok Jan 14, 2026
77e5614
reorder paths
randygrok Jan 19, 2026
9e61d28
finish impl phase 1
randygrok Jan 19, 2026
738d8f9
fix lint
randygrok Jan 19, 2026
0992079
fix linter
randygrok Jan 19, 2026
400e072
fix clippy
randygrok Jan 19, 2026
d8cf5f5
fix clippy 2
randygrok Jan 19, 2026
3c1af2b
fmt linter
randygrok Jan 19, 2026
f5e1c19
Merge remote-tracking branch 'origin/main' into randygrok/adr-phase2
randygrok Jan 19, 2026
e182cdd
fix e2e tests
randygrok Jan 19, 2026
185a52e
remove error on payload builder when ev node tx
randygrok Jan 19, 2026
dae3ab6
add e2e test for signature of sponsorship
randygrok Jan 20, 2026
0f23ac3
fmt: format e2e tests
jgimeno Jan 20, 2026
d10f79e
fix issue with fee payer
jgimeno Jan 21, 2026
46081cc
Merge main
randygrok Jan 21, 2026
073760c
fix clippy
randygrok Jan 21, 2026
5555a95
fmt
randygrok Jan 21, 2026
c921f2f
add case where invalid signature was included but did not allow to bu…
randygrok Jan 21, 2026
25c810a
fix lint problems
randygrok Jan 21, 2026
b735012
add case where the vector is empty.
randygrok Jan 21, 2026
71b419f
fix max gax limits calculations
randygrok Jan 22, 2026
9b49507
revert and create logic increases nonce
randygrok Jan 22, 2026
fb81941
fix linter
randygrok Jan 22, 2026
07bf8ef
improve panic messages and add docs for Compact trait implementations
randygrok Jan 22, 2026
2670b5d
address comments from PR
randygrok Jan 22, 2026
75a4977
Merge branch 'main' into randygrok/adr-phase2
randygrok Jan 22, 2026
fd177fd
fix: address clippy warnings and formatting
randygrok Jan 22, 2026
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
31 changes: 31 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ resolver = "2"
members = [
"bin/ev-reth",
"crates/common",
"crates/ev-primitives",
"crates/evolve",
"crates/node",
"crates/tests",
Expand Down Expand Up @@ -47,13 +48,14 @@ reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth.git", tag =
reth-network = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-network-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-db-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-ethereum = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-ethereum-cli = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-engine-local = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-engine-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4", features = ["serde", "serde-bincode-compat", "reth-codec"] }
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-evm = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
Expand All @@ -69,8 +71,12 @@ reth-revm = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-rpc-engine-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-rpc = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-rpc-convert = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-codecs = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }

ev-revm = { path = "crates/ev-revm" }
ev-primitives = { path = "crates/ev-primitives" }


# Consensus dependencies
Expand Down Expand Up @@ -106,12 +112,18 @@ alloy-rpc-types-eth = { version = "1.0.37", default-features = false }
alloy-rpc-types-engine = { version = "1.0.37", default-features = false }
alloy-signer = { version = "1.0.37", default-features = false }
alloy-signer-local = { version = "1.0.37", features = ["mnemonic"] }
alloy-serde = { version = "1.0.37", default-features = false }
alloy-primitives = { version = "1.3.1", default-features = false }
alloy-consensus = { version = "1.0.37", default-features = false }
alloy-consensus-any = { version = "1.0.37", default-features = false }
alloy-rlp = { version = "0.3.12", default-features = false }
alloy-genesis = { version = "1.0.37", default-features = false }
alloy-rpc-types-txpool = { version = "1.0.37", default-features = false }
alloy-sol-types = { version = "1.3.1", default-features = false }

# Utility dependencies
bytes = "1.10.1"

revm-inspector = { version = "10.0.1" }
# Core dependencies
eyre = "0.6"
Expand Down
22 changes: 22 additions & 0 deletions crates/ev-primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "ev-primitives"
version = "0.1.0"
edition = "2021"
rust-version = "1.82"
license = "MIT OR Apache-2.0"

[dependencies]
alloy-consensus = { workspace = true }
alloy-eips = { workspace = true, features = ["serde"] }
alloy-primitives = { workspace = true, features = ["k256", "rlp", "serde"] }
alloy-serde = { workspace = true }
alloy-rlp = { workspace = true, features = ["derive"] }
bytes = { workspace = true }
reth-codecs = { workspace = true }
reth-db-api = { workspace = true }
reth-ethereum-primitives = { workspace = true }
reth-primitives-traits = { workspace = true, features = ["serde-bincode-compat"] }
serde = { workspace = true, features = ["derive"] }

[features]
serde-bincode-compat = ["reth-primitives-traits/serde-bincode-compat"]
33 changes: 33 additions & 0 deletions crates/ev-primitives/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//! EV-specific primitive types, including the EvNode 0x76 transaction.

mod pool;
mod tx;

pub use pool::{EvPooledTxEnvelope, EvPooledTxType};
pub use tx::{
Call, EvNodeSignedTx, EvNodeTransaction, EvTxEnvelope, EvTxType, TransactionSigned,
EVNODE_SPONSOR_DOMAIN, EVNODE_TX_TYPE_ID,
};

use reth_primitives_traits::NodePrimitives;

/// Block type alias for ev-reth.
pub type Block = alloy_consensus::Block<TransactionSigned>;

/// Block body type alias for ev-reth.
pub type BlockBody = alloy_consensus::BlockBody<TransactionSigned>;

/// Receipt type alias for ev-reth.
pub type Receipt = reth_ethereum_primitives::Receipt<EvTxType>;

/// Helper struct that specifies the ev-reth NodePrimitives types.
#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct EvPrimitives;

impl NodePrimitives for EvPrimitives {
type Block = Block;
type BlockHeader = alloy_consensus::Header;
type BlockBody = BlockBody;
type SignedTx = TransactionSigned;
type Receipt = Receipt;
}
89 changes: 89 additions & 0 deletions crates/ev-primitives/src/pool.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
//! Pooled transaction envelope for ev-reth.
//!
//! This module defines [`EvPooledTxEnvelope`], the transaction type used by Reth's transaction
//! pool. It wraps both standard Ethereum pooled transactions (which may include blob sidecars)
//! and EvNode transactions.
//!
//! The traits implemented here are required by Reth's transaction pool infrastructure:
//! - [`InMemorySize`]: Memory accounting for pool size limits
//! - [`SignerRecoverable`]: Sender address recovery for validation
//! - [`TxHashRef`]: Transaction hash access for deduplication
//! - [`SignedTransaction`]: Marker trait for signed transaction types

use alloy_consensus::{
error::ValueError,
transaction::{SignerRecoverable, TxHashRef},
TransactionEnvelope,
};
use alloy_primitives::{Address, B256};
use reth_primitives_traits::{InMemorySize, SignedTransaction};

use crate::tx::{EvNodeSignedTx, EvTxEnvelope};

/// Pooled transaction envelope with optional blob sidecar support.
#[derive(Clone, Debug, TransactionEnvelope)]
#[envelope(tx_type_name = EvPooledTxType)]
pub enum EvPooledTxEnvelope {
/// Standard Ethereum pooled transaction envelope (may include blob sidecar).
#[envelope(flatten)]
Ethereum(reth_ethereum_primitives::PooledTransactionVariant),
/// EvNode typed transaction (no sidecar).
#[envelope(ty = 0x76)]
EvNode(EvNodeSignedTx),
}

impl InMemorySize for EvPooledTxEnvelope {
fn size(&self) -> usize {
match self {
EvPooledTxEnvelope::Ethereum(tx) => tx.size(),
EvPooledTxEnvelope::EvNode(tx) => tx.size(),
}
}
}

impl SignerRecoverable for EvPooledTxEnvelope {
fn recover_signer(&self) -> Result<Address, alloy_consensus::crypto::RecoveryError> {
match self {
EvPooledTxEnvelope::Ethereum(tx) => tx.recover_signer(),
EvPooledTxEnvelope::EvNode(tx) => tx
.signature()
.recover_address_from_prehash(&tx.tx().executor_signing_hash())
.map_err(|_| alloy_consensus::crypto::RecoveryError::new()),
}
}

fn recover_signer_unchecked(&self) -> Result<Address, alloy_consensus::crypto::RecoveryError> {
self.recover_signer()
}
}

impl TxHashRef for EvPooledTxEnvelope {
fn tx_hash(&self) -> &B256 {
match self {
EvPooledTxEnvelope::Ethereum(tx) => tx.tx_hash(),
EvPooledTxEnvelope::EvNode(tx) => tx.hash(),
}
}
}

impl TryFrom<EvTxEnvelope> for EvPooledTxEnvelope {
type Error = ValueError<reth_ethereum_primitives::TransactionSigned>;

fn try_from(value: EvTxEnvelope) -> Result<Self, Self::Error> {
match value {
EvTxEnvelope::Ethereum(tx) => Ok(Self::Ethereum(tx.try_into()?)),
EvTxEnvelope::EvNode(tx) => Ok(Self::EvNode(tx)),
}
}
}

impl From<EvPooledTxEnvelope> for EvTxEnvelope {
fn from(value: EvPooledTxEnvelope) -> Self {
match value {
EvPooledTxEnvelope::Ethereum(tx) => EvTxEnvelope::Ethereum(tx.into()),
EvPooledTxEnvelope::EvNode(tx) => EvTxEnvelope::EvNode(tx),
}
}
}

impl SignedTransaction for EvPooledTxEnvelope {}
Loading