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: decouple constraints from witness solver #2

Merged
merged 8 commits into from
Feb 4, 2025

Conversation

Autoparallel
Copy link
Contributor

@Autoparallel Autoparallel commented Feb 4, 2025

closes #3

@Autoparallel Autoparallel marked this pull request as ready for review February 4, 2025 20:11
let pub_inputs = vec![Fr::ZERO; args.public_io_length];
let z_i = Vec::<FpVar<Fr>>::new_witness(cs.clone(), || Ok(pub_inputs)).unwrap();
let program = NoirProgram::new(&noir_json);
program.generate_constraints(cs.clone());
Copy link

Choose a reason for hiding this comment

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

this is actually so nice that this is the api

dbg!(cs.num_witness_variables());
// NOTE, the 0th instance assignment is the constant term enabler.
// This example is:
// 2 * 3 + (-8) + 2 == 0
Copy link

Choose a reason for hiding this comment

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

nice

@Autoparallel Autoparallel merged commit 3fb1827 into main Feb 4, 2025
3 checks passed
@Autoparallel Autoparallel deleted the feat/decouple-constraints-from-witness branch February 4, 2025 20:47
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: decouple constraint creation from solving
2 participants