Skip to content

Conversation

@MozirDmitriy
Copy link

GoldilocksField::from_str_radix constructed with Self(n) and could store values ≥ ORDER, violating the invariant that values are always canonical. This led to potential incorrect behavior in arithmetic and formatting. The function now rejects values ≥ ORDER and constructs via from_canonical_u64. Added tests to assert rejection of ORDER and acceptance of ORDER−1 to lock in the behavior.

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