Skip to content

Conversation

@matthias-wright
Copy link
Collaborator

This updates the execution request handling in the finalizer to uphold the following invariants:

  • A validator will join the committee VALIDATOR_NUM_WARM_UP_EPOCHS epochs after submitting a valid deposit request. The phase after submitting the deposit request, and before joining the committee is called the onboarding phase.
  • If a withdrawal request is submitted in epoch n, then the validator will be removed from the committee at the end of epoch n. The withdrawal will be processed in epoch n + VALIDATOR_WITHDRAWAL_NUM_EPOCHS.
  • A validator can only submit one withdrawal request at a time. If another withdrawal request is submitted, while a withdrawal request is pending, then the second withdrawal request will be ignored.
  • If a withdrawal request is submitted while a validator is in the onboarding phase, then the onboarding phase is aborted, and the withdrawal request will be processed VALIDATOR_WITHDRAWAL_NUM_EPOCHS epochs later.
  • No partial withdrawals. If the validator balance is balance, and a withdrawal request with amount amount < balance is submitted, then the withdrawal request will be processed for the amount of balance.
  • A validator can only have a balance of VALIDATOR_MINIMUM_STAKE. If a deposit request with amount is submitted, where amount != VALIDATOR_MINIMUM_STAKE, then the deposit request will be skipped, and a withdrawal request will be initiated immediately.
  • No top up deposits. If a validator already has a balance of VALIDATOR_MINIMUM_STAKE, then it cannot submit another deposit request with amount VALIDATOR_MINIMUM_STAKE.

Additionally, this adds joining validators to the p2p network early. When a validator stakes in epoch n, they will join the committee in epoch n + VALIDATOR_NUM_WARM_UP_EPOCHS. However, they will now be added to the p2p network in epoch n + 1. This allows them to sync blocks and catch up their state, without actively participating in consensus.

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.

2 participants