--- eip: 8430 title: AA Transaction Type description: A transaction type with batched calls, gas sponsorship, 2D nonces, and in-band code delegation author: Chris Hunter (@chunter-cb) discussions-to: https://ethereum-magicians.org/t/eip-8430-aa-transaction-type-split-out-from-8130/29810 status: Draft type: Standards Track category: Core created: 2026-09-23 requires: 1559, 2718, 2929, 7623, 7702 --- ## Abstract This proposal introduces a new [EIP-2718](./eip-2718.md) transaction type (`AA_TX_TYPE`), split out of [EIP-8130](./eip-8130.md) as an independent transaction type with no Keystore dependency. It works for today's EOAs with native secp256k1 authentication, giving them call batching with phased atomicity, native value in calls, gas sponsorship with bound and open payers, two-dimensional nonces with a nonce-free mode, and in-band [EIP-7702](./eip-7702.md)-style code delegation. Its authenticator selector, authorization-rules hook, and reserved account-change types let other account models plug in without a new transaction type. EIP-8130 specifies one such integration, for the Keystore. ## Motivation Wallets want to batch calls, have a third party pay gas, run independent transaction lanes in parallel, and set code delegation in the same transaction that uses it. Today these require an [ERC-4337](./eip-4337.md) bundler stack, several transactions, or a smart account for every user. This proposal provides these capabilities as protocol features of one transaction type. Validation is fixed-cost: nodes verify a secp256k1 signature per role and check nonce, balance, and validity window, and never simulate wallet code to decide whether a transaction is valid. The wire format is designed so that richer authentication can be added later without a new transaction type. The sender and payer authorization fields already carry an authenticator selector, account changes are a typed registry, and authorization rules are a named hook. [EIP-8130](./eip-8130.md) (Keystore Accounts) specifies how the Keystore fills these in (**Keystore integration**). This document refers to it only where an extension point needs naming. ## Specification The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174. ### Constants | Name | Value | Comment | |------|-------|---------| | `AA_TX_TYPE` | `0x79` | [EIP-2718](./eip-2718.md) transaction type | | `AA_PAYER_TYPE` | `0x7A` | Magic byte for payer signature domain separation | | `REPLAY_ID_TYPE` | `0x7901` | Magic prefix for `replay_id` domain separation | | `AA_BASE_COST` | `12000` | Base intrinsic gas cost | | `K1_AUTHENTICATOR` | `address(1)` | Selector for native secp256k1 authentication | | `K1_AUTH_COST` | `5100` | Fixed secp256k1 authentication cost: ecrecover (3,000) plus one cold authorization read (2,100), covering the signature bytes. See [Intrinsic Gas](#intrinsic-gas) | | `TX_VALUE_COST` | `6000` | Per value-bearing call: the recipient balance write | | `COLD_ACCOUNT_ACCESS`, `WARM_ACCESS` | `2600`, `100` | The chain's account access costs: [EIP-2929](./eip-2929.md) values, or `3000`, `100` where [EIP-8038](./eip-8038.md) is active | | `DELEGATION_COST` | `4600` | Delegation indicator deposit (200 × 23 bytes) | | `NONCE_MANAGER_ADDRESS` | `0x813000000000000000000000000000000000aa01` | Nonce Manager precompile | | `TX_CONTEXT_ADDRESS` | `0x813000000000000000000000000000000000aa02` | Transaction Context precompile | | `NONCE_KEY_MAX` | `2^256 - 1` | Nonce-free mode | | `NONCE_FREE_COST` | `13000` | Nonce-free replay state: the `replay_id` check, its ring-buffer write, and the eviction it displaces | | `TIMESTAMP_MS_THRESHOLD` | `100_000_000_000` | Unit-detection boundary for `valid_after`/`valid_before` | | `REPLAY_BUFFER_CAPACITY` | chain parameter | Capacity of the nonce-free `replay_id` ring buffer (consensus) | | `NONCE_FREE_EXPIRY_WINDOW` | chain parameter (e.g. 30 seconds) | Maximum `valid_before − now` for nonce-free transactions (consensus) | | `MAX_AUTHENTICATION_GAS` | configurable (suggested 100,000) | Bound on payer-authentication gas metered outside `gas_limit` | ### Transaction Type A new [EIP-2718](./eip-2718.md) transaction with type `AA_TX_TYPE`: ``` AA_TX_TYPE || rlp([ chain_id, sender, // empty = recover from sender_auth | 20-byte address nonce_key, // uint256: nonce channel selector nonce_sequence, // uint64: sequence number valid_after, // uint64: Unix timestamp (ms or s, auto-detected); 0 = no lower bound valid_before, // uint64: Unix timestamp (ms or s, auto-detected); 0 = no expiry max_priority_fee_per_gas, max_fee_per_gas, gas_limit, account_changes, // typed entries | empty calls, // [[call, ...], ...] | empty metadata, // opaque attribution/annotation bytes | empty payer, // empty = self-pay | 0x00 = open | 20-byte payer address sender_auth, payer_auth ]) call = rlp([to, value, data]) // to: address, value: uint256, data: bytes ``` #### Field Definitions | Field | Description | |-------|-------------| | `chain_id` | Chain ID per [EIP-155](./eip-155.md) | | `sender` | **Empty**: the sender is recovered from `sender_auth`. **20-byte address**: the named sender, authenticated by `sender_auth` (see [Authentication](#authentication)) | | `nonce_key` | `uint256` nonce channel selector. `0` for standard sequential ordering, `1` through `NONCE_KEY_MAX - 1` for parallel channels, `NONCE_KEY_MAX` for nonce-free mode | | `nonce_sequence` | `uint64` expected sequence number within `nonce_key`. Must match the current sequence for `(sender, nonce_key)`, which for `nonce_key == 0` is the account nonce (see [Nonces](#nonces)). Incremented after inclusion regardless of execution outcome. Must be `0` when `nonce_key == NONCE_KEY_MAX` | | `valid_after` | `uint64` Unix timestamp, milliseconds or seconds (see [Timestamp Normalization](#timestamp-normalization)). After normalization, the transaction is invalid when `block.timestamp * 1000 < valid_after`. `0` means no lower bound. Many mempools will not hold a not-yet-active transaction and MAY reject one whose `valid_after` is in the future | | `valid_before` | `uint64` Unix timestamp, milliseconds or seconds. After normalization, the transaction is invalid when `block.timestamp * 1000 > valid_before`. For a nonce-free transaction (`nonce_key == NONCE_KEY_MAX`) the bound is strict: it is invalid when `block.timestamp * 1000 >= valid_before`. `0` means no expiry. Must be non-zero when `nonce_key == NONCE_KEY_MAX` | | `max_priority_fee_per_gas` | Maximum priority fee per gas unit ([EIP-1559](./eip-1559.md)) | | `max_fee_per_gas` | Maximum fee per gas unit ([EIP-1559](./eip-1559.md)) | | `gas_limit` | Maximum gas for sender-intrinsic gas and call execution. Payer authentication is metered separately (see [Intrinsic Gas](#intrinsic-gas)) | | `account_changes` | **Empty**: no account changes. **Non-empty**: array of typed entries (see [Account Changes](#account-changes)) | | `calls` | **Empty**: no calls. **Non-empty**: array of call phases (see [Call Execution](#call-execution)) | | `metadata` | **Empty**: no metadata. **Non-empty**: opaque attribution or annotation bytes (see [Transaction Metadata](#transaction-metadata)) | | `payer` | **Empty**: sender pays. **`0x00`** (the single byte): open payer, recovered from `payer_auth`. **20-byte address**: that payer is required. See [Payer Modes](#payer-modes) | | `sender_auth` | Sender authorization (see [Authentication](#authentication)) | | `payer_auth` | Payer authorization. Empty for self-pay (see [Payer Modes](#payer-modes)) | ##### Timestamp Normalization `valid_after` and `valid_before` MAY be expressed in either seconds or milliseconds. The unit is a fixed function of each value against `TIMESTAMP_MS_THRESHOLD`: - a value below `TIMESTAMP_MS_THRESHOLD` is interpreted as seconds and normalized to milliseconds as `value * 1000`; - a value at or above `TIMESTAMP_MS_THRESHOLD` is interpreted as milliseconds and used as-is; - `0` means "no bound" and is not normalized. A 64-bit Unix timestamp in seconds does not reach 10^11 until the year 5138, while any Unix timestamp in milliseconds has exceeded 10^11 since 1973, so the rule is unambiguous and consensus-safe. All validity-window comparisons in this specification operate on the normalized millisecond value. The effective resolution of the window equals the chain's block-timestamp resolution. The millisecond form exists for off-chain clock compatibility and forward-compatibility with sub-second block times. ### Authentication `sender_auth` and `payer_auth` share one shape rule. When the corresponding identity is **recovered** (not named in the transaction), the blob is a raw 65-byte ECDSA signature `r || s || v`. When the identity is **named** by a 20-byte address, the blob is `authenticator (20 bytes) || data`. | `sender` | `sender_auth` | Resolved sender | |----------|---------------|-----------------| | empty | `r \|\| s \|\| v` (65 bytes) | ecrecover of the sender signature hash | | 20-byte address | `K1_AUTHENTICATOR \|\| r \|\| s \|\| v` | `sender`; the recovered address MUST equal `sender` | Without Keystore integration, `K1_AUTHENTICATOR` is the only accepted authenticator, and the recovered address MUST equal the named account. Any other authenticator selector or blob length is invalid. The shape is decided by whether the identity is named, never by blob length. Every secp256k1 signature in `sender_auth` and `payer_auth` MUST be canonical: `s <= secp256k1n / 2` per [EIP-2](./eip-2.md), and `v` is `27` or `28`. A signature that fails recovery is invalid. **Authorization rules.** Without Keystore integration, a valid signature from the account's own secp256k1 key authorizes everything this specification allows: originating the transaction, paying for it, and delegating. Extensions MAY narrow what a given signer may do, for example restricting which keys on an account may pay or delegate. #### Signature Payload Sender and payer use different type bytes for domain separation. **Sender signature hash**, all fields through `payer`, excluding `sender_auth` and `payer_auth`: ``` keccak256(AA_TX_TYPE || rlp([ chain_id, sender, nonce_key, nonce_sequence, valid_after, valid_before, max_priority_fee_per_gas, max_fee_per_gas, gas_limit, account_changes, calls, metadata, payer ])) ``` **Payer signature hash**: ``` keccak256(AA_PAYER_TYPE || rlp([ chain_id, sender, nonce_key, nonce_sequence, valid_after, valid_before, max_priority_fee_per_gas, max_fee_per_gas, gas_limit, account_changes, calls, metadata, payer ])) ``` The `sender` field in the payer signature hash MUST be the resolved sender address. When `sender` is empty in the wire format, the recovered sender address MUST be substituted before computing this hash. This binds every payer signature, including an open-mode one, to one specific sender (see [Security Considerations](#security-considerations)). The `payer` field is the wire value (empty, `0x00`, or the address). #### Payer Modes | `payer` | `payer_auth` | Mode | Resolved payer | |---------|--------------|------|----------------| | empty | empty | Self-pay | `sender` | | `0x00` | `r \|\| s \|\| v` (65 bytes) | Open | ecrecover of the payer signature hash | | `sender` | `K1_AUTHENTICATOR \|\| r \|\| s \|\| v` | Self-pay, explicit | `sender`; the recovered address MUST equal `sender` | | other address | `K1_AUTHENTICATOR \|\| r \|\| s \|\| v` | Sponsored | `payer`; the recovered address MUST equal `payer` | In open mode the sender does not name a payer: any key willing to pay signs the payer hash, which already binds to the resolved sender and the full transaction body. Open mode is always secp256k1, because an identity that is recovered rather than named has no address to resolve another authenticator against. The explicit self-pay form is redundant without Keystore integration. It is kept so that a dedicated gas key on the sender's own account (see [EIP-8130](./eip-8130.md)) is a widening of an existing shape rather than a new one. ### Nonces `nonce_key` `0` uses the sender's account nonce, the same nonce used by other transaction types: `nonce_sequence` MUST equal it, and inclusion increments it. Keys `1` through `NONCE_KEY_MAX - 1` are held by a precompile at `NONCE_MANAGER_ADDRESS`, separate from the account nonce. The protocol reads and increments them directly during transaction processing; the precompile exposes a read-only `getNonce()` interface to the EVM. `getNonce(account, 0)` reverts with `ProtocolNonceNotSupported()` rather than returning the account nonce: key `0` is the account nonce, held in account state rather than the Nonce Manager. `getNonce(account, NONCE_KEY_MAX)` returns `0`: no counter is kept for that key, and `0` is the `nonce_sequence` every nonce-free transaction carries. | `nonce_key` Range | Name | Description | |-------------------|------|-------------| | `0` | Standard | The account nonce, shared with other transaction types. Sequential ordering, mempool default | | `1` through `NONCE_KEY_MAX - 1` | User-defined | Parallel transaction channels defined by wallets | | `NONCE_KEY_MAX` | Nonce-free | No nonce state read or incremented | #### Nonce-Free Mode (`NONCE_KEY_MAX`) When `nonce_key == NONCE_KEY_MAX`, the protocol neither reads nor increments a nonce counter; `nonce_sequence` MUST be `0` and `valid_before` MUST be non-zero. Replay protection uses `replay_id` deduplication held in a fixed-capacity circular buffer that is consensus state: a `seen` map (`replay_id → valid_before`) of live entries plus a ring that evicts the oldest entry once elapsed. A still-live `replay_id` is rejected, and a buffer full of still-live entries rejects the transaction. An entry has elapsed once `block.timestamp * 1000 >= valid_before`, the same point at which its transaction stops being valid. A nonce-free transaction is valid only when `block.timestamp * 1000 < valid_before <= block.timestamp * 1000 + NONCE_FREE_EXPIRY_WINDOW` (window in milliseconds). This window is a consensus rule. Mempools MAY admit a tighter window. `REPLAY_BUFFER_CAPACITY` MUST be at least `peak accepted nonce-free throughput × NONCE_FREE_EXPIRY_WINDOW` so an entry always elapses before its ring slot is reused. Entries are ephemeral, so there is no permanent state growth. ##### Replay Identifier ``` replay_id = keccak256(REPLAY_ID_TYPE || rlp([ chain_id, resolved_sender, valid_after, valid_before, account_changes, calls, metadata, payer ])) ``` `nonce_key` and `nonce_sequence` are omitted because they are constant in nonce-free mode. `resolved_sender` keeps the identifier unique per sender when `sender` is empty. `replay_id` excludes the fee fields and `gas_limit`, so a fee bump does not change identity, and excludes `sender_auth` and `payer_auth`, which are non-deterministic and can be re-signed without changing the logical transaction. It includes the `payer` wire field, so retargeting a transaction at a different named payer is a new logical transaction. In open mode two submissions of the same body with different payers share a `replay_id`. The full transaction hash MUST NOT be used for nonce-free deduplication or replacement. ##### Mempool Replacement - **Standard and 2D transactions** (`nonce_key != NONCE_KEY_MAX`): two pending transactions sharing `(sender, nonce_key, nonce_sequence)` are replacement candidates. For `nonce_key == 0` the sequence is the account nonce, so a pending transaction of another type from the same sender with the same nonce is also a replacement candidate. - **Nonce-free transactions**: two pending transactions from the same `sender` with the same `replay_id` are replacement candidates, and block builders MUST NOT include two transactions with the same `(sender, replay_id)` in one block. In both modes, and whatever extensions the transaction uses, a replacement MUST increase both `max_fee_per_gas` and `max_priority_fee_per_gas` by at least the node's configured minimum bump and MUST be independently valid, including a fresh `payer_auth` when sponsored, since `payer_auth` commits to the fee fields and `gas_limit`. ### Account Changes `account_changes` is an array of typed entries. Each entry is `rlp([type, ...])`. | Type | Name | Defined by | |------|------|------------| | `0x00` | Reserved | Future entry types | | `0x01` | Delegation | This specification | | `0x02`+ | Reserved | Future entry types | A transaction containing an entry type not accepted on the chain is invalid. At most one delegation entry is allowed. #### Delegation Entry A delegation entry sets [EIP-7702](./eip-7702.md)-style code delegation for the sender, replacing the need for an `authorization_list`. It is authorized by `sender_auth`; no separate signature is required. ``` rlp([ 0x01, // type: delegation target // address: delegate to this contract, or address(0) to clear ]) ``` Rules: - At most one delegation entry per transaction. - `nonce_key` MUST be `0`. The transaction then increments the account nonce, so a delegated account always has a non-zero nonce, as with [EIP-7702](./eip-7702.md), and is never empty under [EIP-161](./eip-161.md). - The sender MUST have been authenticated through the native secp256k1 path (`sender` empty, or `K1_AUTHENTICATOR`) by the sender's own key, subject to any [authorization rules](#authentication) an extension adds. - `code(sender)` MUST be empty or begin with the delegation designator `0xef0100`. Non-delegation bytecode is never replaced. - `target != address(0)` sets `code(sender) = 0xef0100 || target`. `target == address(0)` clears the indicator and resets the code hash to the empty code hash. #### Delegation Indicator An account is delegated when its code is exactly `0xef0100 || target`. All code-executing operations targeting a delegated account load code from `target`. Because this transaction type depends on the indicator directly, it MUST be supported on chains that adopt this proposal even where standalone [EIP-7702](./eip-7702.md) transactions are not enabled. This proposal never delegates an account automatically. ### Transaction Metadata `metadata` is optional opaque bytes for attribution or annotation, for example builder or app attribution, a payment reference, or a commitment to off-chain data. It is covered by both signature payloads, charged through `tx_payload_cost`, and does not affect validation or execution. ### Call Execution The protocol dispatches calls directly from `sender`: | Parameter | Value | |-----------|-------| | caller / `msg.sender` at target | `sender` | | `tx.origin` | `sender` | | `to` | `call.to` | | `msg.value` | `call.value` | | `data` | `call.data` | Each call is a separate top-level call frame and starts with fresh, empty memory. **Call gas.** Dispatching a call charges `COLD_ACCOUNT_ACCESS` for `call.to` if it is not in `accessed_addresses`, `WARM_ACCESS` otherwise, and the same for its [EIP-7702](./eip-7702.md) delegation target, then adds both to `accessed_addresses`. The **first call**, the first call of the first non-empty phase, is the exception: its target access is charged intrinsically (`first_call_cost`, see [Intrinsic Gas](#intrinsic-gas)), so dispatching it charges only its delegation target. This mirrors the [EIP-2780](./eip-2780.md) treatment of `tx.to`. Dispatch charges are execution gas drawn from the call gas pool. If the remaining call gas cannot cover them, the call fails with an out-of-gas error and its phase reverts. `accessed_addresses` initially holds the precompiles, the coinbase, the sender, the payer, the first call's target, and every account touched while processing `account_changes` and authentication. Each call frame then receives all remaining call gas. If the frame halts exceptionally (any failure other than `REVERT`), all gas given to it is consumed, as for any EVM call frame. A `REVERT` returns its unused gas to the pool. `call.value` is transferred from `sender` to `call.to` as part of the call frame and is reverted with it. If `sender` cannot cover `call.value` when the call runs, the call fails as a `CALL` with insufficient balance would, and its phase reverts. Block validity does not depend on the sender's balance covering call values; an earlier phase may fund the sender. If `call.value > 0` and `call.to` does not exist, the account-creation charge applies after the balance check and before the callee's code runs. It is charged at runtime because whether `call.to` exists is only known when the call executes. #### Call Phases `calls` is an ordered array of **phases**, each an ordered array of calls (`[[call, ...], [call, ...]]`). Phases execute in order from a single gas pool. Within a phase, calls are atomic: if any call reverts, all state changes of that phase are discarded and remaining phases are skipped. Completed phases persist. Common patterns: - **Simple call**: `[[call]]` - **Atomic batch**: `[[call_a, call_b, call_c]]` - **Sponsor + user**: `[[sponsor_payment], [user_action_a, user_action_b]]`; the sponsor payment commits in phase 0 and can be a plain value transfer #### Transaction Context Precompile The Transaction Context precompile at `TX_CONTEXT_ADDRESS` gives read-only access to the current transaction during execution. It reads from the client's in-memory transaction state. Like every precompile it is in `accessed_addresses`, so a call pays `WARM_ACCESS` for the address, plus 3 gas per 32 bytes of returned data. The transaction-state read itself is not charged. | Function | Returns | |----------|---------| | `getTransactionPayer()` | `address`, the account paying for gas | For an `AA_TX_TYPE` transaction this is the resolved payer (`sender` for self-pay). For every other transaction type it is `tx.origin`. Extensions MAY add functions to this precompile and MAY expose it during authentication; [EIP-8130](./eip-8130.md) adds `getTransactionSender()` and `getTransactionSenderActorId()`. ### Intrinsic Gas The schedule decomposes cost into the same primitives as [EIP-2780](./eip-2780.md). It does not depend on EIP-2780 being active. ``` intrinsic_gas = AA_BASE_COST + sender_auth_cost + first_call_cost + sender_access_cost + value_transfer_cost + tx_payload_cost + nonce_key_cost + account_changes_cost + payer_auth_cost sender_intrinsic_gas = intrinsic_gas - payer_auth_cost execution_gas_available = gas_limit - sender_intrinsic_gas effective_gas_limit = gas_limit + payer_auth_cost ``` Intrinsic gas is a function of the signed transaction and its resolved sender alone: no component depends on state. Sender-intrinsic gas is bounded by `gas_limit`. `payer_auth_cost` is metered separately and charged to the payer on top of `gas_limit`: `payer_auth` is excluded from both signature hashes and chosen by the payer, so if it drew from `gas_limit` a payer could starve `calls`. | Component | Value | |-----------|-------| | `AA_BASE_COST` | 12,000: one account access, one nonce write and one balance write, in whichever accounts they land, plus transaction inclusion, nonce-mode dispatch, payer settlement, receipt assembly | | `sender_auth_cost` | `K1_AUTH_COST` | | `first_call_cost` | `COLD_ACCOUNT_ACCESS` for the first call's `to`, charged at the cold rate unconditionally. `0` if `calls` is empty or the first call's `to` is `sender` | | `sender_access_cost` | `COLD_ACCOUNT_ACCESS` when `payer` is set and is not `sender`, including open mode. `AA_BASE_COST`'s account access then goes to the payer, and the sender's account is still read for its nonce. `0` for self-pay, empty or explicit | | `value_transfer_cost` | `TX_VALUE_COST` for each call with `value > 0` and `to != sender` | | `tx_payload_cost` | 16 gas per non-zero byte and 4 per zero byte ([EIP-2028](./eip-2028.md)) over the RLP encodings of `account_changes`, `calls`, and `metadata`. The other fields, and secp256k1 signatures, are not metered | | `nonce_key_cost` | `0`: 0, even on first use (account nonce, covered by `AA_BASE_COST`). `NONCE_KEY_MAX`: `NONCE_FREE_COST`. Otherwise 22,100 when `nonce_sequence == 0` (the key's first use, since `nonce_sequence` must equal the key's current sequence), 5,000 otherwise | | `account_changes_cost` | `DELEGATION_COST` for a delegation entry, else 0 | | `payer_auth_cost` | 0 for self-pay (`payer` empty), otherwise `K1_AUTH_COST` | `K1_AUTH_COST` includes one cold read of the signer's authorization (see [Rationale](#charging-the-authorization-read)). Extensions that accept other authenticators MUST meter their authentication data, the contents of the RLP string without its header: `sender_auth` bytes count toward `tx_payload_cost`, and `payer_auth` bytes add `10` gas per token to `payer_auth_cost`. **Calldata floor.** As in [EIP-7623](./eip-7623.md) with the [EIP-2780](./eip-2780.md) base, one floor applies to the sender's gas. Let `payload_tokens = zero_bytes + 4 * nonzero_bytes` over the bytes `tx_payload_cost` covers and `execution_gas_used` the gas used by `calls`: ``` floor_base = AA_BASE_COST + sender_auth_cost + first_call_cost + sender_access_cost + value_transfer_cost sender_floor = floor_base + 10 * payload_tokens gas_used = max(sender_intrinsic_gas + execution_gas_used, sender_floor) + payer_auth_cost ``` `nonce_key_cost` and `account_changes_cost` are excluded from `floor_base`, as [EIP-2780](./eip-2780.md) excludes state-dependent and per-authorization charges. Metered `payer_auth` bytes are already priced at the floor rate, so the payer has no separate floor. A transaction whose `gas_limit` is below `sender_floor` is invalid. A transaction whose `payer_auth_cost` exceeds `MAX_AUTHENTICATION_GAS` is invalid. `gas_used` stays within `effective_gas_limit`. **Gas-schedule profiles.** On a base layer the values above are protocol constants, changeable only through a hard fork (**L1 profile**). An L2 or other high-throughput chain MAY adopt a different schedule fixed under its own consensus (**L2 profile**), but MUST keep the formula's structure and MUST NOT set the calldata-floor rate below `4` or drop the floor. ### Fees Fees follow [EIP-1559](./eip-1559.md), applied over `effective_gas_limit`. With `base_fee` the block's base fee per gas: ``` priority_fee_per_gas = min(max_priority_fee_per_gas, max_fee_per_gas - base_fee) effective_gas_price = base_fee + priority_fee_per_gas // = min(max_fee_per_gas, base_fee + max_priority_fee_per_gas) ``` The transaction is invalid if `max_fee_per_gas < base_fee` or if the payer's balance is below `max_fee_per_gas * effective_gas_limit`. `GASPRICE` returns `effective_gas_price`. Before execution the payer is precharged `effective_gas_limit * effective_gas_price`. After execution, with `gas_used` as defined in [Intrinsic Gas](#intrinsic-gas), the payer is charged `gas_used * effective_gas_price` and refunded the difference. `gas_used * priority_fee_per_gas` goes to the block's fee recipient and `gas_used * base_fee` is burned. ### Validation Flow #### Mempool Acceptance 1. Parse and structurally validate the transaction: accepted `account_changes` entry types and counts, `nonce_key == 0` if a delegation entry is present, and `sender_auth` / `payer_auth` shapes per [Authentication](#authentication). 2. Resolve and authenticate the sender. 3. If a delegation entry is present, verify `code(sender)` is empty or a delegation indicator, and that the sender is permitted to delegate. 4. Resolve and authenticate the payer per [Payer Modes](#payer-modes). Reject if `payer_auth_cost > MAX_AUTHENTICATION_GAS`. 5. Verify the validity window (after normalization), that `gas_limit` covers `sender_intrinsic_gas` and `sender_floor`, that `max_fee_per_gas` covers the current base fee, and that the payer's balance covers `max_fee_per_gas * effective_gas_limit` (see [Fees](#fees)). 6. Verify the nonce: `nonce_sequence` equals the sender's account nonce for key `0`, or `current_sequence(sender, nonce_key)` for keys `1` through `NONCE_KEY_MAX - 1`; for `NONCE_KEY_MAX`, require `nonce_sequence == 0`, a `valid_before` within the nonce-free window (see [Nonces](#nonces)), and a fresh `replay_id`. 7. Apply per-payer pending limits and the [Mempool Replacement](#mempool-replacement) rules. Nodes MAY reject a transaction whose `valid_before` is too near to be reliably included, and MAY reject rather than hold one whose `valid_after` is not yet active. A node MAY check that the sender's balance covers the sum of `call.value`, but doing so rejects valid transactions that fund the sender in an earlier phase. #### Block Execution 1. Verify the nonce as in [Mempool Acceptance](#mempool-acceptance) step 6. 2. Check [Fees](#fees) validity and precharge the payer. 3. Apply `account_changes` in order. 4. If `nonce_key == 0`, increment the sender's account nonce. If `nonce_key` is `1` through `NONCE_KEY_MAX - 1`, increment the Nonce Manager sequence for `(sender, nonce_key)`. If `nonce_key == NONCE_KEY_MAX`, record `replay_id`. 5. Execute `calls` per [Call Execution](#call-execution). The nonce is verified first, so a stale transaction is rejected on a single read before any account change is applied. `account_changes` are applied before the nonce update so that extension entries that require an unused account, such as an [EIP-8130](./eip-8130.md) create entry, see the sender's pre-transaction account nonce. A failure in steps 1 through 4 makes the transaction invalid. Settlement charges the payer for `gas_used` per [Fees](#fees): sender-intrinsic gas plus executed `calls` (together bounded by `gas_limit` and floored at `sender_floor`) plus `payer_auth_cost`. It refunds the rest of the precharge. Payer authentication gas is never refundable. **Block gas.** A transaction reserves `effective_gas_limit` (`gas_limit + payer_auth_cost`) against the block's remaining gas, and its `gas_used`, including payer authentication, counts toward the block's cumulative gas. Any per-transaction gas cap, such as [EIP-7825](./eip-7825.md), applies to `effective_gas_limit`. ### Receipts The [EIP-2718](./eip-2718.md) `ReceiptPayload` for this transaction type is: ``` rlp([status, cumulative_gas_used, logs_bloom, logs, committed_phases]) ``` The first four fields are as for [EIP-1559](./eip-1559.md) receipts. `committed_phases` is the number of phases that committed. Phases run in order and stop at the first revert, so the count records every phase's outcome. It MUST satisfy `committed_phases <= len(calls)`, and `status` is `1` exactly when `committed_phases == len(calls)` (including when `calls` is empty), `0` otherwise. A receipt without `committed_phases` is invalid. Logs from reverted phases are discarded with their state changes. `status == 0` does not imply no state change or no logs: committed earlier phases (with their logs), applied `account_changes`, nonce consumption, and fee payment persist. ### RPC Extensions **`eth_getTransactionCount`**: extended with an optional `nonceKey` parameter (`uint256`). Omitted or `0` returns the account nonce; keys `1` through `NONCE_KEY_MAX - 1` read the Nonce Manager. `NONCE_KEY_MAX` has no sequence and is rejected as an invalid parameter. **`eth_getTransactionByHash`** and other transaction objects: the transaction's fields are returned flat alongside the standard fields, in camelCase (`chainId`, `sender`, `nonceKey`, `validAfter`, `validBefore`, `maxPriorityFeePerGas`, `maxFeePerGas`, `accountChanges`, `calls`, `metadata`, `payer`, `senderAuth`, `payerAuth`). `nonce_sequence` is reported as `nonce` and `gas_limit` as `gas`. `payer` uses its wire form: omitted or `null` for self-pay, `0x00` in open mode, and the 20-byte address of a named payer. Nodes MUST reject any other value, including the zero address. `from` is the resolved sender. `to` is `null`, `value` is `0x0`, and `input` is `0x`, since calls are carried in `calls`. **`eth_getTransactionReceipt`**: in addition to the standard fields, receipts for this type include: - `payer` (address): the resolved payer (`sender` for self-pay, the named payer, or the payer recovered in open mode). - `committedPhases` (quantity): `committed_phases` from the receipt. - `gasUsed` is `gas_used` from [Intrinsic Gas](#intrinsic-gas), including payer authentication. Receipts MAY also include `metadata` (bytes), copied from the transaction and omitted when empty. **`eth_estimateGas`** / **`eth_call`**: accept the transaction's fields (`sender`, `nonceKey`, `accountChanges`, `calls`, `validAfter`, `validBefore`, `metadata`, `payer`, `senderAuth`, `payerAuth`) alongside the standard request object, and execute the request as an `AA_TX_TYPE` transaction. The sender is taken from `sender` or `from`; if both are present they MUST be equal. Signatures are never verified and the nonce is not checked, but the nonce update of [Block Execution](#block-execution) is applied before `calls`, so calls that read the Nonce Manager see the same sequence they would on inclusion. - **Default: secp256k1.** When `senderAuth` or `payerAuth` is omitted, the node assumes the role is authenticated by the account's own secp256k1 key. It prices a placeholder of the shape [Authentication](#authentication) requires: a 65-byte signature when the identity is recovered, `K1_AUTHENTICATOR` followed by 65 bytes when it is named. `payer` omitted means self-pay, with no payer placeholder. - **Supplied blob.** When `senderAuth` or `payerAuth` is supplied, its shape and length are used for pricing and its contents are ignored. - **Placeholder pricing.** Where an extension meters authentication bytes, placeholder and supplied auth bytes are priced as non-zero bytes, so a zero-filled dummy never underestimates. Other authentication mechanisms, such as the Keystore, define how requests select them (see [EIP-8130](./eip-8130.md)). ## Rationale ### Why Delegation via Account Changes? [EIP-7702](./eip-7702.md) introduced `authorization_list` with a separate signature per authorization. Here delegation is authorized by `sender_auth`, in the same nonce stream as the calls that use the new code. It is restricted to the native secp256k1 path so it stays portable to chains that only support EIP-7702. ### Why Commit the Phase Count in the Receipt? With only `status`, a transaction that reverted in phase 1 and one that reverted in phase 2 leave different state but can produce identical receipts, for example when the phases emit no logs, so the receipts root would not commit to which phases took effect. Because phases stop at the first revert, a single count records the outcome losslessly at a cost of a few bytes. ### Why a Metadata Field? Attribution and annotation data traditionally rides as a suffix on `tx.input`. The structured `calls` array has no such location, so `metadata` gives it a signed home. ### Why a Transaction Context Precompile? With a sponsor, the payer is not visible to the EVM: `tx.origin` and the call's `msg.sender` are the sender. A sponsor's phase-0 payment contract can confirm the sponsor is actually paying before it settles. Defining the payer for every transaction type lets contracts make one call without branching on the type. Transaction context is immutable during execution, so a precompile reading the client's in-memory transaction is the natural fit. ### Charging the Authorization Read Every authentication is priced as a signature check plus one cold read of the signer's authorization. Native secp256k1 validation of an account's own key performs no such read, but charging it regardless prices every authentication the same way, so an extension that stores authorizations need not reprice secp256k1 transactions. ## Backwards Compatibility No breaking changes. Existing transaction types and accounts are unaffected. `nonce_key` `0` uses the account nonce, so this type and other transaction types from one account share one sequence at that key; other keys live in the Nonce Manager. Adoption is opt-in: an account sends this transaction type or does not. No account is delegated automatically. Activating Keystore integration does not change validity or execution results for accounts without Keystore state. ## Reference Implementation ### INonceManager (Precompile) ```solidity interface INonceManager { error ProtocolNonceNotSupported(); function getNonce(address account, uint256 nonceKey) external view returns (uint64); } ``` Read-only. For `nonceKey == 0` it reverts with `ProtocolNonceNotSupported()`; the account nonce is read from account state. For `nonceKey == NONCE_KEY_MAX` it returns `0`. Like every precompile it is in `accessed_addresses`, so a call pays `WARM_ACCESS` for the address, plus 6 gas per 32 bytes of calldata (`G_SHA3WORD`) and a cold (2,100) or warm (100) read of the sequence slot per [EIP-2929](./eip-2929.md). ### ITransactionContext (Precompile) ```solidity interface ITransactionContext { function getTransactionPayer() external view returns (address); } ``` ## Security Considerations **Replay Protection.** Transactions include `chain_id`, a 2D nonce, and a validity window. For `nonce_key != NONCE_KEY_MAX`, inclusion increments `(sender, nonce_key)`, so each `(sender, nonce_key, nonce_sequence)` is included at most once. Nonce-free transactions rely on a short `valid_before` bound and `replay_id` deduplication. The transaction hash must not be used for nonce-free deduplication: fee bumps, re-signed `payer_auth`, and freshly randomized ECDSA signatures all change it without changing the logical transaction, and all resolve to the same `replay_id`. The validity window cannot be extended through replacement, because `valid_after` and `valid_before` are part of `replay_id`. **Payer Security.** `AA_TX_TYPE` and `AA_PAYER_TYPE` domain separation prevents reuse of signatures between roles. A bound payer is committed in the sender hash. The payer's exposure is bounded by `max_fee_per_gas * effective_gas_limit`. Payer authentication is metered outside `gas_limit`, so the payer's choice of `payer_auth` cannot affect execution. The payer signature binds the resolved sender account but not which key on that account signed: where an extension lets an account authorize several keys, a payer accepts any of them, and its exposure is still bounded by `max_fee_per_gas * effective_gas_limit`. **Cross-sender Payer Replay.** The payer hash substitutes the resolved sender. Without this, two EOAs that construct identical transaction bodies would produce identical payer hashes, letting one reuse a payer signature issued for the other. This matters most in open mode, where the sender does not name the payer: the substitution is what binds an open-mode payer signature to one sender. **Open Payer Replacement.** In open mode a third party that sees a pending transaction cannot replace it by attaching its own `payer_auth`: a replacement must raise both fee fields, and those are covered by the sender's signature. The first valid `payer_auth` to reach a node wins. Only the sender can produce a replacement, by re-signing with higher fees. **Value in Calls.** Value transfers are executed as part of each call frame and revert with their phase. `status == 0` does not mean no value moved: transfers in committed earlier phases persist. **Delegation.** Delegation requires native secp256k1 authentication as the account's own key, never replaces non-delegation bytecode, and is authorized by the transaction's own signature in the same nonce stream as the calls. That stream is always the account nonce (`nonce_key == 0`). **Keystore Integration.** Security properties of the Keystore, and the checks its integration adds to this transaction type, are specified in [EIP-8130](./eip-8130.md). ## Copyright Copyright and related rights waived via [CC0](../LICENSE.md).