-
Notifications
You must be signed in to change notification settings - Fork 0
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 get-nonce endpoint #146
Conversation
I am not sure about that edge case. |
@koxu1996 after successful batch verification of a deposit the account trie will be updated by inserting an account. And that accounts nonce defaults to 0. Is that what you are referring to? |
I think synchronization here is just running get nonce in a loop. |
Not really. Every public key you could imagine like 0000..0000 is valid account, and nonce is just number of interactions with L2. Therefore I think that nonce returned for account that does not exist in trie should be 0. |
nixos/tests/end-to-end.nix
Outdated
# TODO we currently have to pass the nonce explicitly as we are lacking a way to synchronize | ||
# the successful creation of an account in the account trie after a deposit. | ||
# After adding the DA and awaiting that the server picked up the new deposit and thus | ||
# an according account was added to the trie, we can discard the nonce and get it from the server |
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.
Wait mechanism for deposit is necessary indeed, but it does not have to be done with DA.
Don't merge yet |
ready to merge |
See comment in the e2e why we cannot reliably test this yet