-
Notifications
You must be signed in to change notification settings - Fork 858
Conversation
c391b0e
to
df2a1bb
Compare
Marking as draft because it seems I broke the CopyCircuit or CopyTable. |
deb3cbc
to
01c5133
Compare
e87e531
to
2905d4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First round pass. Will take a deeper look at halo2_stats.rs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good! Have a question about formula and implementation mismatch.
edf2afd
to
7020216
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't intend to do a full review. Please exclude me from the final approval.
I just want to give a quick comment on the Deref.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Extract the bit columns from BinaryNumberChip into BinaryNumberBits so that the columns can be used in a table without associated constraints. This is useful for the CopyTable to be used in unit tests outside of the CopyCircuit (without needing the BinaryNumberChip constraints).
d9fc61b
to
9563fdc
Compare
Description
Add a new command to the stats binary that reports halo2 circuit stats for each circuit, and the supercircuit.
Issue Link
Resolve #1645
Type of change
Contents
stats
that records halo2 circuit stats from the configuredConstraintSystem
, based on Scroll's code from https://github.com/scroll-tech/zkevm-circuits/blob/7d9bc181953cfc6e7baf82ff0ce651281fd70a8a/zkevm-circuits/src/util.rs#L294ConstraintSystem
(and obtaining stats via deltas), and then configuring each sub-circuit starting from the shared tablesConstraintSystems
each time.Results
These results are for
k = 26
. At the current worst-case estimation of At 0.0139 gas/row this gives us 2^26 * 0.0139 = ~900k gas. For 30M gas we would need 33 chunks like that.PD: Yes, the estimation is 21TB of memory for a super circuit proof :( Nevertheless there are various things we can do to improve this.