You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: rework execution requests and admit joining validators early to the p2p network (#85)
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.
Copy file name to clipboardExpand all lines: docs/staking-and-participating.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,3 +32,12 @@ As defined in EIP-7002, the calldata for this transaction is 56 bytes
32
32
Note that the validator pubkey is the ED25519 key (left-padded with zeros), and not the BLS key.
33
33
When depositing funds into the staking contract (see above), an Ethereum address was specified (withdrawal_credentials).
34
34
A valid withdrawal transaction has to be signed by the private key associated with this Ethereum address.
35
+
36
+
## Invariants
37
+
- 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`.
38
+
- 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`.
39
+
- 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.
40
+
- 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.
41
+
- 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`.
42
+
- 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.
43
+
- 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`.
0 commit comments