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

Optimize verifier eq #102

Merged
merged 5 commits into from
Nov 20, 2022
Merged

Optimize verifier eq #102

merged 5 commits into from
Nov 20, 2022

Conversation

bbuenz
Copy link
Contributor

@bbuenz bbuenz commented Nov 19, 2022

Optimize the verifier by directly evaluating eq instead of building the entire table. Also enabled public inputs that are smaller than a witness column. Only supports power of 2 public inputs.
For mu=19
Fixing EQ: 137.558ms -> 44.067ms
Fixing public inputs 44.067ms->20.560ms

close #100

@@ -85,10 +86,11 @@ impl<F: PrimeField> MockCircuit<F> {
witnesses[i].append(cur_witness[i]);
}
}
let public_inputs=witnesses[0].0[0..4].to_vec();
Copy link
Collaborator

Choose a reason for hiding this comment

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

pub_inp_len should be min(4, num_constraints).

@@ -144,7 +146,7 @@ mod test {

const SUPPORTED_SIZE: usize = 20;
const MIN_NUM_VARS: usize = 8;
const MAX_NUM_VARS: usize = 15;
const MAX_NUM_VARS: usize = 19;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I set it to 15 to decrease test time

@chancharles92 chancharles92 merged commit 768db4e into main Nov 20, 2022
@alxiong alxiong deleted the optimize-verifier-eq branch November 21, 2022 16:11
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.

[bugfix] fix verifier eq_eval
2 participants