Skip to content

Update EIP-8141: assembled canonical paymaster reference bytecode - #12041

Open
Marchhill wants to merge 15 commits into
ethereum:masterfrom
Marchhill:stage2-upstream
Open

Update EIP-8141: assembled canonical paymaster reference bytecode#12041
Marchhill wants to merge 15 commits into
ethereum:masterfrom
Marchhill:stage2-upstream

Conversation

@Marchhill

Copy link
Copy Markdown
Contributor

Completes the canonical paymaster implementation with its assembled reference runtime, code hash, and annotated assembly. Continues #12012.

  • Runtime bytecode (355 bytes) implementing the section's pseudocode: dispatch, payment validation, deposit, and the four timelocked admin operations (withdrawal/rotation initiate, cancel, finalize).
  • Per-fork recognition anchor: keccak256 code hash 0xda42f0d11838c4c0c3129b8b8e93e9718127ad6b315e517e1088125707c4d45c.
  • Annotated assembly in assets/eip-8141/; the annotated listing itself is the reproducible source and assembles byte-for-byte to the runtime bytecode and code hash.
  • Removed the superseded Solidity reference assets/eip-8141/CanonicalPaymaster.sol (old 12h-delay, secp256k1-only, withdraw-to-arbitrary-recipient design with no rotation), which this PR's assembled paymaster supersedes.
  • Gas note made schedule-agnostic (validation is dominated by one cold SLOAD, so a canonical pay frame needs a gas_limit of at most 15,000).

Assembled from the normative pseudocode and validated against a reference implementation's test suite: payment authorization, deposit, withdrawal/rotation timelocks, admin authorization via both the caller and signature routes, reentrancy safety, and the CALL-failure path.

svlachakis and others added 15 commits July 29, 2026 19:26
…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.
Remove the superseded assets/eip-8141/CanonicalPaymaster.sol (old 12h-delay,
secp256k1-only, arbitrary-recipient withdrawal design with no rotation), which
the assembled canonical paymaster in this PR supersedes.

Introduce 15,000 as the recommended pay-frame gas_limit bound rather than
referencing it as if defined elsewhere. Correct the admin-path claim that both
finalize paths clear pending state before acting (rotation writes slot 0 before
clearing, and has no external call to observe ordering). Harmonize two
remaining "code match" phrasings to the runtime-code-hash-of-the-active-fork
wording. Reword the assets closing line to point at the annotated listing as
the reproducible source instead of a non-checked-in assembler.
@github-actions github-actions Bot added c-update Modifies an existing proposal s-draft This EIP is a Draft t-core labels Jul 30, 2026
@eth-bot

eth-bot commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

File EIPS/eip-8141.md

Requires 1 more review from Authors: @derekchiang, @drortirosh, @fjl, @forshtat, @lightclient, @nerolation, @shahafn, @svlachakis, @vbuterin, @yoavw

@eth-bot eth-bot added the a-review Waiting on author to review label Jul 30, 2026
AnkushinDaniil
AnkushinDaniil approved these changes Jul 30, 2026
@Marchhill
Marchhill marked this pull request as ready for review July 30, 2026 12:15
@Marchhill
Marchhill requested a review from eth-bot as a code owner July 30, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a-review Waiting on author to review c-update Modifies an existing proposal s-draft This EIP is a Draft t-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants