-
Notifications
You must be signed in to change notification settings - Fork 219
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
codegen and proving fails on oob mem access with 10+ depth tree for compute_merkle_root #2667
Comments
Thanks for creating the issue!
Just to clarify, were you generating the Solidity verifier with (Or was the "wasm build" referring to the WASM-based Nargo releases?) Would be very helpful if you could link to a code snippet for reproducing the issue too! 🙌 |
I am using The code is simply any circuit with a |
Thanks! To confirm |
With the #4960 initiative, If the Issue here exists still with latest Barretenberg versions, creating an Issue on https://github.com/AztecProtocol/barretenberg is recommended 🤝 thanks! |
I believe at some point a few versions ago this issue was resolved. :) |
Aim
I am attempting to compute the root for a large merkle tree. Ideally, for near-arbitrary depths (2^32 or more). This needs to be done in-circuit.
Expected Behavior
A solidity verifier should be generated. The circuit should be provable with nargo, bb.js, or whatever library ends up being used in browsers.
Bug
When trying to generate a solidity verifier or proof using a circuit that runs
compute_merkle_root
and takes a hash_path for a tree that is too deep (in this case 10+ levels), it fails with the above error.Since
compute_merkle_root
just does a bunch of pedersen hashes, this issue seems to occur whenever you nest a large amount of loops. The gate count in my misbehaving circuit is sub-150k, so it is not a gate issue.I was told the issue is resolved in newer nargo builds, but not inside the wasm proving build. I explicitly need this to work inside a browser for production, which means it has to run inside the wasm build.
To Reproduce
Installation Method
None
Nargo Version
nargo 0.10.3 (git version hash: 2db759f, is dirty: false)
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: