forked from olehmisar/vlayer-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
When we attempt to convert field element to U256 with u256::from(field). We will get the following error when running
nargo compile --package is_ape_owner --deny-warnings --skip-brillig-constraints-check
bug: Input to Brillig function is in a separate subgraph to output
┌─ /Users/jli/nargo/github.com/noir-lang/noir-bignum/v0.8.3/src/fns/constrained_ops.nr:490:18
│
490 │ unsafe { __validate_gte_with_flags(lhs, rhs) };
│ ----------------------------------- 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
│
I created a customized field conversion function to avoid this error temporarily.
fn field_to_u256(f: Field) -> U256 {
let bytes = f.to_be_bytes();
from(bytes)
}
Metadata
Metadata
Assignees
Labels
No labels