Skip to content

Instantly share code, notes, and snippets.

```python
def process_pending_balance_exits(state: BeaconState) -> None:
state.withdrawal_balance_to_consume += get_validator_churn_limit(state)
for pending_balance_withdrawal in state.pending_balance_withdrawals:
if pending_balance_withdrawal.withdrawable_epoch != FAR_FUTURE_EPOCH:
continue
validator = state.validators[pending_balance_withdrawal.index]
exiting_balance = Gwei(0)
@mkalinin
mkalinin / confirmation_rule.py
Last active February 24, 2025 04:36
Confirmation rule sketch
def is_one_confirmed(store, block_root) -> bool:
"""
Same logic as in the Confirmation Rule PR
"""
pass
def get_checkpoint_weight(store, checkpoint, checkpoint_state) -> Gwei:
"""
Uses LMD-GHOST votes to estimate FFG support for a checkpoint.