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

feat: NIVC circuits + tests #96

Merged
merged 19 commits into from
Oct 22, 2024
Merged

feat: NIVC circuits + tests #96

merged 19 commits into from
Oct 22, 2024

Conversation

Autoparallel
Copy link
Contributor

@Autoparallel Autoparallel commented Oct 19, 2024

Completed Work

This PR addresses:


OLD TODOs

Current Goals and TODOs

Most of the work is done, only a few bugs, tests, and upgrades remain.

Get the NIVC circuits in this repo, properly tested, and fully functional (in as far as the parsers themselves are).

Notes

Most of the (currently) 13K lines change is storing JSON. We can remove this JSON storage later and chain these together using circuit.compute(input, ["step_out"]) and taking the output from there and using it for the subsequent input.

I made JSON files now because I wanted temporary storage for introspection on the values.

Autoparallel and others added 9 commits October 18, 2024 11:09
Passing for `parse` and for initial object masking. However, when the value is not an object starting with `{` we don't handle this correctly. We need to handle the case that it is a `[` or `"` or a number, ideally.
@Autoparallel
Copy link
Contributor Author

Autoparallel commented Oct 20, 2024

@lonerapier this is ready for review.

I think the last steps are:

  • decide how we want to do the final value extraction. Right now I wrote a new output signal value. I think we may want to have the step_out all zeroed out and perhaps even set the curr_depth signal (step_out[-1]) to be something like -1 (bn254::max). This means no circuit can ever meaningfully placed after this one. This gives us assurance no funny business happens after parsing and we can even assert that a ROM must end with this circuit.
  • to do a final clean up to make these circuits as simple as possible, easy to read, and minimal diffs on this change.
  • get rid of the json files and set this up to do the NIVC in order and in memory. Having the files was just for debugging. May be worth leaving comments on how to have this generate files though in case we ever need to debug this again.

@Autoparallel Autoparallel marked this pull request as ready for review October 20, 2024 15:33
Copy link
Collaborator

@lonerapier lonerapier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onto NIVC we go!!

@Autoparallel Autoparallel merged commit 5fd9651 into main Oct 22, 2024
4 checks passed
@Autoparallel Autoparallel deleted the feat/nivc-circuits branch October 22, 2024 20:31
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.

feat: NIVC circuits
2 participants