Update example dir to use BigNum v0.4.0.#2
Closed
iAmMichaelConnor wants to merge 5 commits intozkpassport:mainfrom
Closed
Update example dir to use BigNum v0.4.0.#2iAmMichaelConnor wants to merge 5 commits intozkpassport:mainfrom
iAmMichaelConnor wants to merge 5 commits intozkpassport:mainfrom
Conversation
This was referenced Nov 5, 2024
Author
|
Closing, as probably stale |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I wanted to see what the code in the
example/dir looks like when using the latest BigNum syntax. It's fairly clean. The only ugliness is that themainfunction doesn't seem to like our structsRuntimeBigNumorBigNumParamsbeing passed to it, and I'm not sure why. So for now, I've opened this PR to exemplify the problem to the Noir team.You'll notice: as per your message on slack, 5 of the 8 tests in
lib/are failing, and we suspect this is a result of changes to bignum introduced in v0.3.7. I haven't tried to fix those tests here; that's a separate thing that we're trying to solve :)The changes in this PR are orthogonal to that problem: this PR just seeks to get the test in
example/working, which it does.A note to the Noir team:
Notice there is a commented-out
mainand a corresponding commented-out call tomainwithin the test. If you swap themainand the corresponding call tomain, you'll see an error like:This error doesn't make sense to me, because
RuntimeBigNum<18, 2048>is a concrete type, and none of its data members (nor the data members of nested structs) are slices or references, from what I can tell.Edit: Interestingly (or frustratingly), the test in
example/succeeds withnargo test, but compilation of thismain()program fails with:Edit Edit: Actually, this compiler error only appears with nargo 0.37.0. If you use 0.36.0, this second-pictured compiler error succeeds. (But the first-pictured compiler error - if uncommented - still fails).
Tested with:
nargo version = 0.37.0
noirc version = 0.37.0+13856a121125b1ccca15919942081a5d157d280e
(git version hash: 13856a121125b1ccca15919942081a5d157d280e, is dirty: false)