fix: ensure same coeff in function hinted_ell_by_constant_affine#160
Closed
manishbista28 wants to merge 1 commit intoBitVM:mainfrom
Closed
fix: ensure same coeff in function hinted_ell_by_constant_affine#160manishbista28 wants to merge 1 commit intoBitVM:mainfrom
manishbista28 wants to merge 1 commit intoBitVM:mainfrom
Conversation
Contributor
Author
|
closing because the changes here are already included from #162 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Currently hinted_ell_by_constant_affine function does line evaluation plus fp12 multiplication ("mul_by_34") of the obtained evaluation with the accumulator. The total script size consumed by this function is slightly higher than what is convenient to fit inside a tapscript. As such, implementations (like chunker) have been breaking them manually instead of making using this function.
So first task is to separate the line eval and mul_by_34 part into two utility functions so that they can be used separately.
Secondly, line evaluation is used in conjunction with other line operations like point_add, check_line_through_point, etc. To ensure the same line coefficient is used by this function and the rest, we will assume line coefficients to be available on stack. This PR makes this adjustment.
To ensure the existing functionality (e.g. unchunked groth16 verifier test modules) isn't broken, a replacement function "hinted_ell_by_constant_affine_and_sparse_mul" has been substituted though it is not used with a chunker.
Tests have been added for each.