NethermindEth / cairo-plonk-verifier

Plonk Verifier in Cairo
0 stars 0 forks source link

Explore circuit preserving structure #10

Open danielntmd opened 4 hours ago

danielntmd commented 4 hours 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(..., } `