feat: speedup test by only check constraints on less rows for MockProver#354
Conversation
CPerezz
left a comment
There was a problem hiding this comment.
Added a comment which can be related to modifications in the halo2 PR.
Let me know what you think :)
ed255
left a comment
There was a problem hiding this comment.
LGTM! I'm not submitting "Approve" yet mainly due to the halo2 dependency that must be updated once privacy-ethereum/halo2#38 is merged as CPerezz has mentioned.
I also think that the comments from z2trillion should be attended as well :)
Thanks a lot for working on this! We will all benefit from faster testing times in the CI :)
|
I just merged privacy-ethereum/halo2#38 and then released a tag for it: https://github.com/appliedzkp/halo2/releases/tag/v2022_03_06 You can now update all Halo2 git deps for the workspace members and this can be merged after @z2trillion comments are addressed/resolved cc @lispc |
|
CI error: I think it is not related to this PR? maybe some upstream source ( cargo? bitvec? ) changed? |
@CPerezz also encountered this error once, and if I remember correctly, it just went away by rerunning the CI. Currently we're depending on two different version of From the For now the easiest solution is re-running the CI when this happens. One of the versions of |
|
As you can see, I re-run all checks and the error disappeared. I'll file an issue for it later today, but for now don't worry too much. As this will disappear once the patch is not needed anymore. |
|
I do also think @ed255 that if we use Do you think making a PR for the resolver or the edition change would make sense? |
Most of the rows in circuits are "muted" by
q_step * ..... So for testing purpose, since we know which rows are "active" for our circuit, we can only test the constraints/lookups on "active" rows.Speedup by this PR is significant, in my Mac M1, bitwise_gadget_simple test time changes from 640s to 47s. And in github CI, full CI time goes down from 42min to 12min, within which there are 7min compiling time. So the real speedup is about (42-7)/(12-7) = 7 times. If we implement rust compiling cache later, the CI time can be further reduce to 5min.
This PR is not ready for merge currently. The PR on halo2 side(privacy-ethereum/halo2#38) should be merged first, then I will change the halo2 in Cargo.toml here.