Skip to content

fix: restrict builder deposits to payload builders - #9621

Merged
nflaig merged 1 commit into
nc/alpha.12from
nc/restrict-builder-deposits-to-payload-builders
Jul 7, 2026
Merged

fix: restrict builder deposits to payload builders#9621
nflaig merged 1 commit into
nc/alpha.12from
nc/restrict-builder-deposits-to-payload-builders

Conversation

@nflaig

@nflaig nflaig commented Jul 7, 2026

Copy link
Copy Markdown
Member

see ethereum/consensus-specs#5439

Builder deposit requests are ignored unless the withdrawal credentials start with BUILDER_WITHDRAWAL_PREFIX. Accepted new builders are registered with PAYLOAD_BUILDER_VERSION.

Checks:

  • pnpm exec biome check packages/state-transition/src/block/processBuilderDepositRequest.ts packages/state-transition/test/unit/block/processBuilderDepositRequest.test.ts packages/state-transition/test/unit/block/processBuilderExitRequest.test.ts
  • pnpm --filter @lodestar/state-transition check-types

This PR was written primarily by Codex.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the builder deposit request processing to ignore deposits with unexpected withdrawal credential prefixes by validating them with isBuilderWithdrawalCredential. It also replaces the use of withdrawalCredentials[0] or BUILDER_WITHDRAWAL_PREFIX with PAYLOAD_BUILDER_VERSION when registering a builder or setting up test states. Corresponding unit tests have been added and updated to verify that both new builder requests and top-ups are dropped if they have invalid withdrawal credential prefixes. There are no review comments, so I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@nflaig
nflaig marked this pull request as ready for review July 7, 2026 21:42
@nflaig
nflaig requested a review from a team as a code owner July 7, 2026 21:42
@nflaig
nflaig merged commit b279fc8 into nc/alpha.12 Jul 7, 2026
14 of 16 checks passed
@nflaig
nflaig deleted the nc/restrict-builder-deposits-to-payload-builders branch July 7, 2026 21:51
nflaig added a commit that referenced this pull request Jul 7, 2026
see ethereum/consensus-specs#5439

Builder deposit requests are ignored unless the withdrawal credentials
start with `BUILDER_WITHDRAWAL_PREFIX`. Accepted new builders are
registered with `PAYLOAD_BUILDER_VERSION`.

Checks:
- `pnpm exec biome check
packages/state-transition/src/block/processBuilderDepositRequest.ts
packages/state-transition/test/unit/block/processBuilderDepositRequest.test.ts
packages/state-transition/test/unit/block/processBuilderExitRequest.test.ts`
- `pnpm --filter @lodestar/state-transition check-types`

> This PR was written primarily by Codex.
ensi321 pushed a commit that referenced this pull request Jul 21, 2026
see ethereum/consensus-specs#5439

Builder deposit requests are ignored unless the withdrawal credentials
start with `BUILDER_WITHDRAWAL_PREFIX`. Accepted new builders are
registered with `PAYLOAD_BUILDER_VERSION`.

Checks:
- `pnpm exec biome check
packages/state-transition/src/block/processBuilderDepositRequest.ts
packages/state-transition/test/unit/block/processBuilderDepositRequest.test.ts
packages/state-transition/test/unit/block/processBuilderExitRequest.test.ts`
- `pnpm --filter @lodestar/state-transition check-types`

> This PR was written primarily by Codex.
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.

1 participant