Skip to content
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

Add missing nonce updates to NodeOperatorsRegistry #715

Merged

Conversation

Psirex
Copy link
Contributor

@Psirex Psirex commented Mar 28, 2023

According to requirements from the IStakingModule.getNonce() method, its return value must update each time the deposit data set is changed. This requirement was violated in the following methods:

  • updateStuckValidatorsCount()
  • updateExitedValidatorsCount()
  • unsafeUpdateValidatorsCount()
  • updateTargetValidatorsLimits()
  • clearNodeOperatorPenalty()

@@ -174,4 +174,9 @@ function normalizeArg(arg) {
return arg
}

function stringify(obj) {
// Helps overcome the problem with BigInt serialization. Details: https://github.com/GoogleChromeLabs/jsbi/issues/30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@TheDZhon TheDZhon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Minorish thing: it looks like we update nonces in a rather pessimistic way (without checking whether the ready-to-deposit number actually changes). Though, it's more bullet-proof and maintainable, yeah.

@TheDZhon TheDZhon merged commit 92a0dea into fix/shapella-upgrade-from-rc0-to-rc1 Mar 30, 2023
@TheDZhon TheDZhon deleted the fix/missing-nonce-updates branch March 30, 2023 16:33
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