A fix for a verification error caused by different chunk_size in pre-processing and proving #35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes an error in plonkish_backend/src/backend/hyperplonk/prover.rs that causes the verification of proofs to fail.
The permutation argument is split into chunks because the number of columns might be greater than the max degree. In preprocessing, chunk_size is defined as max_degree -1. The number of chunks is set as the ceiling of the number of permutation polys divided by the chunk size. However, in proving the chunk_size is set as the ceiling of the number of permutation polys divided by the number of chunks. In some cases, this leads to the chunk_size being different in pre-processing to in proving, which causes a verification error for the resulting proof. For example say the pre-processing chunk size was 3, and the number of permutation polys is 4, then the number of chunks is 2. However in proving, the chunksize would be 4/2 = 2.