-
Notifications
You must be signed in to change notification settings - Fork 102
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
Default pipeline with backend arguments #2557
base: pilopt-two-pass
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just wondering if we could have with_backend_factory
and with_backend_options
instead of the overlapping methods now. This is not block though.
@@ -97,14 +97,14 @@ impl<R: io::Read> AsIoRead for Option<R> { | |||
} | |||
|
|||
/// Optional Arguments for various stages of the pipeline. | |||
#[derive(Default, Clone)] | |||
#[derive(Clone)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not implement default on backend and keep this?
@@ -127,6 +127,29 @@ struct Arguments<T: FieldElement> { | |||
existing_proof_file: Option<PathBuf>, | |||
} | |||
|
|||
impl<T> Default for Arguments<T> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would then go away
Depends on #2535 and #2557. Split `assert_proofs_fail_for_invalid_witnesses_pilcom` into `assert_proofs_fail_for_invalid_witnesses_pilcom_composite` and `assert_proofs_fail_for_invalid_witnesses_pilcom_monolithic`. These two APIs are needed because we might generate different witnesses for pilcom composite vs pilcom monolithic under two scenarios: 1. The two backends can have different witnesses to start with. This hasn't been an issue because most of our test cases are very simple machines. 2. After updates in #2535, if we eventually implement different optimizations for the two different backends, they might compute two different witnesses.
Depends on #2535 and standardizes the backend argument in
Pipeline
:backend
now defaults toBackendType::Mock
when constructing the pipeline.with_backend_factory
API is used instead ofwith_backend
.with_backend_factory
is called, because the default pipeline already defaults toBackendType::Mock
.with_backend_factory(backend)
is equivalent towith_backend(backend, None)
.with_backend
API is used.