-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Aim
Summary
Upgrading from noir-bignum v0.7.3 to v0.7.5 causes a large number of errors relating to missing trait implementations and unresolved functions/methods for types such as U256 and BN254_Fq. Version v0.7.3 works as expected, but v0.7.5 does not, despite there being no breaking changes listed in the changelog for v0.7.4 or v0.7.5.
Reproduction Steps
- In your project, set the dependency:
bignum = { tag = "v0.7.5", git = "https://github.com/noir-lang/noir-bignum" }
- Attempt to build or run tests.
- Observe a large number of errors such as:
No matching impl found for U256: BigNum<N = _, MOD_BITS = _>Could not resolve 'from_limbs' in pathNo method named 'udiv_mod' found for type 'U256'Type must be known by this point to know which method to call
Reverting to v0.7.3 resolves all these errors.
Changelog Context
- v0.7.5 changelog states: "Let the bignum module be public (fix: let the bignum module be public #192)"
- v0.7.4: "Expose bignum trait derivation macro" and minor bugfixes
- No mention of breaking changes or removed APIs.
Expected Behavior
- v0.7.5 should be a non-breaking upgrade from v0.7.3 according to the changelog.
- All previously available types, methods, and trait impls should remain accessible.
Bug
Sample error output:
error: No matching impl found for `U256: BigNum<N = _, MOD_BITS = _>`
┌─ /path/to/noir-bignum/v0.7.5/src/tests/bignum_test.nr:508:5
│
508 │ test_mul::<3, U256>();
│ ------------------- No impl for `U256: BigNum<N = _, MOD_BITS = _>`
...
error: Could not resolve 'from_limbs' in path
┌─ /path/to/noir-bignum/v0.7.5/src/tests/bignum_test.nr:543:19
│
543 │ let a = U256::from_limbs([
│ ----------
...
error: No method named 'udiv_mod' found for type 'U256'
┌─ /path/to/noir-bignum/v0.7.5/src/tests/bignum_test.nr:561:12
│
561 │ assert(_1.udiv_mod(_1 + _1) == (_0, _1));
│ --------------------
...
Aborting due to 321 previous errors
Reverting to v0.7.3 resolves all these errors.
To Reproduce
-
Set your dependency in your project to:
bignum = { tag = "v0.7.5", git = "https://github.com/noir-lang/noir-bignum" }
-
Build your project or run tests.
-
Observe a large number of errors about missing trait impls and unresolved methods/functions for types like
U256andBN254_Fq. -
Change the tag to
v0.7.3and see that all builds and tests succeed.
Workaround
Yes
Workaround Description
Downgrade to v0.7.3:
bignum = { tag = "v0.7.3", git = "https://github.com/noir-lang/noir-bignum" }This version works without the errors encountered in v0.7.5.
Additional Context
No response
Project Impact
Blocker
Blocker Context
No response
Nargo Version
nargo version = 1.0.0-beta.6 noirc version = 1.0.0-beta.6+e796dfd67726cbc28eb9991782533b211025928d (git version hash: e796dfd67726cbc28eb9991782533b211025928d, is dirty: false)
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
N/A