namnc / circom-2-arithc

Circom interpreter to arithmetic circuit description
MIT License
33 stars 7 forks source link

fix: circuit optimizations #48

Closed brech1 closed 1 month ago

brech1 commented 1 month ago

Description

This PR aims to update the output circuit structure and apply some code optimizations to the circuit generation.

Merging nodes can be intensive if we have to go through every gate and every signal to get some information about them and update the necessary values, so I tried to reduce gates and signals traversing as much as possible, at least as a first iteration.

I also removed unnecessary code, functions and data properties, and created the Signal struct to store signal data.