mpz icon indicating copy to clipboard operation
mpz copied to clipboard

feat: generic circuit struct

Open brech1 opened this issue 10 months ago • 2 comments

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.

brech1 avatar May 02 '24 21:05 brech1

  • 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.

brech1 avatar May 06 '24 15:05 brech1

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.

brech1 avatar May 12 '24 13:05 brech1

Closing for #156

brech1 avatar Jun 10 '24 23:06 brech1