EIP.tools

EIP.tools

⚠️ DraftStandards Track: Core

EIP-8361: Transaction Validity Proofs

Validation proofs let nodes admit frame transactions to the public mempool and enforce inclusion lists.

Authors
Created2026-07-30
Discussion Linkhttps://ethereum-magicians.org/t/eip-8361-transaction-validity-proofs/29265
Requires

Markdown

https://raw.githubusercontent.com/ethereum/EIPs/re...
Pull Request#12075PR open

EIP-GPT summary

Contents
AbstractMotivationSpecificationProof Profile and LimitsCertified StatementFee-Reusable BindingNative ChecksRecursive BatchesAdmission and RevalidationFOCIL EligibilityAuthenticated Certificate DataBounded Inclusion ChecksTransportRationaleBackwards CompatibilityTest CasesSecurity ConsiderationsCopyright

Abstract

This EIP defines optional validation certificates for EIP-8141 frame transactions. A STARK certifies successful validation-prefix execution conditional on explicit inputs and separately checked protocol obligations, allowing a higher bounded validation budget. Recursive batches amortize proof verification and transport. Certificates support public mempool admission and an additional eligibility path for fork-choice enforced inclusion lists (FOCIL, EIP-7805). Included transactions execute and pay gas normally.

Motivation

The public mempool's unpaid validation-work cap limits which account policies can use it. Certificates raise that expressiveness ceiling while bounding the work imposed on receiving nodes. Applications include large delegation sets, session-key and recovery-policy engines, and account-code proof verifiers for curves or policies not directly supported by EIP-8288's dependency schemes. State-access restrictions and ordinary on-chain execution costs still apply.

This is a long-term proposal for wallets to prove locally on consumer hardware and submit through the public mempool. It assumes deployed frame transactions and FOCIL, a standardized L1 EVM proof system with a restricted prefix mode, and practical consumer proving within transaction deadlines. These are deployment preconditions, rather than claims about current performance.

If block verification moves to validity proofs, mempool validation can remain a node's main reason to execute the EVM. A verifier that does not retain the required state cannot simulate arbitrary prefixes without obtaining authenticated inputs. Prefix proofs provide a compatible admission path; fully stateless use additionally needs witnesses for the assumptions checked outside the circuit. Stateful nodes can already revalidate unchanged assumptions on head changes without re-executing authorization, and FOCIL can use the same conditional-validity model.

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.

Proof Profile and Limits

A proof profile fixes the network and fork rules, canonical encodings, prefix interpreter, execution environment, STARK verifier, and verification keys PREFIX_VK and BATCH_VK. It identifies whether it certifies mempool rules, the FOCIL rules below, or both; certification of one MUST NOT imply the other. Its identifier commits to these choices and the following limits:

ParameterBound
MAX_PROVEN_VERIFY_GASEIP-8141 signature cost plus declared prefix execution-gas limits
MAX_ASSUMPTION_COUNTAssumptions per transaction
MAX_BATCH_STATEMENTSDistinct statements per certificate
MAX_ADMISSION_PROOF_SIZEEncoded proof bytes
MAX_ADMISSION_MESSAGE_SIZETotal encoded certificate and supplied transaction records
MAX_IL_ADMISSION_BYTESEncoded certificate and records per inclusion list
MAX_IL_ASSUMPTIONSTotal assumptions in those records

Activation requires EIP-8141 and EIP-7805. The prefix interpreter MUST be a restricted mode of the fork's standardized L1 EVM circuit specification. That specification's maintainers MUST publish and maintain each prefix profile's source revision, reproducible key derivation and cross-implementation test vectors, including deviations for deferred native checks. Fork updates MUST preserve this correspondence; cached results MUST NOT cross incompatible profiles.

All limits, canonical wire encodings, verifier work and memory bounds, and network and Engine API versions MUST be fixed before activation. Benchmarks MUST demonstrate practical local proving on representative consumer hardware within supported transaction deadlines, and bound worst-case verification, state access and transport across the entire IL committee. MAX_PROVEN_VERIFY_GAS MUST respect the ordinary transaction execution-gas cap. Recursive circuits MUST bound private input counts and verification work independently of output size. Nodes MUST reject unknown or inactive profiles.

Certified Statement

Let T be the canonical typed transaction envelope, A its assumption vector, and P its payer. A statement commits to:

statement_digest = keccak256(rlp(["eip-8361/statement", profile_id, binding, tx_commitment, A, P]))

Domain strings are ASCII bytes; binding MUST be 0 or 1. For exact binding (binding = 0), tx_commitment = keccak256(T), including all signature bytes. sig_hash(T) alone is insufficient because it omits some signature bytes observable by account code. Restricted fee-reusable binding is defined below; transaction identifiers in gossip, replacement policy and omission claims always remain keccak256(T).

The circuit MUST prove the complete recognized validation prefix through successful completion of the first top-level frame that leaves payer P set. It enforces the fork's EVM and frame semantics, approval scopes, nonce effects and gas accounting, with only the stated native checks deferred. For mempool certification it applies EIP-8141 structural and trace rules, replacing MAX_VERIFY_GAS with MAX_PROVEN_VERIFY_GAS; FOCIL certification applies the rules below. Existing state-gas bounds remain. An APPROVE in a nested call followed by an enclosing revert does not establish successful validation.

A is a list of exact (selector, value) assumptions, ordered by the canonical encoding of selector, with no duplicate selectors. The profile defines typed selectors for account nonce, balance, code hash, existence, storage slots, and permitted execution-context inputs. Every external input affecting the prefix MUST be fixed by T, the profile, A, or the native checks below, including implicit inputs to account warmth and gas charging. Declaring an input does not permit an otherwise forbidden access.

Supplied code MUST match its recorded code hash. Execution uses normal transaction-local writes and rollback: a read after a deployment write cannot substitute an independent initial-state value. The circuit performs no state-tree lookup; nodes check assumptions against authenticated state and execution context. Arbitrary threshold assumptions about EVM reads are not supported. Assumption witnesses for nodes that do not hold that state require a separately specified authentication and update mechanism; certificates alone do not establish state membership.

Fee-Reusable Binding

For binding = 1, T MUST have no blobs. Define template(T) as the canonical re-encoding after setting its two execution-fee fields to zero and replacing the raw bytes of each protocol-verified signature with empty msg by an equal-length zero byte string. All other fields, including signature schemes, signers, messages, lengths, and every ARBITRARY witness, remain unchanged. Then tx_commitment = keccak256(template(T)).

The circuit MUST establish prefix success for every transaction matching the template and assumptions that passes the native checks, not merely for one fee choice. It MUST reject reads of TXPARAM selectors 0x03 through 0x06 or 0x08, and any other direct or indirect observation of changed fees, signing hash, intrinsic cost or payment amount outside deferred native checks. This includes implicit gas and balance effects and any observation after payment. The protocol payment check and debit MUST be deferred under the balance-independence conditions below. Account-code signature verification remains proven and cannot be replaced by an assumed result.

Nodes MUST recompute intrinsic costs, gas caps, fees, maximum payment and protocol signatures from the actual T; mempool use also applies ordinary replacement and reservation rules. A certificate is reusable only while its template and assumptions match. Changes to frames, custom witnesses or other committed fields require a new proof; fee-dependent account policies use exact binding.

Native Checks

The circuit MAY assume successful EIP-8141 protocol-signature verification and EIP-8288 dependency verification. Nodes MUST derive both lists from T and verify them through their respective mechanisms. Verification executed by account bytecode, including checks of ARBITRARY signature witnesses, MUST remain inside the proven computation.

The circuit MAY defer the protocol balance check and debit at APPROVE. It MAY omit that payer balance from A only if it proves the prefix leaves the balance unchanged before payment and does not otherwise observe it, including through implicit checks or after payment. Nodes then check balance(P) >= max_cost(T) natively. All other approval effects, account-existence and state-gas checks, and completion of the enclosing frame remain proven. Any other dependence on that balance requires an exact assumption and the payment effects to be proven. Mempool admission also applies EIP-8141's reservations, pending withdrawals, and payer-exposure rules.

The canonical expiry frame's predicate MAY likewise be checked natively when the circuit establishes the required runtime-code match and frame semantics. The deadline comes from T. No unsigned metadata condition changes the transaction's authorization or on-chain validity.

Recursive Batches

A single certificate contains one statement digest and a proof under PREFIX_VK with public input statement_digest. A batch certificate contains a strictly increasing list digests, with 1 <= len(digests) <= MAX_BATCH_STATEMENTS, and a proof under BATCH_VK with public input:

batch_digest = keccak256(rlp(["eip-8361/batch", profile_id, len(digests), digests]))

The batch circuit MUST verify single or batch certificates under the same profile's fixed keys and prove that digests is exactly the sorted, deduplicated union of their statements. It MUST reject invalid child proofs or mismatched commitments. A batch certifies independent conditional statements; it does not certify their joint executability or shared funding.

Nodes MAY admit or forward any supplied subset of the certified transactions, retaining the complete digest list and unchanged proof. Each supplied (T, binding, A, P) MUST match a listed digest, with at most one record per digest. Unprovided members create no pool entries or obligations and need not be retrieved. A stale member does not invalidate another member's certificate or prevent its admission. Removing digests from the certificate requires a new proof; dropping transaction records does not.

Admission and Revalidation

Before admission, a node MUST:

  1. Enforce profile, byte and count limits before large allocations; check canonical encodings, transaction structure and intrinsic validity.
  2. Match each supplied transaction record to its certified digest and check its current assumptions, protocol nonce, expiry, fee eligibility and available payer funding.
  3. Verify the single or batch proof, unless the exact certificate is already verified under the active profile.
  4. Verify the transaction's protocol signatures and dependencies separately. Native protocol-signature work remains bounded by EIP-8141's MAX_VERIFY_GAS; EIP-8288 limits also remain in force.
  5. Apply ordinary pool admission, replacement and reservation accounting to each admitted transaction. Shared funding MUST be reserved sequentially, not tested independently against the same unreserved balance.

Passing these checks permits admission without prefix simulation. A valid certificate is not sufficient if any native check fails. Nodes MAY decline certificates under local resource policy.

Nodes MUST recheck affected assumptions and native obligations on head changes and update reservations on pool changes; they SHOULD index dependencies to avoid scanning unaffected transactions. Verified proofs need not be reverified while the profile remains active. Failed assumptions require a replacement certificate or ordinary simulated admission; nodes MAY retain bounded parked entries but MUST NOT propagate them as currently admissible.

A builder relying on a certificate MUST check its assumptions and native obligations against the state and context at the proposed insertion point. If they fail, the certificate provides no assurance there; any fallback simulation remains subject to the builder's unpaid-work limits. Included transactions execute normally.

FOCIL Eligibility

FOCIL certificates prove the Profile 2 rules of EIP-7805, described by EIP-8369, with only the declared validation-work cap raised to MAX_PROVEN_VERIFY_GAS. Prefix shape, allowed storage, delegation, code-body bounds, state gas, nonce and approval semantics remain unchanged. Canonical paymaster code grants no trace exception. The circuit MUST enforce these rules and completion of the entire declared prefix; a mempool-only certificate is insufficient.

Authenticated Certificate Data

Each inclusion list gains an optional admission_certificate containing one single or batch certificate and records (transaction_hash, binding, A, P). Records MUST be strictly ordered by transaction hash, refer to transactions in that IL, and match distinct certified digests. The complete digest list is retained; unused digests impose no obligation. The IL signature MUST authenticate this data together with the transactions. Proofs cached from public gossip cannot create obligations absent from the signed IL.

The ordinary IL transaction-byte cap remains unchanged. The signed IL encoding MUST bound the additional field by MAX_IL_ADMISSION_BYTES. Within an otherwise valid authenticated IL, an absent, malformed, inactive-profile or invalid certificate, or one exceeding MAX_IL_ASSUMPTIONS or the profile's proof, record or per-transaction limits, supplies no additional eligibility. These failures MUST NOT remove ordinary EIP-7805 obligations. Missing authenticated IL data MUST be obtained before completing the check; local unavailability is not proof failure.

The activating fork MUST define CL gossip and Engine API encodings that carry this data with each separate IL, in committee-position order, for construction, payload building and inclusion checking. Existing omission claims and deferred-check rules remain unchanged; repeated requests MUST retain the same certificate data as well as the same ILs and claims. Certificate validity is checked by the EL, so the CL MUST NOT discard an otherwise applicable IL merely because its certificate fails.

Bounded Inclusion Checks

Run the ordinary EIP-7805 budget fill unchanged. Independently, each committee position has a certified-signature budget of MAX_VERIFY_GAS_PER_IL and at most one certificate verification. For a valid certificate, process its records in transaction-hash order, including transactions already in the payload:

  1. Check Profile 2's noncryptographic candidate conditions with the raised work cap. Require native signature cost s <= MAX_VERIFY_GAS_PER_TX; skip failures.
  2. If s exceeds the remaining certified-signature budget, skip without a debit. Otherwise deduct s and verify the protocol signatures; failure retains the debit but grants no eligibility.
  3. A passing record is admitted to the certified path. Assumption or native-check failure later does not refund the debit. No prefix execution cost is deducted because this path performs no prefix replay.

These budgets are independent across positions and additional to the ordinary fill. Verification results MAY be shared, but budget debits MUST NOT depend on caching. Profile limits MUST bound the combined ordinary and certified paths, including invalid proofs and all assumption checks. Includers SHOULD select records whose total native signature cost fits the certified budget and whose assumptions hold for the target slot.

For an omitted admitted record, use EIP-7805's evaluation_index, default and clamping rules, treating the raised-cap candidate as a Profile 2 candidate for claim selection. Check A and native obligations against authenticated S_k and the payload's execution context, before post-execution updates. Retain the ordinary nonce, chain, fee and separate execution/state-gas fit checks. Check maximum-payment funding natively when deferred; otherwise payment is established by the proof. Local pool reservations and admission policies do not apply. EIP-8288 dependency-proof and block-capacity conditions apply separately.

Omission is unjustified if any applicable position establishes either ordinary EIP-7805 eligibility or certified eligibility at that index. A stale or failing record removes only its certified path; other records, positions and ordinary eligibility remain effective. No expensive fallback replay or new proof generation is required. Builders can use the same checks to include a candidate or claim an index where it fails; local proof retention or proving capacity is not an omission ground.

Transport

A negotiated devp2p extension announces certificate identifiers and sizes and retrieves certificates and transaction records on demand. Single and batch kinds MUST be distinguished; identifiers commit to the profile, kind, full digest list, and proof bytes. Proofs for this EIP MUST NOT be interpreted as EIP-8288 aggregation proofs merely because they share a backend.

Mempool certificate gossip MUST announce before retrieval. Nodes MUST NOT run proof verification on announcements or unsolicited certificate bodies; they request bodies only after checking profile, advertised size, relevance and per-peer budgets. Retrieved data MUST match its announced identifier and size, and cheap structural checks MUST precede proof verification.

Nodes MUST bound global and per-peer outstanding requests, verification queues, bandwidth and cached bytes, including duplicate and overlapping batches. They MUST penalize peers supplying malformed or cryptographically invalid requested certificates, with repeated failures leading to request throttling or disconnection. State staleness alone MUST NOT incur that penalty. Nodes MUST verify before forwarding, and forwarded transaction records MUST pass admission checks. These retrieval and forwarding rules govern mempool certificates; signed ILs follow FOCIL gossip rules. A cached certificate can be released when no retained member needs it. Certificates are carried in gossip and signed ILs, not execution blocks or receipts. Nodes are not required to generate proofs, aggregate, or wait for a full batch.

Rationale

Circuit reuse and local proving. A prefix mode of the standardized L1 circuit shares fork semantics, audits and maintenance with block proving. Its assumptions interface, deferred checks and eligibility restrictions still need separate review. Wallets prove the bounded prefix locally; receiving nodes need only a verifier. A general zkVM or specialized circuit is suitable only if it realizes the standardized profile. EIP-8288 backend reuse also requires a compatible profile or wrapping; sharing a proof system does not make statements interchangeable.

Cost. A large proof and its verification can cost more than native execution of an ordinary bounded prefix. Exceeding MAX_VERIFY_GAS does not establish a cost advantage: EVM gas, execution time and proving work differ. Benchmarks compare optimized simulation and caching with proof decoding, valid and invalid verification, assumption checks, bandwidth and memory. They report consumer hardware specifications, prover peak memory and latency, including recursion, against assumption lifetimes and transaction deadlines, with roughly one-million-gas prefixes among the reference workloads. Deployment depends on acceptable resource bounds for the additional expressiveness; any claimed savings require a measured crossover. EIP-8288 dependencies, including wrapped custom computations, can also avoid in-EVM verification at inclusion; this EIP preserves account-code validation and its execution cost.

Amortization. Peers may recursively combine independently generated certificates during gossip, spreading outer proof and verification costs over usable members. Metadata and state checks remain per transaction. Aggregation before public gossip can save first-hop leaf verification; aggregation after a node verifies every leaf saves subsequent hops only. Batching adds proving work and waiting time, without eliminating prefix proving or on-chain execution. Mostly stale batches, sparse traffic or short deadlines may favor individual certificates or simulation; public admission does not require an aggregator.

Reusable assumptions. Exact assumptions survive unrelated state changes. Native payment checks tolerate balance churn when the code has no other balance dependence; reservations still apply. Arbitrary GEQ assumptions would require proving success for every satisfying input, which one execution at a threshold cannot establish. Ordinary simulation results can also be cached while their inputs remain valid.

Fee replacement. Merely removing fee fields from a hash is unsafe: fees also affect the signing hash, protocol signatures, intrinsic costs and payment. Restricted template binding excludes these observations from the proven computation and checks the actual replacement's protocol obligations natively. It suits expensive policy evaluation combined with protocol-verified transaction authorization; custom authorization bound to the signing hash still requires reproving.

FOCIL. Signing certificate data makes obligations independent of each verifier's mempool. One certificate per position allows recursion without requiring includers to prove anything, while separate certified accounting preserves the ordinary eligibility path. Exact assumptions can give weaker protection than replay: changing an assumed value may defeat the certificate even when the transaction would still validate. A builder-selected index therefore protects expensive transactions only while the certificate's assumptions and native validity remain satisfied at every selectable index. Authentication witnesses for a fully stateless node are a follow-on, not an implied feature of the certificate.

Backwards Compatibility

There is no new transaction type, opcode, or execution-gas change. Mempool certificate use is optional; unsupported peers can simulate within their limits or decline admission. The FOCIL extension changes consensus eligibility and signed IL data, requires a network upgrade, and makes certificate verification mandatory for enforcing nodes. Certificates do not replace execution-payload validity checks.

Test Cases

Profile conformance cases cover at least:

  • Changed ARBITRARY witness bytes; omitted code or storage assumptions; incorrect reads after deployment writes; insufficient state gas; nested approval followed by enclosing revert.
  • Balance changes with and without another balance dependence; changed paymaster owner; insufficient shared reservations; expired transactions; different insertion-point context.
  • Invalid external signatures or dependencies despite a valid prefix proof; wrong profile or verification key; malformed and oversized objects.
  • Invalid recursive children; altered, duplicate or missing digests; subset delivery; overlapping batches; one stale member alongside valid members; private recursion work exceeding its bound despite a small final list.
  • Fee-only replacement with fresh protocol signatures; changed signature-data costs or lengths; changed custom witnesses; direct fee or signing-hash reads; indirect payment dependence; replacement that exceeds native gas or funding limits.
  • Certified FOCIL candidates above the replay cap; ordinary candidates alongside invalid or absent certificates; signature-budget exhaustion; independent committee positions; stale assumptions at the claimed index; valid eligibility under another position or the ordinary path.
  • Unauthenticated, unavailable or oversized IL certificate data; mempool-only profiles used for FOCIL; forbidden payer storage or code-bound violations; changed certificate data on a deferred-check retry.
  • Unsolicited proof bodies; false advertised sizes or identifiers; invalid proofs that consume maximum verifier resources; stale but cryptographically valid records without a peer penalty.

Security Considerations

Certificate soundness depends on the proof system, prefix semantics and binding rules. Mempool-only bugs can cause unpaid work; FOCIL verification disagreements can split fork choice, and unsound certificates can demand inclusion of invalid transactions. Circuit maintenance and cross-implementation agreement are therefore consensus concerns. Invalid proofs require no honest proving effort to send: bounded retrieval, verification and peer penalties limit this attack but do not remove Sybil risk. Restricting state access, funding exposure and revalidation remains necessary. The full committee's certificate bytes, valid and invalid verification costs, native checks and ordinary replays all count toward the FOCIL deadline.

Copyright and related rights waived via CC0.

EIP.tools

EIP.tools

Search, read, and map Ethereum improvement proposals, ERCs, RIPs, and CAIPs from one focused interface.

Farcaster
by @apoorveth