Skip to content

v0.7.5 introduces missing trait impls, methods, and functions compared to v0.7.3 #194

@cypriansakwa

Description

@cypriansakwa

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

  1. In your project, set the dependency:
    bignum = { tag = "v0.7.5", git = "https://github.com/noir-lang/noir-bignum" }
  2. Attempt to build or run tests.
  3. Observe a large number of errors such as:
    • No matching impl found for U256: BigNum<N = _, MOD_BITS = _>
    • Could not resolve 'from_limbs' in path
    • No 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

  1. Set your dependency in your project to:

    bignum = { tag = "v0.7.5", git = "https://github.com/noir-lang/noir-bignum" }
  2. Build your project or run tests.

  3. Observe a large number of errors about missing trait impls and unresolved methods/functions for types like U256 and BN254_Fq.

  4. Change the tag to v0.7.3 and 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions