Add EIP-8282 builder deposit and exit contracts - #43
Conversation
…erdam) Bake both EIP-8282 builder execution request predeploys into the EL genesis, gated on GLOAS_FORK_EPOCH, mirroring how EIP-7002/7251 are gated on Electra. - system-contracts.yaml: add eip8282_deposit (request type 0x03, 568-byte runtime) and eip8282_exit (request type 0x04, 396-byte runtime). Both assembled with geas from ethereum/sys-asm#43, balance 0, nonce 1, storage slot 0 = excess inhibitor 0xff..ff. - generate_genesis.sh: add a GLOAS_FORK_EPOCH gate in genesis_add_system_contracts() allocating both contracts. Addresses are the Nick's-method keyless-deployment (vanity) addresses for each init code, following the …007002 / …007251 convention: deposit 0x0000884d2AA32eAa155F59A2f24eFa73D9008282 exit 0x000014574A74c805590AFF9499fc7A690f008282 Note: the contracts are still in proposal (sys-asm#43, open PR), so addresses/code may change before finalization. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…erdam) (#297) ## What Bake both **EIP-8282 builder execution request** predeploys into the EL genesis as system contracts, gated on `GLOAS_FORK_EPOCH` — mirroring how EIP-7002/7251 are gated on Electra. | Contract | Req type | Address | Runtime | |---|---|---|---| | Builder **deposit** | `0x03` | `0x0000884d2AA32eAa155F59A2f24eFa73D9008282` | 568 B | | Builder **exit** | `0x04` | `0x000014574A74c805590AFF9499fc7A690f008282` | 396 B | ## Changes - **`apps/el-gen/system-contracts.yaml`** — `eip8282_deposit` + `eip8282_exit` allocations: `balance: 0`, `nonce: 1`, runtime assembled with [geas](https://github.com/fjl/geas) from [`ethereum/sys-asm#43`](ethereum/sys-asm#43), storage slot `0` = excess inhibitor (`0xff…ff`). - **`apps/el-gen/generate_genesis.sh`** — a `GLOAS_FORK_EPOCH` gate in `genesis_add_system_contracts()` allocating both (same shape as the Electra block). ## Address rationale Both addresses are the Nick's-method keyless-deployment (vanity) addresses for each init code, following the `…007002` / `…007251` convention. For a genesis predeploy we hand-place runtime + storage, so no deployment tx is needed — only the canonical address. ## Notes - The contracts are still a **proposal** (sys-asm#43, an open PR), so addresses/code may change before finalization; revisit when it lands on `ethereum/sys-asm` main. - Validated locally: YAML parses, `jq '.eip8282_deposit'` / `.eip8282_exit` resolve, `bash -n` clean. Full genesis generation should be exercised by CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Barnabas Busa <21987084+barnabasbusa@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
I've pushed some cosmetic updates to bring the formatting in line with what has just been committed to the main branch. |
|
Do we still want to change these new contracts to update the fee for every new request? |
I didn't do it, was personally too risk-averse to modify the contract much beyond the existing contracts. |
does it make it much more difficult to calculate the fee per tx for tooling? I guess an argument to keep the existing fee is that existing tooling would be easier to adopt for the builder contracts |
| #define TARGET_PER_BLOCK = 32 | ||
| #define MAX_PER_BLOCK = 256 |
There was a problem hiding this comment.
I think we should use lower values here as it would allow us to reduce MIN_BUILDER_WITHDRAWABILITY_DELAY on the consensus layer which improves builder ux and potentially capital efficiency (making it more likely they use trustless payments), having TARGET_PER_BLOCK >= MAX_WITHDRAWALS_PER_PAYLOAD - 1 is a missed opportunity as with a lower value, we can use the fee increase to prevent any kind of validator sweep dos attacks as mentioned here ethereum/consensus-specs#4869 and not rely on locked up capital hence allowing us to lower the withdrawability delay
my suggestion would be
| #define TARGET_PER_BLOCK = 32 | |
| #define MAX_PER_BLOCK = 256 | |
| #define TARGET_PER_BLOCK = 8 | |
| #define MAX_PER_BLOCK = 64 |
|
I have updated the PR again to migrate it over to the new build pipeline (#46) and added the bytecode files. |
Port the two EIP-8282 builder request predeploys: the builder deposit contract (request type 0x03, serves first deposits and top-ups) and the builder exit contract (request type 0x04). Both are line-level derivatives of the EIP-7002/7251 request contracts, reusing the shared fee mechanism, queue, and system subroutine. Add Foundry suites in the repo's house style (shared Test base, geas-ffi, computeFee/assertExcess), a slice() test helper, and an EIP-8282 reference in the README.
|
Just going to merge this now. We can iterate on the contracts further in subsequent PRs. |
Port the two EIP-8282 builder request predeploys: the builder deposit contract (request type 0x03, serves first deposits and top-ups) and the builder exit contract (request type 0x04). Both are line-level derivatives of the EIP-7002/7251 request contracts, reusing the shared fee mechanism, queue, and system subroutine.