zkevm-circuits icon indicating copy to clipboard operation
zkevm-circuits copied to clipboard

PROPOSAL: Generate circuit stats using plaf

Open leolara opened this issue 2 years ago • 2 comments

Describe the feature you would like

We could add a script that for each sub-circuit and supercircuit, would generate a plaf object and generate some stats from there, like number of gates/lookups and degree.

Then a CI tool, could show this info in PRs and even show the difference with main.

Additional context

No response

leolara avatar May 30 '23 06:05 leolara

Hi Leo, can you expand on what is a plaff object? I like the idea to have some stats like number of gates/lookups and degree shown in CI.

ChihChengLiang avatar May 30 '23 09:05 ChihChengLiang

Sorry, plaf is with one f, i keep using two.

This struct

https://github.com/Dhole/polyexen/blob/master/src/plaf.rs#L184-L200

has all the info about a "compiled" plonkish circuit.

And it includes code from Mr. Dhole that can convert a halo2 circuit to plaf https://github.com/Dhole/polyexen/blob/master/src/plaf/frontends/halo2.rs

Hence, it could be very simple to extract all the relevant stats about any halo2 circuit in a standard way.

leolara avatar May 30 '23 09:05 leolara