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

[FEATURE] Client being able to re-use nullifiers that aren't still in a block #1335

Open
RogerTaule opened this issue Dec 20, 2022 · 0 comments · May be fixed by #1370
Open

[FEATURE] Client being able to re-use nullifiers that aren't still in a block #1335

RogerTaule opened this issue Dec 20, 2022 · 0 comments · May be fixed by #1370
Assignees

Comments

@RogerTaule
Copy link
Contributor

RogerTaule commented Dec 20, 2022

Currently, users do not have any mechanism to create a new transaction that contains an already used nullifier that isn't still in a block. One of the main usages of this feature would be allowing clients to re-send a transaction with a higher fee.
In order to implement this, two changes are needed:

  • If the user provides the commitments (for either value or fee), we simply need to check in the code that the commitment is not already nullified on chain instead of checking isNullified. Note: If no commitments are provided, our default algorithm will never use nullified commitments. (This is already implemented)

  • Database will need to be modified so that it is consistent with what is happening. This means that don't want to store obsolete commitments nor transactions. Also, we need to keep in mind that, even if the client sends a new transaction using the same nullifier, he doesn't know which transaction will be the one that will get into the blockchain. The idea here is that the user will save the transaction when submitted rather than when a block is proposed. And then, when the block is proposed, will search for transactions that was using the same commitment / nullifier and delete from both, commitments and transactions db.

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