Skip to content

Commit

Permalink
Fix fork logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalinin committed Oct 2, 2024
1 parent 4ee4105 commit a04e4c3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions specs/electra/fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,13 @@ def upgrade_to_electra(pre: deneb.BeaconState) -> BeaconState:
validator = post.validators[index]
validator.effective_balance = 0
validator.activation_eligibility_epoch = FAR_FUTURE_EPOCH
post.pending_balance_deposits.append(
PendingBalanceDeposit(index=index, amount=balance)
)
post.pending_deposits.append(PendingDeposit(
pubkey=validator.pubkey,
withdrawal_credentials=validator.withdrawal_credentials,
amount=balance,
signature=bls.G2_POINT_AT_INFINITY,
slot=GENESIS_SLOT,
))

# Ensure early adopters of compounding credentials go through the activation churn
for index, validator in enumerate(post.validators):
Expand Down

0 comments on commit a04e4c3

Please sign in to comment.