Skip to content

[PREVIEW] EIP-8141 canonical paymaster — Stage 2 bytecode/hash/gas - #5

Draft
Marchhill wants to merge 6 commits into
stage2-preview-basefrom
stage2-preview-patch
Draft

[PREVIEW] EIP-8141 canonical paymaster — Stage 2 bytecode/hash/gas#5
Marchhill wants to merge 6 commits into
stage2-preview-basefrom
stage2-preview-patch

Conversation

@Marchhill

@Marchhill Marchhill commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Private preview — NOT for upstream

This is a private preview inside Marc's own fork of the Stage-2 additions that would eventually go into ethereum/EIPs PR ethereum#12012 ("specify the canonical paymaster implementation"). Nothing here is posted to, or intended for, the upstream PR yet. The base branch (stage2-preview-base) is the exact current ethereum#12012 content, so this diff shows only the Stage-2 delta.

What this adds to EIPS/eip-8141.md

  • Inserts the assembled 355-byte runtime bytecode and its per-fork keccak256 code hash 0xda42f0d11838c4c0c3129b8b8e93e9718127ad6b315e517e1088125707c4d45c into the canonical paymaster section (replacing the "will be added to this section" placeholders).
  • Replaces the ~2,150 gas estimate with the measured validation-path cost.
  • Adds assets/eip-8141/canonical-paymaster.md with the bytecode + hash, per the EIP assets convention.

The bytecode and hash are reproducible from the checked-in reference assembler (paymaster_asm.py, two-pass label resolution, self-contained keccak-256) — running it re-emits both values byte-for-byte.

⚠️ Two review points for Marc before this goes anywhere upstream

  1. Gas number provenance. The new wording asserts ~3,100 gas / measured 3,110 for the pay frame. That figure was measured on Nethermind's eip8141-frame-txs-devnet7 fork, which carries the EIP-8037/8038 state-gas repricing (cold SLOAD raised above the EIP-2929 2,100). Update EIP-8141: specify the canonical paymaster implementation ethereum/EIPs#12012 may be normative against a different cost schedule, in which case this number is misleading. Confirm with the PR author which cost schedule the spec is normative against before adopting this figure.

  2. Pseudocode block. The draft's §5 alignment (change != SECP256K1!= ARBITRARY, and require CALLER == SLOAD(0) → caller-OR-signer form) was checked against the live text: the published pseudocode already matches the intended final form (it already reads == ARBITRARY / if CALLER == SLOAD(0): return true with the signature fallback). So no pseudocode change was made — please confirm that is the expected state.

Anchor note

The draft assumed a "(… listed in the assets file)" parenthetical; the live text instead read "(normative; the assembled bytecode and its code hash will be added to this section)". The edit was adapted accordingly: the parenthetical is now (normative), and the bytecode/hash are listed in-section (mirroring the expiry-verifier convention) plus pointed at the new assets file.

…measured gas

Insert the assembled 355-byte runtime bytecode and its per-fork keccak256
code hash into the canonical paymaster section, replace the ~2,150 gas
estimate with the measured validation-path cost, and add the reference
artifacts asset file.
Present the reference contract as annotated EVM assembly (mnemonics, labels,
per-block comments) alongside the compiled bytecode and code hash, matching the
house style of the system-contract EIPs. The listing assembles byte-for-byte to
the pinned runtime bytecode and hash.
…prose

Describe the validation-path cost structurally (dispatch, three SIGPARAM reads,
memory-only APPROVE, one cold SLOAD) rather than quoting a fork-specific gas
figure, since the deployment fork is undetermined. Tighten the assets pointer
and reproducibility note.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant