Skip to content

Conversation

@jtraglia
Copy link
Member

@jtraglia jtraglia commented Dec 13, 2025

This PR makes a new Builder type, tracked in state.builders.

Some key improvements:

  • The minimum builder balance is 1 ETH.
  • There is no activation queue for builders.
  • Top-up deposits are instant, as soon as they hit the CL.
  • Builders will not be able to perform partial withdrawals; only do full exits.
  • Builders must wait 4096 epochs (~18 days) to exit and cannot submit bids during this process.
  • Builders cannot be slashed nor penalized.
  • Builder payments do not go through the exit queue.
  • Builder indices are re-usable.

Note: This PR does not fully test everything. We can handle that in separate PRs.

@jtraglia jtraglia force-pushed the builders-no-updated-withdrawal-types branch from 2e93bc6 to f709f7d Compare December 15, 2025 18:49
jtraglia added a commit that referenced this pull request Dec 15, 2025
…4789)

I should have done this in the previous refactoring PR.

* Rename `get_sweep_withdrawals` to `get_validators_sweep_withdrawals`.
* Remove `validator_index` parameter from function.
* Update comments & variables to reflect this change.

If/when we merge #4788 which adds a builders sweep, this distinction
will be necessary.
@jtraglia jtraglia marked this pull request as ready for review December 15, 2025 21:09
@jtraglia jtraglia requested a review from jihoonsong December 15, 2025 21:09
pubkey: BLSPubkey
withdrawal_credentials: Bytes32
balance: Gwei
exit_epoch: Epoch
Copy link
Contributor

Choose a reason for hiding this comment

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

I think builder should also have a withdrawable_epoch. Once the exit_epoch is reached the builder becomes inactive, i.e. it cannot bid, and then until withdrawable_epoch the balance is frozen on the beacon chain. Without that freeze the DoS protection isn’t as strong as it can be

Copy link
Member Author

Choose a reason for hiding this comment

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

Right now, builders cannot submit bids after initiating their exit. So there is a freeze. I chatted with @fradamt about this some and he has some concerns with not allowing builders to submit bids during this period. So maybe we'll change it & add a withdrawable_epoch field.

# Verify that the builder has not initiated an exit
assert builder.exit_epoch == FAR_FUTURE_EPOCH

@jtraglia jtraglia changed the title Make builders non-validating staked actors (option 2) Make builders non-validating staked actors Dec 16, 2025
current_epoch = compute_epoch_at_slot(state.slot)
return not builder.slashed or current_epoch >= builder.withdrawable_epoch
```
def get_builder_withdrawals(
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if it is just me but I've found get_builder_withdrawals a bit confusing as it sounds like general withdrawals although it's actually builder payments. Perhaps we could use something like get_builder_payment_withdrawals.

This comment also applies to state.builder_pending_withdrawals as well. It's a pair of builder_pending_withdrawals and builder_pending_payments, but perhaps it's better to distinguish it via something like payment withdrawals as we now introduce sweep withdrawals for builders.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I also find this confusing. Let's rename this in a separate PR though.

@jtraglia jtraglia merged commit 601829f into master Jan 5, 2026
16 checks passed
@jtraglia jtraglia deleted the builders-no-updated-withdrawal-types branch January 5, 2026 17:04
github-merge-queue bot pushed a commit to OffchainLabs/prysm that referenced this pull request Jan 8, 2026
)

Gate the withdrawal sweep optimization (using min of validator count and
MaxValidatorsPerWithdrawalsSweep) behind a hidden feature flag that
defaults to false. Enable the flag for spectests to match consensus
spec.

The backported changes were from
[4788](ethereum/consensus-specs#4788)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
potuz added a commit to OffchainLabs/prysm that referenced this pull request Jan 8, 2026
)

Gate the withdrawal sweep optimization (using min of validator count and
MaxValidatorsPerWithdrawalsSweep) behind a hidden feature flag that
defaults to false. Enable the flag for spectests to match consensus
spec.

The backported changes were from
[4788](ethereum/consensus-specs#4788)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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.

10 participants