Update EIP-8282: Sync specification with sys-asm@83f9801 - #1
Conversation
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
b28dac6 to
64a1d31
Compare
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
| | `TARGET_EXIT_REQUESTS_PER_BLOCK` | `2` | Per-block request count above which the fee rises for the exit contract | | ||
| | `MIN_REQUEST_FEE` | `1` | Minimum request fee, in wei | | ||
| | `REQUEST_FEE_UPDATE_FRACTION` | `17` | Controls the fee's rate of change | | ||
| | `EXCESS_INHIBITOR` | `2**256 - 1` | Sentinel value written to the excess slot to inhibit non-system calls | |
There was a problem hiding this comment.
this constant doesn't exist on the EIP-8282 contracts
There was a problem hiding this comment.
Hey, we could rename to INHIBITOR if you'd rather have it match the source verbatim, but I chose the EXCESS_ prefix because I thought it made the spec-side slot semantics easier to understand (since it's the excess slot that is being inhibited). Note that it is the same kind of thing with other names in the constants table: MAX_DEPOSIT_REQUESTS_PER_BLOCK = 64 doesn't exist in the source either, it's just push 64 at src/builder_deposits/main.eas:195. Same for REQUEST_FEE_UPDATE_FRACTION = 17 (push 17) and BUILDER_MIN_DEPOSIT = 1000000000000000000 (push 1000000000000000000).
The value (1 << 256) - 1 is in the audited bytecode: sys-asm defines it as #define INHIBITOR = (1 << 256) - 1 in both src/builder_deposits/main.eas:31 and src/builder_exits/main.eas:32, and the exit constructor writes it inline (src/builder_exits/ctor.eas:7, comment: "Store 0xff..ff as a temporary excess value to avoid requests being queued before the fork"). Happy to do whichever you prefer.
There was a problem hiding this comment.
using EXCESS_INHIBITOR is confusing since this exists in other contracts in that repo is different, but I am not an expert on the contrats tbh, so it would be better to open a PR on the main repo, it would be best to get feedback from Felix on this
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
…sent-topic halts Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
…dation Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
…indow, slim spec Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
…or allowlist) Merged by EIP-Bot.
64a1d31 to
b759aae
Compare
|
The commit b759aae (as a parent of 771e39e) contains errors. |
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
ethereum#12062) * wip * nits * more nits * simplify rationale * nit * Apply suggestions from code review Co-authored-by: Jochem Brouwer <jochembrouwer96@gmail.com> * 8141: put fees and gas limits in nested lists * 8141: gas_used should be sum of execution and state gas used * 8141: put gas used counts in frame reciept as a list * 8141: receipt on the wire should match protocol format --------- Co-authored-by: Jochem Brouwer <jochembrouwer96@gmail.com>
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
…rame.value gas (ethereum#12026) 8141: note that signature validation does not affect precompile inclusion in BAL Co-authored-by: lightclient <lightclient@protonmail.com>
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
Merged by EIP-Bot.
…rames (ethereum#12109) * Update EIP-8141: atomic-batch unroll rolls back the approval context * Update EIP-8141: statically disallow approval scope on atomic-batch frames Replace the atomic-batch approval-context rollback with a static constraint: approval scope flags must be zero on every frame of an atomic batch, including its terminating frame. Since APPROVE requires its scope in frame.flags, the approval context cannot change inside a batch, so unrolling never involves the nonce increment or max_cost collection, and validity does not depend on the batch outcome. The frame-revert rule is kept: an inner call from the resolved target can APPROVE and the enclosing frame can still revert, so the approval context must be discarded with that frame's state changes. Tie the payer refund to the final value of payer, since a discarded approval means more than one resolved_target may have called APPROVE. * Trim the atomic-batch constraint comment * 8141: clean up some more * 8141: nit * 8141: revert text about payer refund --------- Co-authored-by: Marc Harvey-Hill <10379486+Marchhill@users.noreply.github.com> Co-authored-by: lightclient <lightclient@protonmail.com>
b759aae to
4b5f3f4
Compare
Stacked on top of ethereum#11869. This PR syncs the EIP-8282 specification text with the reference implementation at ethereum/sys-asm@83f9801.
Changes
EXCESS_INHIBITORconstant: DefineEXCESS_INHIBITOR = 2**256 - 1as the sentinel value written to the excess slot to inhibit non-system calls.stored_excesstoEXCESS_INHIBITOR(non-system calls inhibited until cleared).countdefinition: Definecountas the number of successful submissions since the last system call, stored inSLOT_COUNTand reset to zero by the system call.effective_excessformula: Specifyeffective_excess = stored_excess + max(0, count - TARGET_REQUESTS_PER_BLOCK), withcountread before incrementing for the current request.max(0, old_excess + count - target); (4) always reset count.builder_exitslabel (was duplicated asbuilder_deposits).requires: Add EIP-7997 torequires(the CREATE2 factory used for deployment).Open questions
Deployment in the activation block: This PR does not take a position on whether contract deployment in the activation block is valid. The specification currently says contracts MUST be deployed before the fork, but the exact validity of same-block deployment is left as an open question for reviewers.
Multi-block pre-fork count accumulation: Because the deposit contract starts with
count = 0and the write path is active from deployment, thecountcan accumulate across multiple pre-fork blocks without being reset (since no system calls occur pre-fork). Whether this behavior is intentional or should be addressed is left as an open question.