-
Notifications
You must be signed in to change notification settings - Fork 429
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
Creates validator wallet through Staker's DataPoster #2573
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2638208
to
03d9e56
Compare
50f2d51
to
04e3f12
Compare
PlasmaPower
requested changes
Aug 30, 2024
PlasmaPower
reviewed
Sep 2, 2024
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.
One last comment but largely LGTM
PlasmaPower
reviewed
Sep 2, 2024
…oster to create validator wallet contract
PlasmaPower
approved these changes
Sep 2, 2024
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.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
design-approved
s
Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves NIT-2665
Creates validator wallet through Staker's DataPoster.
DataPoster infers the expected nonce to be used in a transaction by first looking into a QueueStorage object, that is mainly updated when transactions are submitted through DataPoster.PostTransaction.
If this first step fails, such as when the QueueStorage object is empty, then it relies on recent data from L1 to make this inference.
Information retrieved from L1 can be outdated, so warnings such as
sequencer-1 | WARN [07-08|18:52:20.052] error acting as staker err="storage race error: data poster expected next transaction to have nonce 0 but was requested to post transaction with nonce 1"
can be logged.The Staker DataPoster's key is used to send a transaction to create a validator wallet.
But today this transaction is not sent through DataPoster.PostTransaction, so the QueueStorage object owned by Staker's DataPoster is not updated, and then the inference of the expected nonce is compromised.
This PR makes the validator wallet creation to occur through the Staker's DataPoster.