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

Continue CompositeBackend #1469

Merged
merged 15 commits into from
Jun 27, 2024
Merged

Continue CompositeBackend #1469

merged 15 commits into from
Jun 27, 2024

Conversation

georgwiese
Copy link
Collaborator

A few incremental changes towards implementing VadCop (#424):

  • CompositeBackend now explicitly panics for stuff that I'm planning to defer the implementation of, like exporting verification keys.
  • It internally has a backend for each machine. Currently, the entire PIL is considered one machine called "main".
  • I added wrappers for all existing backends.
  • I added tests for the composite wrapper. We need to check if the CI time is still fine!

@@ -95,7 +119,7 @@ pub trait BackendFactory<F: FieldElement> {
&self,
pil: &'a Analyzed<F>,
fixed: &'a [(String, Vec<F>)],
output_dir: Option<&'a Path>,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This made it hard to change the path in the CompositeBackend. I don't see a good reason to pass a reference with a lifetime here anyway.

Copy link
Collaborator

Choose a reason for hiding this comment

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

sgtm

@georgwiese
Copy link
Collaborator Author

With 8f472bd, the slowest CI job now takes 16min (compared to 14min before this PR), which I think is reasonable.

@georgwiese georgwiese marked this pull request as ready for review June 26, 2024 11:38
@Schaeff Schaeff self-requested a review June 26, 2024 11:55
@@ -95,7 +119,7 @@ pub trait BackendFactory<F: FieldElement> {
&self,
pil: &'a Analyzed<F>,
fixed: &'a [(String, Vec<F>)],
output_dir: Option<&'a Path>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

sgtm

Comment on lines 140 to 144
#[cfg(not(feature = "halo2"))]
pub fn test_halo2(_file_name: &str, _inputs: Vec<Bn254Field>) {}

#[cfg(feature = "halo2")]
pub fn gen_halo2_proof(file_name: &str, inputs: Vec<Bn254Field>) {
pub fn gen_halo2_proof(file_name: &str, inputs: Vec<Bn254Field>, composite: bool) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not a fan of boolean arguments like that, if it can't be two different functions can you at least introduce an enum for the {use_}composite argument?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I split the function.

@georgwiese georgwiese requested a review from Schaeff June 26, 2024 19:10
@leonardoalt leonardoalt added this pull request to the merge queue Jun 27, 2024
Merged via the queue into main with commit e7c87a8 Jun 27, 2024
6 checks passed
@leonardoalt leonardoalt deleted the composite-wrapper2 branch June 27, 2024 10: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.

None yet

3 participants