Skip to content

Update example dir to use BigNum v0.4.0.#2

Closed
iAmMichaelConnor wants to merge 5 commits intozkpassport:mainfrom
iAmMichaelConnor:main
Closed

Update example dir to use BigNum v0.4.0.#2
iAmMichaelConnor wants to merge 5 commits intozkpassport:mainfrom
iAmMichaelConnor:main

Conversation

@iAmMichaelConnor
Copy link
Copy Markdown

@iAmMichaelConnor iAmMichaelConnor commented Nov 3, 2024

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 the main function doesn't seem to like our structs RuntimeBigNum or BigNumParams being 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 main and a corresponding commented-out call to main within the test. If you swap the main and the corresponding call to main, you'll see an error like:

image

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 with nargo test, but compilation of this main() program fails with:

image

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)

@iAmMichaelConnor
Copy link
Copy Markdown
Author

Closing, as probably stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant