Skip to content

Mempool Strategy ​


TL;DR ​

EIP-8141 separates consensus validity (programmable, broad) from public propagation (constrained, opinionated). The strategy uses two tiers:

  • Restrictive mempool ships first. Covers status-quo accounts, bounded custom validation, protocol-validated outer signatures, and gas sponsorship via canonical or low-volume non-canonical paymasters. This is the specified public mempool policy.
  • Expansive mempool develops in parallel, opt-in per node. Draft ERC-8421 now specifies it as a stake-and-reputation alternative mempool in the ERC-7562 lineage. Handles privacy protocols, ERC-20 paymasters, and complex validation. FOCIL nodes default to the restrictive set.

For state, the proposal extends the VOPS baseline to nonce, balance, code, and the first 4 storage slots per account. Extra reads pay for a merkle branch (4-8 kB today, 1-2 kB after binary tree migration) per item. See the AA-VOPS thread.

The framing is borrowed from Bitcoin: let consensus rules do a lot, but restrict at the mempool layer. Policy can evolve without hardforks while consensus stays narrow.

A consequence: the proposal claims frame transactions reduce the structural need for off-chain relayers. Public ERC-20 sponsors check frame shape and accept frontrunning risk; trustless balance-checking variants route through the expansive tier or private submission. See ERC-20 gas repayment.


Two Tiers in One Mempool ​

A frame transaction that misses the mempool rules is still consensus-valid on-chain. It just cannot be gossiped through the public p2p network.

TierWhat it carriesValidation costStatus
RestrictiveStatus-quo accounts, protocol-validated outer signatures, canonical paymaster, non-canonical (1 pending tx)Bounded: 4 prefix shapes, 100k execution gas, 500k state gas, banned environmental opcodes, sender-only readsSpecified in EIP-8141
ExpansivePrivacy protocols, ERC-20 paymasters, multi-paymaster, arbitrary VERIFY policiesHigher: staking/reputation, per-entity budgets, full simulationDraft ERC-8421, opt-in per node

Restrictive Mempool: What Ships First ​

The restrictive tier covers a small surface:

  • Self relay: account validates itself and pays its own gas
  • Canonical paymaster sponsorship (ETH-funded): a paymaster matching the canonical runtime code pays gas from its own ETH balance
  • Account deployment: deploy frame first, targeting any factory whose execution satisfies the deploy-frame trace rules (EIP-7997 is canonical but optional after PR #11567)
  • Non-canonical paymaster: bounded to 1 pending tx per paymaster

Validation constraints apply to the validation prefix, now a consensus term: the frames up to and including the first frame after whose execution payer is set (PR #12471). The prefix must match one of four shapes, keep execution budgets plus signature-validation cost within 100k and state budgets within 500k, avoid banned environmental opcodes (including SLOTNUM, PR #12066), read storage only on tx.sender, avoid calls to non-existent contracts, and match approval-scope flags. PR #12167 permits deterministic ORIGIN, TLOAD, TSTORE, and BLOBHASH. Consensus forbids VERIFY or approval scope inside an atomic batch (PRs #11955, #11987, #12109).

Expiry-verifier frames carry an 8-byte unix-seconds deadline to EXPIRY_VERIFIER, now an ordinary Nick's-method deployment at 0x81413f0c...FfFf rather than an activation install (PR #12387). They may appear only first, TIMESTAMP is permitted only for the canonical runtime, expired transactions MUST be dropped, and shape matching treats them as transparent. EIP-8272's canonical recent_root_verify frame follows the same pattern and also counts toward MAX_VERIFY_GAS (#12302).

Nodes may directly evaluate a prefix when every frame uses default code, the expiry verifier, or the canonical paymaster (PR #12001), provided the shortcut produces the same dependencies, gas, and cap results as EVM simulation.

Producer re-execution bound (PR #12213, merged Sep 29): a transaction pays nothing until a frame approves payment, so block producers SHOULD bound unpaid re-execution of a prefix that never approves and MAY evict it after repeated failed build attempts. This is local policy, not consensus.

What this enables: default-code secp256k1 EOAs, smart accounts with bounded validation, protocol-validated outer signatures, 100-gas ARBITRARY witnesses, a single EIP-8397 AUTHENTICATOR entry (two exceed the cap), ETH-funded canonical sponsorship, and non-canonical sponsors within the one-pending-tx cap.

ERC-20 gas repayment ​

"Pay gas in ERC-20" is not covered by the canonical paymaster; it only covers ETH-funded sponsorship. EIP-8141 still supports ERC-20 repayment through non-canonical paymasters, with a clear public/private split.

DimensionPublic ERC-20 sponsorTrustless balance-checking sponsor
VERIFY logicChecks sponsor authorization or signature metadata, then inspects the next SENDER frame for the ERC-20 transfer shapeIntrospects frames and reads ERC-20 contract storage to confirm the user can pay
Offchain serviceOptional; the sponsor can pre-authorize terms offchainNone
Mempool tierRestrictive (public), as a non-canonical paymaster subject to MAX_PENDING_TXS_USING_NON_CANONICAL_PAYMASTER = 1 per paymasterExpansive (ERC-8421), private mempool, or direct-to-builder submission
VOPS-compatibleYes, if it avoids external token storage reads during validationNo (reads state outside the VOPS+4 slice)
Trust modelSponsor absorbs frontrunning risk: the user can zero the ERC-20 balance before inclusionTrustless with respect to token balance, but not publicly propagatable under the restrictive tier
Unique to EIP-8141No (any signature-checking paymaster works this way)Yes (enabled by frame introspection)

Example 5 in the spec (EOA Paying Gas in ERC-20s) is the public sponsor shape. karlb (post #178, Oct 20) asked whether the example needs an explicit check that the ERC-20 transfer succeeded before user execution runs; the thread has no answer yet.

A newer risk: under EIP-7906, a sender's own ASSERT frame can roll back the execution body, including the ERC-20 repayment, while the sponsor's prefix payment stands. Open PR #12304 proposes an exempt flag; forshtat prefers ERC-8421's pre_verify frames. The ban on external storage reads is deliberate, so the public workaround stays economic.


Expansive Mempool: What Develops in Parallel ​

For use cases exceeding restrictive policy: privacy protocols that read nullifier state outside tx.sender, and trustless ERC-20 paymasters that read token storage.

ERC-8421 (Yoav Weiss, Dror Tirosh, Alex Forshtat, Shahaf Nacson, and co-authors; opened Sep 22) is the first concrete specification. It defines a framework for alternative mempools with their own validation rulesets, plus a standard permissionless ruleset that is mostly backward compatible with ERC-7562: staking registry, reputation, per-entity verification budgets (MAX_VERIFY_GAS_PER_ENTITY), and a pre_verify frame subclass. Review aligned its nonce rules with EIP-8250 keyed nonces and exempted staked senders from the same-sender cap. It is not a precondition for shipping EIP-8141; clients ship restrictive first.

Transactions outside both tiers remain consensus-valid and reach builders through private channels.


The State Side: VOPS + 4 Slots ​

State itemPer accountNotes
NonceAlready in VOPSStandard EOA validation
BalanceAlready in VOPSStandard EOA validation
CodeAlready in VOPSNeeded to detect smart accounts
First 4 storage slotsNewCovers most common AA validation reads

A small constant-factor increase over VOPS, covering common AA validation reads such as signer sets and replay counters.


The Merkle Branch Escape Hatch ​

For use cases reading state outside VOPS+4, the transaction includes a merkle branch proving the state items it reads.

PropertyToday (MPT)After binary tree
Branch size per item4-8 kB1-2 kB
Items typically proved1-21-2

Status-quo and AA-VOPS-friendly transactions pay nothing extra.


Resolving the Trilemma ​

The "choose 2 of 3" trilemma (Frames + FOCIL + VOPS) resolves under this strategy:

Transaction classRestrictive?FOCIL?VOPS+4?Extra cost
Status-quo accountsYesYesYesNone
AA wallets reading 4 own slotsYesYesYesNone
AA wallets reading > 4 own slotsYesYesYes (witness)1-2 branches
Canonical paymaster (ETH-funded)YesYesYesNone
Non-canonical, low volumeYes (1 pending)YesYesNone
Non-canonical, high volumeNo (expansive)Opt-inN/AExpansive tier
Public ERC-20 sponsorYes (1 pending)YesYesSponsor accepts frontrunning risk
Trustless ERC-20 balance-checking sponsorNo (expansive/private)Opt-inYesExpansive tier or private mempool
Privacy protocolNo (expansive)Opt-inYes (witness)Branches + expansive

Frames + FOCIL + VOPS coexist for the majority of traffic. Edge cases pay per-tx cost or move to the expansive tier.


Why Frame Transactions Don't Need Relayers ​

Anything a relayer does for EIP-4337 can be expressed as an onchain contract under EIP-8141: privacy rebroadcasters repackage canonical-mempool transactions with witness branches, and ERC-20 gas fronting uses public or expansive-tier sponsors. EIP-4337 + EIP-7702 need relayers because validation does not run in-protocol. Whether onchain substitutes match bundlers' operational properties is open.

The Svalbard interop AA breakout (Apr 27) added "no relayers for core functionality" to native AA's primary goals and deferred ERC-20 sponsorship to relayer-dependent paths. See Feedback Evolution → Svalbard Interop AA Breakout. The practical implication is central to the Developer Tooling bull case: wallet adoption reduces to "implement a new transaction type."


Open Questions ​

Mempool Health and Censorship Resistance ​

Nodes that cannot validate frame transactions cannot maintain healthy mempools, propagate them, or enforce FOCIL inclusion lists covering them. The restrictive tier is validatable by minimal nodes, and FOCIL nodes default to it. Whether this suffices depends on FOCIL adoption breadth.

Verification Budget ​

Research since September argues 100k is too low for privacy. mmjahanara measured 211,828 gas for a one-note spend and 351,828 for a larger RAILGUN shape, recommending at least 250k; Nethermind measured about 236k for one withdrawal. Frames devnets run a 500k verification limit. Open PR #12301 would make 100k a propagation floor rather than a cap; lightclient objected that relaying above the floor needs a peer-capability signal.

Per-Sender Concurrency ​

The spec keeps one pending transaction per sender. soispoke's MATCHA proposes mempool width earned from finalized gas, which Nethermind has partially implemented; EIP-8250's keyed-nonce concurrency (#12039) is idle.

Canonical Paymaster Adoption ​

The restrictive tier relies on a canonical paymaster recognized by runtime code match. Open PR #12041 would pin an assembled runtime and code hash but has had no author review since July; attempts to admit paymasters by an egress property (#12328) or reorg-depth delay (#12330) closed because neither is node-decidable.

Replacement and Payer Exposure ​

PR #12007 merged Jul 28. Pending alternatives share (sender, nonce) identity; replacements independently pass admission and raise both execution-fee fields. Reservations move atomically if the payer changes, aggregate exposure is balance-bounded, and eviction prioritizes invalid transactions, then nearest expiry, then lowest priority fee. Open PR #12321 would reorder admission so cheap checks precede simulation and treat payer balance changes as accounting-only. Open PR #12414 would replace the fee fields with one max_fee, which would change what reservations hold.

Untracked Validation Dependencies ​

Code adoption creates dependencies the policy does not yet track. EIP-8298 SETCODEFROM received 8141 mempool rules treating code that can call it as mutable (#12427). nezu511 (post #179, Oct 21) showed EIP-8151 makes ecrecover read the recovered address's code, which affects the canonical paymaster; the thread asks whether recovered addresses should become tracked dependencies.

FOCIL Validity Profiles ​

EIP-8369 merged Sep 1 and is PFI for Hegotá. Profile 1 checks ordinary validity at end of payload; Profile 2 replays a bounded validation prefix at a builder-claimed position with its own storage rules, and claimed-index transport remains an activation prerequisite. Marchhill's open #12394 and #12396 would move binding Profile 2 budgets, omission claims, and replay into EIP-7805. EIP-8361 (PR #12075) separately proposes mempool-layer STARK proofs of validation-prefix validity.

Encrypted Mempool Compatibility ​

Encrypted mempools (like LUCID/EIP-8184) hide transaction contents before inclusion, so nodes cannot check minimal fields for DoS prevention. The proposed answer routes encrypted transactions through the expansive tier and onchain rebroadcasters. See also PQ Roadmap → Stage 4.

Transaction Propagation Fragility ​

The restrictive tier's guarantee rests on every client implementing the same policy. If clients drift, the effective propagation surface shrinks to the intersection. Mitigations are social: reference implementations, conformance tests, and shared canonical paymaster bytecode. Breakout #7 found receipt and RPC inconsistencies across devnet clients, an early instance of this risk.

Privacy Pools and the Three Gates ​

Nero_eth's Three Gates to Privacy (Apr 16) argues shielded-pool withdrawals fail three gates by default:

GateWhat it checksWhy privacy withdrawals fail
Public mempoolVERIFY ≤ 100k gas, reads bounded to tx.sender storage, banned opcodesGroth16 pairing check ~250k gas exceeds cap; nullifier slots live in the pool contract, not tx.sender
FOCIL enforcementPer-tx 100k cap and per-IL 250k budgetCumulative budget fits ~2 frame transactions; append-loop builder compliance imposes quadratic overhead
VOPS / AA-VOPS node validationNodes carry only balance/nonce (VOPS) or a few slots per account (AA-VOPS)Nullifier lookups are hash-keyed slots in an external contract; no fixed N suffices

Frame transactions already remove relayer trust: invalid proofs revert in VERIFY before gas is charged, so the sponsor can be paid from the withdrawal. The gates block inclusion, not payment. The post proposes a canonical-pool code-hash exemption, a ~400k VERIFY cap for canonical frames, validation-index FOCIL enforcement, a 1M per-inclusion-list budget, and relaxed nullifier reads. EIP-8369's claimed-index Profile 2 and the September budget research move the second and third proposals forward.

EIP-8272 covers a narrower part: transactions declare recent application roots in a canonical recent_root_verify frame (PR #12281, merged Sep 4), so validation reads verified roots instead of mutable pool storage. This helps recent-root availability and bounded eviction; it does not solve nullifier reads, proof cost, or the FOCIL budget. See VOPS Compatibility → Status.


Summary ​

  • Two-tier mempool: Restrictive (in spec, common case) and Expansive (draft ERC-8421, opt-in, privacy and complex validation).
  • VOPS extension (proposed): nonce, balance, code, first 4 slots per account.
  • Merkle branch escape hatch (proposed): 4-8 kB today, 1-2 kB after binary tree.
  • Trilemma: Frames + FOCIL + VOPS coexist for most traffic. Edge cases pay per-tx cost or use the expansive tier.
  • Relayer reduction (proposed claim): privacy rebroadcasters and trustless ERC-20 sponsors are onchain contracts on the expansive tier; public ERC-20 sponsors propagate in the restrictive tier but carry frontrunning and ASSERT-rollback risk.
  • Open questions: verification budget (100k cap vs 250k+ privacy needs), per-sender concurrency (MATCHA), canonical paymaster adoption, untracked code dependencies (EIP-8151/EIP-8298), FOCIL profiles, encrypted mempool routing, propagation fragility, and the three gates.

  • VOPS Compatibility — the state-side view of the same trilemma, with plain-English definitions of VOPS, FOCIL, and validation state.
  • Current Spec → Mempool Policy — the restrictive tier as it appears in the spec itself.
  • PQ Roadmap — how the mempool strategy interacts with encrypted mempools and the longer PQ arc.