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

noir.js cannot prove on input a circuit of size 2^19 #5106

Closed
codygunton opened this issue May 24, 2024 · 2 comments
Closed

noir.js cannot prove on input a circuit of size 2^19 #5106

codygunton opened this issue May 24, 2024 · 2 comments
Labels
backend Proving backends bug Something isn't working js Noir's JavaScript packages

Comments

@codygunton
Copy link
Collaborator

This was uncovered by AztecProtocol/aztec-packages#6391, which pushed the size of the UltraPlonk verifier circuit to size 2^19. The failure is that the prover runs out of memory while creating the proving key. It was subsequently verified that proving fails for other circuits of size 2^19 (e.g., the test program called hashmap) while it succeeds for a circuit of size 2^18 (the test program ecdsa_secp256r1_3x).

@codygunton codygunton added the js Noir's JavaScript packages label May 24, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir May 24, 2024
codygunton added a commit to AztecProtocol/aztec-packages that referenced this issue May 25, 2024
This PR introdues a stdlib boolean flag into biggroup to track whether
an element is the point at infinity. This is uses to handle edge cases
around the point at infinity in biggroup operations. We now correctly
handle points at infinity under addition and subtraction. The
`batch_mul` method correctly handles points at infinity (at least in
three tested cases) under the Mega arithmetization (though this is not
all that meaningful without a full Goblin proof!). The `wnaf_batch_mul`
method correctly handles points at infinity (at least in three tested
cases) under the Ultra arithmetization, which is the only
arithmetization for which it's implemented.

The PR adds constraints that increase the cost of biggroup operations.
This cases the UltraPlonk recursive verifier circuit size to grow,
crossing a power-of-two boundary. This means that we can no longer
execute two UltraPlonk recursive verifications in WASM due to an
out-of-memory error during provcing key creation. (cf the
`double_verify_proof` tests; note that `double_verify_nested_proof` was
already not available in WASM). Moreover, the PR exposed that noir.js is
not capable of executing proof construction for a circuit of size
$2^{19}$. In response to these two issues, we have disabled tests. We
did this in consulation with @TomAFrench and @vezenovm. 
Related issues:
noir-lang/noir#5106,
#6672.

---------

Co-authored-by: codygunton <codygunton@gmail.com>
AztecBot pushed a commit to AztecProtocol/barretenberg that referenced this issue May 26, 2024
This PR introdues a stdlib boolean flag into biggroup to track whether
an element is the point at infinity. This is uses to handle edge cases
around the point at infinity in biggroup operations. We now correctly
handle points at infinity under addition and subtraction. The
`batch_mul` method correctly handles points at infinity (at least in
three tested cases) under the Mega arithmetization (though this is not
all that meaningful without a full Goblin proof!). The `wnaf_batch_mul`
method correctly handles points at infinity (at least in three tested
cases) under the Ultra arithmetization, which is the only
arithmetization for which it's implemented.

The PR adds constraints that increase the cost of biggroup operations.
This cases the UltraPlonk recursive verifier circuit size to grow,
crossing a power-of-two boundary. This means that we can no longer
execute two UltraPlonk recursive verifications in WASM due to an
out-of-memory error during provcing key creation. (cf the
`double_verify_proof` tests; note that `double_verify_nested_proof` was
already not available in WASM). Moreover, the PR exposed that noir.js is
not capable of executing proof construction for a circuit of size
$2^{19}$. In response to these two issues, we have disabled tests. We
did this in consulation with @TomAFrench and @vezenovm. 
Related issues:
noir-lang/noir#5106,
AztecProtocol/aztec-packages#6672.

---------

Co-authored-by: codygunton <codygunton@gmail.com>
@Savio-Sou Savio-Sou added bug Something isn't working backend Proving backends labels May 27, 2024
@Savio-Sou
Copy link
Collaborator

Was this happening with NoirJS specifically? As in bb.js works, but not when going through NoirJS?

@TomAFrench
Copy link
Member

Closing as this is a BB.js concern

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Proving backends bug Something isn't working js Noir's JavaScript packages
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants