Closed hooperben closed 4 days ago
Hey @hooperben, this issue is due to your project using multiple incompatible versions of the proving library barretenberg.
In your package.json
, you're using the 0.25.0 release of Noir packages. this pulls in version 0.26.3 of bb.js
Now when you're running nargo codegen-verifier
, you're pulling in completely different versions of barretenberg from which to generate the smart contract with.
nargo 0.30.0: https://github.com/noir-lang/noir/blob/af57471035e4fa7eaffa71693219df6d029dbcde/tooling/bb_abstraction_leaks/build.rs#L13
nargo 0.29.0: https://github.com/noir-lang/noir/blob/2da28997dbedce4a00d2162eddb57564bdb23546/tooling/bb_abstraction_leaks/build.rs#L13
It's likely that there was a breaking change in barretenberg between versions 0.35.1 and 0.38.0 which means that it's no longer compatible with proofs generated using bb.js version 0.26.3.
Noir doesn't control the versioning of barretenberg so we can't provide any guarantees about compatibility between versions. We're currently removing some of the "magic" around interacting with barretenberg in order to make using compatible versions easier but for the time being I'd recommend making sure that nargo
and any @noir-lang
JS packages are on the same version as this ensures that they all use the same version of barretenberg.
If you update the contents of your package.json
to 0.30.0 then I would expect this issue to be solved.
yep confirming this was it, thank you sir
Aim
I am building a circuit with nargo v0.30.0, but when exporting this to the verifier contract, I can never get the verifier contract to evaluate the proof successfully. However, if I change my nargo version to v0.29.0 and regenerate the verifier contract, the verifier contract will work as expected.
Expected Behavior
the following should pass with nargo v0.30.0 - but only passes with v0.29.0.
Bug
when noir version = 0.30.0 and running
nargo codegen-verifier
and using thatplonk_vk.sol
, it's the following error:when noir version = 0.29.0 and running
nargo codegen-verifier
and using thatplonk_vk.sol
, it works fine:To Reproduce
Clone this repo and have a look if you'd like:
https://github.com/hooperben/nargo-issue/
In order to test you'll have to do:
to change to v0.29.0.
Project Impact
Blocker
Impact Context
Can't really use
nargo v0.30.0
in smart contracts unless this is fixed.Workaround
Yes
Workaround Description
Downgrade to
v0.29.0
Additional Context
No response
Installation Method
Binary (
noirup
default)Nargo Version
nargo version = 0.30.0 noirc version = 0.30.0+af57471035e4fa7eaffa71693219df6d029dbcde (git version hash: af57471035e4fa7eaffa71693219df6d029dbcde, is dirty: false)
NoirJS Version
^0.25.0
Would you like to submit a PR for this Issue?
Maybe
Support Needs
I'd like to fix the verifier contract but idk how that moon math works just yet lol