Skip to content

Add EIP-8282 builder deposit and exit contracts - #43

Merged
fjl merged 23 commits into
ethereum:mainfrom
wemeetagain:add-8282
Jun 27, 2026
Merged

fjl merged 23 commits into
ethereum:mainfrom
wemeetagain:add-8282

Conversation

@wemeetagain

@wemeetagain wemeetagain commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

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.

barnabasbusa added a commit to ethpandaops/ethereum-genesis-generator that referenced this pull request Jun 17, 2026
…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>
barnabasbusa added a commit to ethpandaops/ethereum-genesis-generator that referenced this pull request Jun 18, 2026
…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>
@fjl fjl changed the title feat: add EIP-8282 builder deposit and exit contracts Add EIP-8282 builder deposit and exit contracts Jun 22, 2026
@fjl

fjl commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

I've pushed some cosmetic updates to bring the formatting in line with what has just been committed to the main branch.

@fjl

fjl commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Do we still want to change these new contracts to update the fee for every new request?

@wemeetagain

Copy link
Copy Markdown
Contributor Author

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.
But I think its a good bugfix.

@nflaig

nflaig commented Jun 23, 2026

Copy link
Copy Markdown
Member

Do we still want to change these new contracts to update the fee for every new request?

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

Comment thread src/builder_deposits/main.eas Outdated
Comment thread src/builder_deposits/main.eas Outdated
Comment on lines +32 to +33
#define TARGET_PER_BLOCK = 32
#define MAX_PER_BLOCK = 256

@nflaig nflaig Jun 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Suggested change
#define TARGET_PER_BLOCK = 32
#define MAX_PER_BLOCK = 256
#define TARGET_PER_BLOCK = 8
#define MAX_PER_BLOCK = 64

@fjl

fjl commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

I have updated the PR again to migrate it over to the new build pipeline (#46) and added the bytecode files.

wemeetagain and others added 9 commits June 26, 2026 22:15
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.
@fjl

fjl commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Just going to merge this now. We can iterate on the contracts further in subsequent PRs.

@fjl
fjl merged commit 8b7e989 into ethereum:main Jun 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants