-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some issues in UpgradeToElectra
#14598
Conversation
UpgradeToElectra
UpgradeToElectra
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bunch of spec tests are failing after this change.
- TestMainnet_Electra_Transition
- TestMainnet_UpgradeToElectra
Are we sure it's the min? the spec looks max to me:
exit_epochs = [v.exit_epoch for v in pre.validators if v.exit_epoch != FAR_FUTURE_EPOCH]
if not exit_epochs:
exit_epochs = [get_current_epoch(pre)]
earliest_exit_epoch = max(exit_epochs) + 1
Ah yes, you're right. I misread that. My fault. Will revert that change now. |
ExitBalanceToConsume: helpers.ActivationExitChurnLimit(primitives.Gwei(tab)), | ||
ExitBalanceToConsume: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think this is right either. We should assign them to churn limit based on total active balances
post.exit_balance_to_consume = get_activation_exit_churn_limit(post)
post.consolidation_balance_to_consume = get_consolidation_churn_limit(post)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh. Once again you're right. I'm going to close this.
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
Primarily, this PR fixes some issues in
UpgradeToElectra
.The logic for calculatingearliestExitEpoch
wasn't quite right.It was finding the max exit epoch, not the minimum.I believe my changes should work as intended, though it still deviates from the spec.ExitBalanceToConsume
andConsolidationBalanceToConsume
should be set to 0.lwvi
are very readable.Also, some unrelated fixes:
ProcessSyncAggregate
alias.PendingDeposit
,Amount
was specified in the wrong order.Acknowledgements