Skip to content

Update EIP-8282: Sync specification with sys-asm@83f9801 - #1

Draft
Th0rgal wants to merge 1 commit into
eip-8282-cleanupfrom
eip-8282-sys-asm-sync
Draft

Update EIP-8282: Sync specification with sys-asm@83f9801#1
Th0rgal wants to merge 1 commit into
eip-8282-cleanupfrom
eip-8282-sys-asm-sync

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Aug 6, 2026

Copy link
Copy Markdown
Member

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_INHIBITOR constant: Define EXCESS_INHIBITOR = 2**256 - 1 as the sentinel value written to the excess slot to inhibit non-system calls.
  • Constructor behavior: Specify that the deposit constructor leaves all storage at zero (write path active from deployment, pre-fork deposits accepted), while the exit constructor initializes stored_excess to EXCESS_INHIBITOR (non-system calls inhibited until cleared).
  • count definition: Define count as the number of successful submissions since the last system call, stored in SLOT_COUNT and reset to zero by the system call.
  • effective_excess formula: Specify effective_excess = stored_excess + max(0, count - TARGET_REQUESTS_PER_BLOCK), with count read before incrementing for the current request.
  • System transition: Specify the full ordered transition: (1) always dequeue first; (2) non-empty calldata sets the inhibitor; (3) empty call clears an existing inhibitor to zero, otherwise stores max(0, old_excess + count - target); (4) always reset count.
  • Reversible inhibition: Replace "permanently disabled" and "disable the queue" with precise reversible inhibition of non-system calls.
  • Endianness clarification: Clarify that the deposit LOG0 emits the amount big-endian as submitted, while the system output converts it to little-endian.
  • Reference links: Update both links to sys-asm@83f9801 and fix the builder_exits label (was duplicated as builder_deposits).
  • requires: Add EIP-7997 to requires (the CREATE2 factory used for deployment).

Open questions

  1. 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.

  2. Multi-block pre-fork count accumulation: Because the deposit contract starts with count = 0 and the write path is active from deployment, the count can 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.

@github-actions github-actions Bot added the w-ci label Aug 6, 2026
@Th0rgal
Th0rgal force-pushed the eip-8282-sys-asm-sync branch from b28dac6 to 64a1d31 Compare August 6, 2026 16:01
Comment thread EIPS/eip-8282.md Outdated
| `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 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this constant doesn't exist on the EIP-8282 contracts

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

- Define INHIBITOR = 2**256 - 1 constant (renamed from EXCESS_INHIBITOR
  to match the source-level macro in sys-asm@83f9801)
- Define storage layout: slot 0 stored_excess, slot 1 count,
  slot 2 queue_head, slot 3 queue_tail, slot 4+ queued records
- Specify the ordered system-call transition:
  1. dequeue (construct request_data, advance head; full drain resets
     both head and tail, dequeued slots not cleared)
  2. non-empty calldata sets stored_excess to INHIBITOR
  3. empty calldata clears INHIBITOR to zero if set, otherwise
     updates stored_excess to max(0, stored_excess + count - target)
  4. reset count to zero
  5. return request_data
- Specify that the inhibition check gates all non-system calls before
  dispatch (write path and fee getter)
- Define effective_excess = stored_excess + max(0, count - target)
- Specify the deposit LOG0 emits the 184-byte input verbatim
  (amount big-endian in both queue storage and log)
- Add Contract upgrade subsection explaining the rationale for the
  reversible inhibition: a future predeploy upgrade can deploy a
  new contract, continue draining the old one through empty-calldata
  system calls, and reject new requests on the old contract by sending
  non-empty calldata (setting INHIBITOR)
- Add EIP-7997 to requires (the CREATE2 factory used for deployment)
- Update reference links to sys-asm@83f9801
- Open question ethereum#2 (pre-fork count accumulation): noted as confirmed
  intentional per Felix (2026-08-12) — he confirmed the inhibition
  and drain-while-inhibited behaviors, which together imply the
  multi-block count accumulation is also intended
@Th0rgal
Th0rgal force-pushed the eip-8282-sys-asm-sync branch from 64a1d31 to b759aae Compare August 13, 2026 10:04
@github-actions

Copy link
Copy Markdown

The commit b759aae (as a parent of 771e39e) contains errors.
Please inspect the Run Summary for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants