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

Don't increment nonces on accounts that are the fee payer #271

Closed
mitschabaude opened this issue Jul 1, 2022 · 2 comments · Fixed by #637
Closed

Don't increment nonces on accounts that are the fee payer #271

mitschabaude opened this issue Jul 1, 2022 · 2 comments · Fixed by #637
Assignees

Comments

@mitschabaude
Copy link
Member

This is an important fix because with some upcoming changes on the protocol side, transactions will likely fail (or partially fail, which is even worse) if a fee payer is present in the other parties and also increments its nonce in that other party.

Here's how we could handle creation of a signed Party:

  • see if there's a current transaction that has a fee payer
  • if yes, look if our new party is the same account
  • if yes, useFullCommitment. If no, incrementNonce

And here's how we should handle adding a fee payer to an existing transaction:
(this needs to happen in mina-signer as well! cc @MartinMinkov)

  • see if the fee payer account is already present in other parties
  • if yes, see if that other party increments its nonce
  • if yes, throw an error.
  • add the fee payer as usual

We also have to adapt the zkapp CLI, because in there we manually increment the nonce on the zkapp account which is also the fee payer. We should useFullCommitment instead.

@jasongitmail
Copy link
Contributor

jasongitmail commented Jul 11, 2022

  • Update SnarkyJS
  • Update Mina Signer
  • Update Mina zkApp CLI

@mitschabaude
Copy link
Member Author

I'm going to declare this closed with #637, which covers snarkyjs. In mina-signer, I think we can wait for the re-implementation instead of changing the old version

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 a pull request may close this issue.

2 participants