mpz
mpz copied to clipboard
feat: generic circuit struct
Description
This PR aims to introduce a new generic circuit struct to be used to represent the multiple types of circuits that can be used with mpz
.
- The binary module is just an example of how to use the generic structs with a basic binary circuit. So can be seen as temporary to review the pr or be left aside.
- The way we decide to deal with declaring inputs and outputs of the circuit, or this kind of "builder api" can shape the interface or even remove it completely. Current implementation is just a basic one to test the structure. In this point perhaps we could prioritize to make things easier to deal with
mpz
or adapt to the old structure as much as possible.
The model has been updated with few key changes:
- Both circuit and gates can be modeled as:
- components: blocks with inputs and outputs
- executables: can perform external operations on memory
A key change is that the execution is defined externally on both, by part of an Executor
.
This means that each structure can perform multiple operations with the same configuration.
Closing for #156