Skip to content

Commit 0fa7693

Browse files
committed
Remove fee_payer address from ADR 0003
1 parent df0b6ca commit 0fa7693

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

docs/adr/ADR-0003-typed-transactions-sponsorship.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DRAFT — Not Implemented
88

99
## Abstract
1010

11-
This ADR proposes a new EIP-2718 typed transaction (0x76) for the EvNode protocol. The transaction natively supports **gas sponsorship** and **batch calls**. Sponsorship separates the `executor` (identity/nonce provider) from the `fee_payer` (gas provider). Batch calls allow multiple operations to execute **atomically** within a single transaction. This removes the need for off-chain relayers or batching contracts while remaining compatible with Reth's modular architecture.
11+
This ADR proposes a new EIP-2718 typed transaction (0x76) for the EvNode protocol. The transaction natively supports **gas sponsorship** and **batch calls**. Sponsorship separates the `executor` (identity/nonce provider) from the sponsor (gas provider, recovered from the sponsor signature). Batch calls allow multiple operations to execute **atomically** within a single transaction. This removes the need for off-chain relayers or batching contracts while remaining compatible with Reth's modular architecture.
1212

1313
## Context
1414

@@ -18,7 +18,7 @@ Gas sponsorship is a recurring requirement for onboarding users and for product
1818

1919
EvNode aims to support sponsorship and batch calls natively. We require a mechanism where a transaction can carry two signatures (authorization + payment) and multiple calls, with deterministic encoding and atomic execution.
2020

21-
Terminology: the **executor** is the signer of domain `0x76`; it provides the `nonce`, is the transaction `from`, and maps to `tx.origin`. The **sponsor** (aka `fee_payer`) is the signer of domain `0x78` and pays gas when sponsorship is present; `fee_payer` is the sponsor address field. **Sponsorship** means `fee_payer` is present and pays gas; it does not change the `from`.
21+
Terminology: the **executor** is the signer of domain `0x76`; it provides the `nonce`, is the transaction `from`, and maps to `tx.origin`. The **sponsor** is the signer of domain `0x78` and pays gas when sponsorship is present. **Sponsorship** means `fee_payer_signature` is present and pays gas; it does not change the `from`.
2222

2323
## Decision
2424

@@ -51,7 +51,6 @@ pub struct EvNodeTransaction {
5151
pub calls: Vec<Call>,
5252
pub access_list: AccessList,
5353
// Sponsorship Extensions (Optional)
54-
pub fee_payer: Option<Address>,
5554
pub fee_payer_signature: Option<Signature>,
5655
}
5756

@@ -72,7 +71,6 @@ pub type EvNodeSignedTx = Signed<EvNodeTransaction>;
7271

7372
Optional fields MUST be encoded deterministically:
7473

75-
* `fee_payer`: encode `0x80` (nil) when `None`.
7674
* `fee_payer_signature`: encode `0x80` (nil) when `None`.
7775

7876
The `calls` field is an RLP list of `Call` structs, each encoded as:
@@ -91,24 +89,23 @@ This transaction uses two signature domains to prevent collisions and enable the
9189

9290
1. **Executor Signature** (Domain `0x76`)
9391
* Preimage: `0x76 || rlp(payload_fields...)` (no `v,r,s` in the RLP).
94-
* Constraint: `fee_payer` and `fee_payer_signature` MUST be set to `0x80` (empty) in the RLP stream for this hash.
92+
* Constraint: `fee_payer_signature` MUST be set to `0x80` (empty) in the RLP stream for this hash.
9593
* *Effect:* The executor authorizes the intent regardless of who pays.
9694

9795
2. **Sponsor Signature** (Domain `0x78`)
98-
* Preimage: `0x78 || rlp(payload_fields...)`
99-
* Constraint: `fee_payer` MUST be the sponsor's address. `fee_payer_signature` remains `0x80`.
100-
* *Effect:* The sponsor binds their address to the specific executor intent.
101-
* *Note:* In the final encoded transaction, `fee_payer_signature` is populated with the sponsor signature; it is set to `0x80` only for signing preimages. The "both present or both absent" rule applies to the final encoded payload.
96+
* Preimage: `0x78 || rlp(payload_fields...)` with `fee_payer_signature` set to `0x80`, and the executor `sender` address encoded in its place for the hash.
97+
* *Effect:* The sponsor binds to a specific executor intent and can be recovered from the signature.
98+
* *Note:* In the final encoded transaction, `fee_payer_signature` is populated with the sponsor signature; it is set to `0x80` only for signing preimages.
10299

103100
3. **Transaction Hash** (TxHash)
104101
* `keccak256(0x76 || rlp([payload_fields..., v, r, s]))` using the final encoded transaction (including the sponsor signature if present).
105102

106103
### Validity Rules
107104

108-
* **State:** `fee_payer` and `fee_payer_signature` MUST be both present or both absent.
105+
* **State:** `fee_payer_signature` is optional; if absent, the transaction is not sponsored.
109106
* **Behavior:**
110107
* If sponsorship is absent: Executor pays gas (standard EIP-1559 behavior).
111-
* If sponsorship is present: Sponsor pays gas; executor remains `from` (tx.origin).
108+
* If sponsorship is present: Sponsor pays gas (sponsor recovered from signature); executor remains `from` (tx.origin).
112109

113110
* **Validation:**
114111
* Executor signature MUST be valid for domain `0x76`.

0 commit comments

Comments
 (0)