Skip to content

fix: ensure same coeff in function hinted_ell_by_constant_affine#160

Closed
manishbista28 wants to merge 1 commit intoBitVM:mainfrom
alpenlabs:fix/ensure_same_coeff_hinted_ell_by_constant_affine
Closed

fix: ensure same coeff in function hinted_ell_by_constant_affine#160
manishbista28 wants to merge 1 commit intoBitVM:mainfrom
alpenlabs:fix/ensure_same_coeff_hinted_ell_by_constant_affine

Conversation

@manishbista28
Copy link
Copy Markdown
Contributor

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.

@manishbista28 manishbista28 marked this pull request as draft December 17, 2024 11:40
@manishbista28 manishbista28 marked this pull request as ready for review December 17, 2024 14:37
@manishbista28 manishbista28 marked this pull request as draft January 2, 2025 16:13
@manishbista28
Copy link
Copy Markdown
Contributor Author

closing because the changes here are already included from #162

@manishbista28 manishbista28 deleted the fix/ensure_same_coeff_hinted_ell_by_constant_affine branch February 23, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant