Skip to content

fix: fix the from::<Field> logic when the MOD_BITS is the same as the native field bitsize #172

Merged
TomAFrench merged 7 commits into
mainfrom
tf/fix-field-from-impl
May 16, 2025
Merged

fix: fix the from::<Field> logic when the MOD_BITS is the same as the native field bitsize #172
TomAFrench merged 7 commits into
mainfrom
tf/fix-field-from-impl

Conversation

@TomAFrench
Copy link
Copy Markdown
Member

Description

Problem*

Resolves

Summary*

This PR pulls out a testcase which is failing in noir-lang/noir_bigcurve#46. We're calling ::from(4) on a number of different fields so there's something specific to bls12_377 which is causing an issue here.

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@github-project-automation github-project-automation Bot moved this to 👀 To Triage in Noir Libraries May 12, 2025
TomAFrench pushed a commit to noir-lang/noir_bigcurve that referenced this pull request May 12, 2025
@kashbrti
Copy link
Copy Markdown
Contributor

@TomAFrench, I'll open another PR that adds benchmarks for the from::<Field> for the type that's causing problems here

@kashbrti kashbrti marked this pull request as ready for review May 13, 2025 12:07
Comment thread src/fns/constrained_ops.nr Outdated
@kashbrti kashbrti changed the title chore: add failing testcase fix: fix the from::<Field> logic when the MOD_BITS is the same as the native field bitsize May 13, 2025
kashbrti and others added 2 commits May 13, 2025 14:58
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
@TomAFrench
Copy link
Copy Markdown
Member Author

LGTM

@TomAFrench TomAFrench merged commit aed8c3a into main May 16, 2025
7 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 To Triage to ✅ Done in Noir Libraries May 16, 2025
@github-actions github-actions Bot mentioned this pull request May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants