Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
15215c8
Draft ADR for typed sponsorship transactions
randygrok Jan 5, 2026
a531fc6
Add SponsorTransaction type
randygrok Jan 5, 2026
fd31a25
Revert "Add SponsorTransaction type"
randygrok Jan 5, 2026
9682332
Update ADR for standard-signed typed tx
randygrok Jan 7, 2026
ef4dee4
Expand ADR with payload signing details
randygrok Jan 7, 2026
6be2a11
Document sponsorship validation locations
randygrok Jan 7, 2026
f0f5b6f
Document fee payer execution hook
randygrok Jan 7, 2026
be828f2
update
randygrok Jan 8, 2026
eb43e12
update all the spec steps
randygrok Jan 8, 2026
5a7b861
write reference for tempo
randygrok Jan 8, 2026
cea74f6
remove file
randygrok Jan 8, 2026
0f6398b
update snippet for transaction signature
randygrok Jan 8, 2026
c7eb06a
use txkind to support also contracts
randygrok Jan 8, 2026
a391aea
clarify is not the only transaction
randygrok Jan 8, 2026
29b239f
remove some text
randygrok Jan 8, 2026
59aa4cf
simplify step 1
randygrok Jan 8, 2026
ef04cff
simplify step 2
randygrok Jan 8, 2026
775ce82
Remove fee token from sponsorship ADR
randygrok Jan 9, 2026
73eb0ce
Document dual-domain sponsorship signatures
randygrok Jan 9, 2026
00e71ed
Clarify no pool usage for sponsorship tx
randygrok Jan 9, 2026
9eafb5b
Define executor sender semantics and RPC exposure
randygrok Jan 9, 2026
e33f65f
Update ADR for local typed sponsorship tx
randygrok Jan 9, 2026
6d4330d
Align sponsorship ADR with custom primitives approach
randygrok Jan 9, 2026
1df493d
Clarify sponsor signature semantics
randygrok Jan 9, 2026
3995eaf
docs: clarify txpoolExt_getTxs usage by ev-node
randygrok Jan 12, 2026
869ced7
docs: add spec section for typed sponsorship tx
randygrok Jan 12, 2026
897a338
Clarify txpool, engine, and forced inclusion validation for 0x76
randygrok Jan 12, 2026
d867aaf
Refine sponsorship ADR wording
randygrok Jan 12, 2026
b660754
Clarify persistence and remove ADR repetition
randygrok Jan 12, 2026
e4243b1
Clarify ADR layer scope
randygrok Jan 12, 2026
99002f2
simplify spec
randygrok Jan 12, 2026
de884b9
include batch calls
randygrok Jan 13, 2026
f82b026
Merge branch 'main' into randygrok/typed-tx-adr
randygrok Jan 13, 2026
3a33a93
clean adr
randygrok Jan 13, 2026
f05e5a8
Clarify executor signature envelope in ADR 0003
randygrok Jan 13, 2026
ae3f693
Note executor signature envelope in implementation strategy
randygrok Jan 13, 2026
db46ae0
Clarify signature domain separators and sponsor signature encoding
randygrok Jan 13, 2026
df0b6ca
Update ADR 0003 clarifications
randygrok Jan 13, 2026
0fa7693
Remove fee_payer address from ADR 0003
randygrok Jan 14, 2026
1dd29e5
Refine sponsorship flow and broadcast readiness
randygrok Jan 14, 2026
6106723
Add Viem custom client note
randygrok Jan 14, 2026
6f05f36
Merge branch 'main' into randygrok/typed-tx-adr
randygrok Jan 15, 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
139 changes: 139 additions & 0 deletions docs/adr/ADR-0003-typed-transactions-sponsorship.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# ADR 0003: Typed Transactions for Sponsorship

## Changelog

* 2026-01-05: Initial draft structure.

## Status

DRAFT Not Implemented

> Please have a look at the [PROCESS](./PROCESS.md#adr-status) page.
> Use DRAFT if the ADR is in a draft stage (draft PR) or PROPOSED if it's in review.

## Abstract

This ADR proposes a simplified way to sponsor transactions in reth by using
typed transactions enabled by EIP-2718. The idea is to define a typed
transaction format that separates the gas payer from the executor so the cost
can be covered without altering the normal execution flow. This reduces
complexity for users and integrations.

## Context

Gas sponsorship is a recurring requirement for onboarding users and for product
flows that should not require the end user to hold native funds. Today, the only
available approach in reth is to bundle sponsorship logic off-chain or via
custom infrastructure, which increases integration complexity and makes
transaction handling inconsistent across clients.

EIP-2718 introduces typed transactions, providing a structured way to extend
transaction formats while keeping backward compatibility with existing
processing pipelines. This creates an opportunity to standardize a sponsorship
mechanism within the transaction itself rather than relying on external
conventions.

The project needs a minimal, explicit mechanism to separate the gas payer from
the executor, without changing the execution semantics of the underlying call.
At the same time, it must remain compatible with existing tooling, avoid
breaking current transaction flows, and be straightforward to implement in
reth's transaction validation and propagation layers.

## Alternatives

TODO
Comment thread
randygrok marked this conversation as resolved.
Outdated

## Decision

> This section describes our response to these forces. It is stated in full
> sentences, with active voice. "We will ..."
We will implement gas sponsorship by introducing a new EIP-2718 typed
transaction in ev-reth. The new type (0x76) encodes both the execution call
and a separate sponsor authorization, enabling a sponsor account to pay fees
while preserving normal EVM execution semantics for the user call. The type is
added to the transaction envelope, validated in the txpool, and executed by
charging the sponsor while the sender remains the call origin.

## Implementation Plan

1. Define the transaction envelope and typed transaction.
- We will mirror the Tempo-style envelope pattern, extending the envelope
with a sponsorship transaction type (0x76) and a typed wrapper.
- The sponsorship transaction is specific to ev-reth and is not a wrapper
around an existing type: it carries explicit sponsor authorization fields.

```rust
#[derive(Clone, Debug, alloy_consensus::TransactionEnvelope)]
#[envelope(
tx_type_name = EvRethTxType,
typed = EvRethTypedTransaction,
arbitrary_cfg(any(test, feature = "arbitrary")),
serde_cfg(feature = "serde")
)]
#[cfg_attr(test, reth_codecs::add_arbitrary_tests(compact, rlp))]
#[expect(clippy::large_enum_variant)]
pub enum EvRethTxEnvelope {
#[envelope(ty = 0)]
Legacy(Signed<TxLegacy>),
#[envelope(ty = 1)]
Eip2930(Signed<TxEip2930>),
#[envelope(ty = 2)]
Eip1559(Signed<TxEip1559>),
#[envelope(ty = 3)]
Eip4844(Signed<TxEip4844>),
#[envelope(ty = 0x76, typed = SponsorTransaction)]
Sponsor(SponsorSigned),
}

pub struct SponsorTransaction {
// User/executor call fields (sender remains call origin)
pub chain_id: u64,
// Sponsorship fields (payer is separate)
pub fee_payer_signature: Signature,
Comment thread
randygrok marked this conversation as resolved.
Outdated
pub fee_token: Address,
Comment thread
randygrok marked this conversation as resolved.
Outdated
}
Comment thread
randygrok marked this conversation as resolved.
Outdated
```

## Consequences

> This section describes the resulting context, after applying the decision. All
> consequences should be listed here, not just the "positive" ones. A particular
> decision may have positive, negative, and neutral consequences, but all of them
> affect the team and project in the future.

### Backwards Compatibility

> All ADRs that introduce backwards incompatibilities must include a section
> describing these incompatibilities and their severity. The ADR must explain
> how the author proposes to deal with these incompatibilities. ADR submissions
> without a sufficient backwards compatibility treatise may be rejected outright.

### Positive

> {positive consequences}

### Negative

> {negative consequences}

### Neutral

> {neutral consequences}

## Further Discussions

> While an ADR is in the DRAFT or PROPOSED stage, this section should contain a
> summary of issues to be solved in future iterations (usually referencing comments
> from a pull-request discussion).
>
> Later, this section can optionally list ideas or improvements the author or
> reviewers found during the analysis of this ADR.

## Test Cases [optional]

Test cases for an implementation are mandatory for ADRs that are affecting consensus
changes. Other ADRs can choose to include links to test cases if applicable.

## References

* {reference link}