-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump plonky2 (serialization fix) #729
Conversation
fn check_num_ctls() { | ||
assert_eq!(all_cross_table_lookups::<F>().len(), NUM_CTLS); | ||
} |
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 can't add such check for the MEMORY_CTL_IDX
constant, because the looked_table
field within CrossTableLookup
is crate-private, though I could change it in the sibling PR if wanted.
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 think we can add a comment before ctl_memory(),
to indicate we cannot change its position.
@@ -249,12 +250,16 @@ pub mod testing { | |||
|
|||
// Extra sums to add to the looked last value. | |||
// Only necessary for the Memory values. | |||
let mut extra_looking_sums = vec![vec![F::ZERO; config.num_challenges]; NUM_TABLES]; | |||
let mut extra_looking_sums = |
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 think we can use let mut extra_looking_sums = HashMap::new()
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.
This causes the proving jobs to fail (two artifacts blocks) if I don't initialize each individual sum with vec![F::ZERO; config.num_challenges]
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.
Just curious, the unit tests passed, so why did the proving blocks job fail?
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.
There is only 1 recursive unit test (apart from consistency of constraints) that is ran in CI, it's empty_tables
that is not complete (my comment on one of your PRs actually) as it only generates segment proofs.
Initializing the HashMap
without specifying routable wires causes the recursive verification (not native one) to fail, which is done at the layer above (segment_aggregation). You can test it on two_to_one
test for instance (though it is ignored in the CI).
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.
Do you know why it fails at the layer above?
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.
Because during verification of the CTLs, we add the extra sum values, which default to virtual wires if we don't specify builder.zero()
. These are not part of the permutation argument and hence can have any value.
This reverts commit 50553fd.
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, thanks!
We are currently having serialization issues due to the addition of
DummyProofGenerator
on theRootCircuitData
, which is causing the prover_state to not be deserializable properly, ruining caching mechanism with persistence mode activated.This is currently pinned to
07c20447bfcdada6bd479bd8a13af26082923520
on the plonky2 side (i.e. related branch fix), and updates the codebase with all changes related to plonky2 bump, in addition to fixing the range intwo_to_one
test and adding a serialization check consistency on theempty_tables
test.sibling PR: 0xPolygonZero/plonky2#1634