-
Notifications
You must be signed in to change notification settings - Fork 38
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
Optimize zkVM Proving by Skipping Unused Keccak Tables #690
Conversation
This reverts commit f63363b.
…le_keccak_optional_proving
5892a8c
to
27590f8
Compare
@Nashtare I’ve refactored the code and merged two tests into one integration test. PTAL. |
zero/src/prover_state/mod.rs
Outdated
// Default degree of the recursive circuit when a proof is missing from AllProof | ||
const DEFAULT_CIRCUIT_DEGREE: usize = 8; |
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.
Why would we want to load anything if a proof is missing? Also this may crash unexpectedly in load_table_circuits
if we specify a config with a range (for Keccak for instance) that excludes this value.
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.
We still need a recursive circuit to generate a dummy proof for the root circuit. Let me refactor the code to optimize this while also addressing the other comment.
3fd9032
to
9021124
Compare
667c462
to
557d221
Compare
I have changed the code to generate dummy proofs during the initial setup. PTAL again. |
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 LGTM, would just appreciate the extension of the empty_table
test to include the segment aggregation logic.
Also would wait on others to comment on the usage of unstable feature.
.as_ref() | ||
.expect("Missing ctl_zs") | ||
.clone() | ||
} else if i == *Table::Keccak { |
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 assume this will get refactored in the generalization to other tables as well?
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.
Yes. It got refactored in #724
This PR introduces optional Keccak table proving, which optimizes performance by skipping the proving process when the Keccak tables are empty. This change reduces unnecessary computation and requires an update to Plonky2 for full integration.
This PR introduces optional Keccak table proving, which optimizes performance by skipping the proving process when the Keccak tables are empty. This change reduces unnecessary computation and requires an update to Plonky2 for full integration.