-
Notifications
You must be signed in to change notification settings - Fork 235
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
feat(public_executor): allow access to the commitment trees in public execution #794
Conversation
* @param leafValue - The value to search for. | ||
* @returns The index of the given leaf of undefined if not found. | ||
*/ | ||
findCommitmentIndex(leafValue: Buffer): Promise<bigint | undefined>; |
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.
How should we handle duplicate leafs? The first one you know have not been spent? Just thinking with the idea proposed around also putting L1 to L2 in the commitments tree, would be a pity if you keep fetching the wrong index and cannot spend the note because there was two insertions with "deposit 10 eth to A".
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.
My current idea is that if you have a transparent commitment then the nullifier's will need to be created with a different process. (Including the index) In the end to end test I was hoping to make a library that does this, but you are correct it does feel like a footgun.
Description
CommitmentsDB interface has been added to both executors, I have chosen not to completely unify their implementations as private goes through an aztec node while the public just accesses the merkle tree db directly.
How the executors were:
How they are after this pr:
I have altered the contexts for noir, both now have access to the roots
Checklist: