Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prover.toml doesn't handle arrays of structs #1459

Closed
joss-aztec opened this issue May 31, 2023 · 1 comment · Fixed by #1651
Closed

Prover.toml doesn't handle arrays of structs #1459

joss-aztec opened this issue May 31, 2023 · 1 comment · Fixed by #1651
Assignees
Labels
bug Something isn't working

Comments

@joss-aztec
Copy link
Contributor

Aim

Arrays of structs should handled

Expected Behavior

Given the program

struct Foo {
    bar: Field,
    baz: Field,
}

fn main(foos: [Foo; 3]) -> pub Field {
    foos[2].bar + foos[2].baz
}

And the Prover.toml

[[foos]]
bar = 0
baz = 0

[[foos]]
bar = 0
baz = 0

[[foos]]
bar = 0
baz = 1

nargo should be able to prove

Bug

Instead you encounter:

Error: input file is badly formed, could not parse, TOML parse error at line 3, column 1
  |
3 | [[foos]]
  | ^^^^^^^^
data did not match any variant of untagged enum TomlTypes

To Reproduce

  1. prove the above program and input

Installation Method

Compiled from source

Nargo Version

nargo 0.6.0 (git version hash: b695faa, is dirty: true)

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@joss-aztec joss-aztec added the bug Something isn't working label May 31, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir May 31, 2023
@goblinoats
Copy link

FYI, currently working around this by munging data in the circuit.

@TomAFrench TomAFrench self-assigned this Jun 5, 2023
@TomAFrench TomAFrench moved this from 📋 Backlog to 🏗 In progress in Noir Jun 13, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Noir Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants