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: arbitrary sized circuits #95

Merged
merged 61 commits into from
Feb 6, 2025
Merged

Conversation

lonerapier
Copy link
Collaborator

@lonerapier lonerapier commented Jan 23, 2025

closes #90

  • support for arbitrary sized circuits
  • allows request, response chains into one combined chain
  • adds circuits' input generation lib
  • remove ByteOrPad usage for witness generation and move to u8, wherever necessary
  • add circuit diagram
  • add complex test (~5KB)

TODO:

  • remove logs from circuits. Witnesscalc fails because of that
  • clean up TODOs inside circuit
  • add comment inside tests
  • remove unused circuit templates

circuit diagram: https://miro.com/app/board/uXjVLVedPM8=/
v0 9 0

@lonerapier lonerapier marked this pull request as ready for review January 29, 2025 17:08
@lonerapier lonerapier force-pushed the feat/arbitrary-sized-circuits branch from fab752c to 69ebdd7 Compare February 4, 2025 19:34
// both should be 0 or 1 together
signal is_new_state_digest_zero <== IsEqual()([new_state_digest, 0]);
signal is_step_out_zero_matched <== IsEqual()([step_out[0], value_digest]);
0 === is_new_state_digest_zero - is_step_out_zero_matched; // verify final value matches
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@Autoparallel Autoparallel left a comment

Choose a reason for hiding this comment

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

I am quite familiar with most of these changes and the tests of the circom circuits seem to imply this is functioning correctly as far as we can tell. Likewise, it is working with the Rust witness generation tooling.

I have no issue merging this. It has my greenlight.

@Autoparallel Autoparallel merged commit e17bf08 into main Feb 6, 2025
3 checks passed
@Autoparallel Autoparallel deleted the feat/arbitrary-sized-circuits branch February 6, 2025 16:40
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: support more flexible chaining of NIVC circuits
3 participants