This PR updates analyzer implementation with a significant change in analyzer design. In this design, we have an Analyzable struct which implements Assihnmenttrait. This allows us to configure and synthesize a circuit with our desired implementation of Assignment. In this custom implementation, we will keep the functionality which impacts our desired data structures, including:
ConstraintSystem
regions
fixed
Selectors
permutation
usable_rows
These are the fields that we need for our analyses or are necessary for functions of Assignment that impact our desired fields.
The benefit of using this trait compared to other design alternatives like the custom implementation of Layouter or using MockProver is that this design does not depend on any runtime information, like running MockProver to extract Fixed columns in the First version of our analyzer.
In this PR we:
Introduce Analyzable and implement it for Assignment
Implement config_and_synthesize analyzable to configure and synthesize the circuit.
Update Analyzer struct with new fields
Update Analyzer initialization based on Analyzable
Implement a new extract_permutations function to extract all pairs of cells that are constrained to be equal, along with a list of all instance cells in these constraints from permutation.
Update all analyzer functions based on new data fields
Added feature flags to support zash and pse halo 2 in this step, and applied these feature flags to all implementation details as required.
The sample circuits have been updated and now we have two set of circuits for pse and zcash.
Also the integration tests are updated, and there are integration tests for zcash and pse.
This PR updates analyzer implementation with a significant change in analyzer design. In this design, we have an Analyzable struct which implements Assihnmenttrait. This allows us to configure and synthesize a circuit with our desired implementation of Assignment. In this custom implementation, we will keep the functionality which impacts our desired data structures, including:
These are the fields that we need for our analyses or are necessary for functions of Assignment that impact our desired fields. The benefit of using this trait compared to other design alternatives like the custom implementation of
Layouter
or usingMockProver
is that this design does not depend on any runtime information, like running MockProver to extract Fixed columns in the First version of our analyzer.In this PR we:
Analyzable
and implement it forAssignment
config_and_synthesize
analyzable to configure and synthesize the circuit.extract_permutations
function to extract all pairs of cells that are constrained to be equal, along with a list of all instance cells in these constraints from permutation.