NethermindEth / cairo-plonk-verifier

Plonk Verifier in Cairo
Apache License 2.0
0 stars 1 forks source link

Explore circuit preserving structure #10

Open danielntmd opened 1 month ago

danielntmd commented 1 month ago

Right now, the main implementation method is to enclose every function as a circuit. This means there is pretty decent overhead for individual function calls due to smaller circuit evaluations.

If we can create some custom structure that we can pass between function calls so that we can delay circuit evaluations until the end, we can save lots of steps.

Something like?

`struct plonk_circuit { num_inputs: u256 inputs: Array<CircuitElement::<CircuitInput<>>, out_circuits: Array }

[generate_trait]

impl circuit utils for plonk_circuit { fn get_modulus(..., fn evaluate(..., } `