Skip to content

Conversation

@ivokub
Copy link
Collaborator

@ivokub ivokub commented Jan 7, 2025

Description

In the fake GLV method we return the sign, but it is not used in the point. Due to the hint calling abstraction for non-native computation we still range check the variables. It is unoptimal, but in Linea prover we explicitly check if the variables are used in sequential constraints. As we don't, then this leads to compile error.

However, we still use the fifth output in BLS12-377, so no change there.

@yelhousni - can you double check that we haven't previously added unsoundness due to unused variable?

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

All existing tests succeed.

How has this been benchmarked?

Updated stats - saves a bit more than 100 constraints for scalar multiplication

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@ivokub ivokub added type: bug Something isn't working type: consolidate strengthen an existing feature labels Jan 7, 2025
@ivokub ivokub added this to the v0.11.N milestone Jan 7, 2025
@ivokub ivokub requested a review from yelhousni January 7, 2025 10:05
@ivokub ivokub self-assigned this Jan 7, 2025
Copy link
Contributor

@yelhousni yelhousni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good 👍 I missed that in some refactoring.

@ivokub ivokub merged commit 8b4dc2e into master Jan 7, 2025
5 checks passed
@ivokub ivokub deleted the fix/halfgcd-sw-nbout branch January 7, 2025 14:28
lucasmenendez pushed a commit to lucasmenendez/gnark that referenced this pull request Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working type: consolidate strengthen an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants