Closed marijanp closed 1 month ago
I am not sure about that edge case. nonce
is used to count number of interactions between user and L2, and deposit is not using it, since it is initiated on L1. Should not first transfer just use nonce=0
?
@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. The account is added to the trie as soon as the l1 even hits the l2 server. It does not wait until batch verification. The proof of the next batch contains the output of a matching deposit and then the pending deposit is complete.
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?
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.
Don't merge yet
ready to merge
See comment in the e2e why we cannot reliably test this yet