Skip to content

feat: add jolt-field crate#1363

Merged
0xAndoroid merged 10 commits intomainfrom
jolt-v2/jolt-field
Apr 3, 2026
Merged

feat: add jolt-field crate#1363
0xAndoroid merged 10 commits intomainfrom
jolt-v2/jolt-field

Conversation

@markosg04
Copy link
Copy Markdown
Collaborator

Summary

Changes

Testing

  • Ran tests for modified crates
  • cargo clippy and cargo fmt pass

Security Considerations

Breaking Changes

None

Copy link
Copy Markdown
Collaborator Author

markosg04 commented Mar 25, 2026

Copy link
Copy Markdown
Collaborator

@0xAndoroid 0xAndoroid left a comment

Choose a reason for hiding this comment

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

Code review — 11 issues found (4 high, 4 medium, 3 low). Arithmetic is sound; Barrett/Montgomery reductions, wide accumulator, and precomputed tables are correct. Issues are API/type-safety concerns. See inline comments.

@0xAndoroid 0xAndoroid force-pushed the jolt-v2/jolt-field branch from 0758ae8 to 1b15876 Compare April 1, 2026 17:56
@markosg04 markosg04 marked this pull request as ready for review April 2, 2026 15:33
@markosg04 markosg04 requested a review from moodlezoup as a code owner April 2, 2026 15:33
Base automatically changed from jolt-v2/scaffolding to main April 2, 2026 17:52
@0xAndoroid 0xAndoroid requested a review from sagar-a16z as a code owner April 2, 2026 17:52
@0xAndoroid 0xAndoroid force-pushed the jolt-v2/jolt-field branch from 74305c7 to 17e1d5d Compare April 3, 2026 18:38
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Warning

This PR has more than 500 changed lines and does not include a spec.

Large features and architectural changes benefit from a spec-driven workflow.
See CONTRIBUTING.md for details on how to create a spec.

If this PR is a bug fix, refactor, or doesn't warrant a spec, feel free to ignore this message.

@github-actions github-actions bot added the no-spec PR has no spec file label Apr 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Warning

This PR has more than 500 changed lines and does not include a spec.

Large features and architectural changes benefit from a spec-driven workflow.
See CONTRIBUTING.md for details on how to create a spec.

If this PR is a bug fix, refactor, or doesn't warrant a spec, feel free to ignore this message.

@0xAndoroid 0xAndoroid force-pushed the jolt-v2/jolt-field branch from 329ede7 to 6f82e1f Compare April 3, 2026 18:54
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Warning

This PR has more than 500 changed lines and does not include a spec.

Large features and architectural changes benefit from a spec-driven workflow.
See CONTRIBUTING.md for details on how to create a spec.

If this PR is a bug fix, refactor, or doesn't warrant a spec, feel free to ignore this message.

@0xAndoroid 0xAndoroid force-pushed the jolt-v2/jolt-field branch from 6f82e1f to 15bbf97 Compare April 3, 2026 19:05
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Warning

This PR has more than 500 changed lines and does not include a spec.

Large features and architectural changes benefit from a spec-driven workflow.
See CONTRIBUTING.md for details on how to create a spec.

If this PR is a bug fix, refactor, or doesn't warrant a spec, feel free to ignore this message.

markosg04 and others added 6 commits April 3, 2026 15:21
- Fix negative-zero bug in From<i64/i128> for S96/S160 (val.is_positive() → val >= 0)
- Add manual PartialEq for SignedBigIntHi32 that treats ±0 as equal (Ord/PartialEq contract)
- Inline sub_assign_in_place to avoid unnecessary copy via Neg
- Upgrade debug_assert! to assert! in magnitude_as_limbs_nplus1 and to_signed_bigint_nplus1
- Replace unsafe generic From<S224> for Limbs<N> with concrete From<S224> for Limbs<4>
- Restrict fmadd_trunc and bn254_ops functions to pub(crate) visibility
- Replace From<BigInt>/Into<BigInt> trait impls on Limbs with pub(crate) inherent methods
- Remove Option wrapper from Fr::from_bigint_unchecked
Tests and bench use Fr which requires the bn254 feature. Without the
gate, `cargo clippy --no-default-features --all-targets` fails.
- Fix SignedBigInt PartialEq/Ord inconsistency: +0 and -0 now compare
  equal, matching the Ord impl (consistent with SignedBigIntHi32)
- Remove ark_serialize impls from Limbs, SignedBigInt, SignedBigIntHi32
  (unused outside tests)
- Move BigInt<->Limbs conversion from limbs.rs into arkworks/mod.rs as
  From impls, eliminating all arkworks references from limbs.rs and
  signed/ modules
- Delete dead code: fmadd_trunc, R2, mac_no_carry, from_barrett_reduce,
  mul_by_hi_2limbs, mul_u64_accumulate
- Comply with workspace lints (allow_attributes, unwrap_used, expect_used)
@0xAndoroid 0xAndoroid force-pushed the jolt-v2/jolt-field branch from 15bbf97 to 327de42 Compare April 3, 2026 19:21
The previous dedup checked for the no-spec label, which races with the
label job. Check for an existing warning comment instead.
Copy link
Copy Markdown
Collaborator

@0xAndoroid 0xAndoroid left a comment

Choose a reason for hiding this comment

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

lgtm

@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 3, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedlibfuzzer-sys@​0.4.124710093100100

View full report

- Remove unused `digest` workspace dependency
- Remove non-canonical `authors` field from jolt-field
- Merge `arkworks` feature into `bn254` (single feature)
@0xAndoroid 0xAndoroid force-pushed the jolt-v2/jolt-field branch from 9ebe5ef to 483c23d Compare April 3, 2026 20:47
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Benchmark comparison (crates)

No baseline found — skipping comparison.

@0xAndoroid 0xAndoroid merged commit 18bfa50 into main Apr 3, 2026
25 checks passed
@0xAndoroid 0xAndoroid deleted the jolt-v2/jolt-field branch April 3, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-spec PR has no spec file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants