Update EIP-8141: specify the canonical paymaster implementation - #12012
Closed
svlachakis wants to merge 7 commits into
Closed
Update EIP-8141: specify the canonical paymaster implementation#12012svlachakis wants to merge 7 commits into
svlachakis wants to merge 7 commits into
Conversation
Collaborator
File
|
This was referenced Jul 29, 2026
Draft
Contributor
Author
|
work is moved to #12041, closing this one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft. Replaces the canonical paymaster placeholder ("authorizes with a single secp256k1 signer via ecrecover... may change in later specifications") with the implementation: normative storage layout, payment authorization, treasury rules, admin interface, runtime behavior, and per-fork code-hash recognition. The assembled bytecode and its code hash follow once the reference implementation's test run completes; the runtime behavior in the section is the normative definition it will be assembled from.
The design is one invariant applied three times: every state transition that can change a pending transaction's validity is either visible in the tracked set, or delayed longer than the mempool horizon. The three such transitions are a balance decrease, a withdrawal, and a signer change. Balances decrease only through APPROVE charges (tracked) and matured withdrawals (tracked and delayed); signer rotation shares the withdrawal timelock, because payments are an exit a timelock cannot guard - whoever holds the signer key holds the treasury, so changing the key must be as slow as removing the money. With the invariant in place, node accounting is mechanical: admission is a hash comparison plus four slots, revalidation is a diff of the same four slots plus balance, and solvency is arithmetic on slot 1.
Specific choices, briefly:
compute_sig_hash- already verified before any frame runs - so validation is an identity check, not a cryptographic one: ~2,150 gas (threeSIGPARAMreads, one coldSLOAD,APPROVE). Because the hash covers the chain id, the sender, its nonce, and the pay frame's own target, one authorization binds exactly one transaction against exactly one instance on exactly one chain; replay protection needs no additional machinery.compute_sig_hashelides only signature bytes for empty-msgentries, so the authorization commits to the signer at index 1 without circularity. Index 1 follows the existing convention for payment signatures.CALLVALUE/CALLDATASIZE.Also adds a Security Considerations subsection stating the honest boundary: the canonical paymaster protects the mempool from the sponsor, not the sponsor from key compromise beyond the delay window.