noir-lang / noir

Noir is a domain specific language for zero knowledge proofs
https://noir-lang.org
Apache License 2.0
895 stars 199 forks source link

Input to brillig function is in a separate subgraph to output #6536

Closed signorecello closed 2 hours ago

signorecello commented 3 hours ago

Aim

Trying to use the plume library

Expected Behavior

I expect it to work normally

Bug

I get an error:

bug: Input to brillig function is in a separate subgraph to output
    ┌─ /Users/zpedro/nargo/github.com/noir-lang/noir-bignumv0.4.1/src/fns/constrained_ops.nr:302:43
    │
302 │     let (result, borrow_flags) = unsafe { __neg_with_flags(params, val) };
    │                                           ----------------------------- There is no path from the output of this brillig call to either return values or inputs of the circuit, which creates an independent subgraph. This is quite likely a soundness vulnerability

To Reproduce

  1. Start a new project
  2. Import and use the PLUME library
  3. Compile without the --silence-warnings flag

Workaround

Yes

Workaround Description

Using --silence-warnings makes it go away

Additional Context

No response

Project Impact

None

Blocker Context

No response

Nargo Version

No response

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

TomAFrench commented 2 hours ago

Either duplicate of https://github.com/noir-lang/noir/issues/5518 or it's a bug in the library.