Skip to content

glamsterdam devnet 6#746

Open
pk910 wants to merge 4 commits into
masterfrom
glamsterdam-devnet-6
Open

glamsterdam devnet 6#746
pk910 wants to merge 4 commits into
masterfrom
glamsterdam-devnet-6

Conversation

@pk910

@pk910 pk910 commented Jun 17, 2026

Copy link
Copy Markdown
Member

Glamsterdam devnet-6 readiness: decoupled builder deposits & exits (EIP-8282)

Summary

Glamsterdam devnet-6 decouples builder deposits and exits from validator
deposits and voluntary exits. Builder onboarding and offboarding now flow through
two dedicated EL system contracts and two new execution-request types, instead of
piggybacking on the regular deposit contract (0x03 credentials) and voluntary
exits.

This PR makes Dora ready for that change end-to-end: the consensus state
transition, EL contract indexing, database schema, and the web UI all understand
the new request types.

Spec references

  • EIP: EIP-8282
  • Consensus: consensus-specs PR #5359 (EIP-8282)
  • Types: go-eth2-client bumped to v0.1.4-0.20260617135310-2e8b958
    (go-eth2-client PR #30) — adds
    gloas.BuilderDepositRequest, gloas.BuilderExitRequest, and a unified
    all.ExecutionRequests carrying BuilderDeposits / BuilderExits.

Behaviour changes for Gloas

  • Builder deposits arrive via a dedicated contract and are processed by the new
    process_builder_deposit_request (registers a new builder if the proof-of-possession
    is valid under the new DOMAIN_BUILDER_DEPOSIT, otherwise tops up the existing builder).
  • Builder exits arrive via a dedicated contract and are processed by the new
    process_builder_exit_request (source-address authenticated, requires an active
    builder with no pending withdrawals, then initiates the builder exit).
  • Regular deposit contract: post-Gloas, a 0x03-credential deposit via the regular
    deposit contract is no longer diverted to the builder registry — it is queued as an
    ordinary validator pending deposit (the pre-fork 0x03 route was an onboarding hack
    only).
  • Voluntary exits: builders can no longer exit via voluntary exits; the builder
    branch is gone from both the state transition and the UI.

New system contracts

Contract Address Dequeue rate
Builder deposit 0x0000884d2AA32eAa155F59A2f24eFa73D9008282 256 / payload
Builder exit 0x000014574A74c805590AFF9499fc7A690f008282 16 / payload

Defaults live in clients/execution/chainstate.go; they can be overridden via the
node's eth_config system-contract map (BUILDER_DEPOSIT_REQUEST_PREDEPLOY_ADDRESS
/ BUILDER_EXIT_REQUEST_PREDEPLOY_ADDRESS). New config knob
executionapi.gloasDeployBlock controls where the contract log crawl starts.

What changed

State transition (indexer/beacon/statetransition/)

  • applyExecutionRequests now processes builder_deposits then builder_exits
    (after consolidations), matching the spec for_ops order in
    apply_parent_execution_payload.
  • Added processBuilderDepositRequest, processBuilderExitRequest,
    isActiveBuilder, getPendingBalanceToWithdrawForBuilder, initiateBuilderExit.
  • Removed the builder branch from processDepositRequest (now a plain validator queue).
  • depositsig.BuilderDomain implements compute_domain(DOMAIN_BUILDER_DEPOSIT).

EL contract indexers (indexer/execution/system_contracts/)

  • New builder_deposit_indexer.go and builder_exit_indexer.go, modeled on the
    withdrawal/consolidation indexers (contract crawler + dequeue-block tx matcher),
    registered in services/chainservice.go.
  • Log layouts parsed: deposit = pubkey(48) ++ wc(32) ++ amount(8) ++ signature(96)
    (no sender prefix; tx sender taken from the tx); exit = sender(20) ++ pubkey(48).

Database (db/, migration 20260617140000_builder-requests.sql)

  • Full two-table pattern per type (CL request table + EL request-tx table), mirroring
    consolidations: builder_deposits / builder_deposit_request_txs, builder_exits
    / builder_exit_request_txs, with CRUD, filters, and dbtypes.
  • Migration provided for both sqlite and pgsql.

Indexing / aggregation (indexer/beacon/writedb.go)

  • Builder deposit/exit request rows are built from each block's processed
    (parent-payload) execution requests and persisted.
  • Builder deposits are counted toward the combined deposit count and builder exits
    toward the combined exit count in both per-slot and per-epoch aggregations.
  • Deposit-queue index matching (services/chainservice_deposits.go): removed the now-stale
    builder-deposit exceptions. The previous logic assumed post-Gloas 0x03 deposits were
    diverted out of the pending-deposit queue (leaving index gaps to skip and skipping them as
    queue anchors). Under EIP-8282 a 0x03 deposit via the regular contract enters the queue
    like any validator deposit, and real builder deposits never appear in the regular deposit
    stream — so the EL deposit index sequence is contiguous with the queue again. Reverted to a
    clean contiguous backward-count; added a table-driven regression test.

Web UI

  • New top-level Builders menu group (Gloas-gated): Builders List (existing page,
    regrouped), Builder Deposits (/builders/deposits), Builder Exits
    (/builders/exits). The list pages merge unfinalized (cache) + finalized (DB) data
    and pair each request with its matching EL transaction.
  • Slot detail page: all execution-request types are consolidated into a single
    Execution Requests tab that renders one table per non-empty type (deposit /
    withdrawal / consolidation / builder deposit / builder exit), skipping empty types.
    The header notes the requests come from the parent payload (EIP-7732).
  • The builder entity option and builder-index-flag handling were removed from the
    voluntary-exits page.

Validation

  • go build ./..., go vet ./..., and golangci-lint run --new-from-rev=origin/master
    are clean.
  • Unit tests pass; the embedded sqlite schema applies cleanly and the four new tables
    are queryable; templates parse without errors.

To verify on devnet-6

  1. State-root replay via cmd/statetransition-test against devnet-6 — the
    authoritative correctness check for the new request processing.
  2. Builder deposit log amount endianness — parsed big-endian to match the
    7002/7251 system contracts; confirm against the deployed builder deposit contract.
  3. System-contract config keys — the indexers fall back to the hardcoded default
    addresses above if the node serves different eth_config keys.

@pk910 pk910 added the build-docker-image Automatically build docker image for PR branch label Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-docker-image Automatically build docker image for PR branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants