Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Ensure nonnative field negate works in case of non-normalized input #52

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jules
Copy link
Contributor

@jules jules commented Jun 9, 2024

this commit also adds some assertions to make sure that we never overflow max_mods_to_fit.

What ❔

Fixes a bug where negated would mistakenly attribute the wrong amount of moduluses in the tracker and cause further arithmetic to be distorted.

Why ❔

Causes issues with native vs. in-circuit arithmetic of field elements.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zk fmt and zk lint.

this commit also adds some assertions to make sure that we never
overflow max_mods_to_fit.
@jules jules requested a review from shamatar June 9, 2024 19:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant