Skip to content

chore: align library MSRVs to Rust 1.88 - #2

Merged
ValarDragon merged 4 commits into
mainfrom
agent/bump-msrv-to-1-88
Aug 12, 2026
Merged

ValarDragon merged 4 commits into
mainfrom
agent/bump-msrv-to-1-88

Conversation

@ValarDragon

@ValarDragon ValarDragon commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • align all 13 workspace crates on Rust 1.88, the highest MSRV already used
    by the imported libraries
  • add missing rust-version declarations to halo2_legacy_pdqsort and
    redjubjub
  • use stable development toolchains while checking Rust 1.88.0 explicitly in CI
  • fan shared workspace changes out to every upstream suite
  • add baseline tests, Clippy, and formatting for halo2_legacy_pdqsort and
    sinsemilla, whose upstream repositories have no CI workflows
  • keep stable Rust checks, MSRV checks, nightly formatting, tests, and valid
    cross-target builds on the PR path
  • move coverage, latest-dependency checks, and RedJubjub's rolling-nightly test
    to a post-merge, scheduled, and manually dispatchable maintenance workflow
  • remove API documentation builds from CI
  • update existing README MSRV documentation and affected changelogs
  • apply current Clippy and rustfmt fixes to Sapling and legacy pdqsort code

Why

The combined workspace already contains Rust 2024 crates that require Rust
1.88. Older crate-specific MSRVs do not provide a usable workspace-level
guarantee because their Cargo versions cannot parse newer workspace members.

The initial imported CI installed cross targets for stable or Rust 1.85.1 while
the repository toolchain selected Rust 1.88. Cargo therefore could not find
core for i686, WASI, WASM, or Thumb targets. CI now selects the exact intended
toolchain.

Two upstream checks do not fit this combined-workspace model and are omitted:

  • Halo2's wasm32-unknown-unknown build relies on target-specific
    dev-dependency feature unification from its standalone resolver context.
  • Sapling's bare-metal Thumb build pulls its unconditional lazy_static
    dependency with std; its WASI no_std build remains enabled.

Impact

Downstream users of every crate in this repository now require Rust 1.88 or
newer. There are no Rust symbol, signature, trait, enum, feature, constructor,
or visibility changes.

Validation

  • all 13 packages report rust-version = 1.88 through cargo metadata
  • cargo +1.88.0 check --workspace --locked --all-features --all-targets
  • cargo +stable check --workspace --locked --all-features --all-targets
  • package-scoped stable Clippy, including strict Sapling and Orchard checks
  • feature-by-feature Clippy for the imported librustzcash crates
  • cargo +nightly fmt --all -- --check
  • baseline tests for halo2_legacy_pdqsort and sinsemilla
  • Rust 1.88.0 WASI builds for Halo2 and sapling-crypto
  • actionlint for all modified workflows
  • git diff --check

@ValarDragon
ValarDragon marked this pull request as ready for review August 11, 2026 11:40
@ValarDragon
ValarDragon force-pushed the agent/bump-msrv-to-1-88 branch from ab928fd to ef57040 Compare August 11, 2026 22:34
Comment thread rust-toolchain.toml
@@ -0,0 +1,3 @@
[toolchain]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe just delete the rust-toolchain.toml?

@ValarDragon
ValarDragon merged commit 6c006bb into main Aug 12, 2026
79 checks passed
@ValarDragon
ValarDragon deleted the agent/bump-msrv-to-1-88 branch August 12, 2026 11:53
ValarDragon added a commit that referenced this pull request Aug 12, 2026
Batch the public same-scalar multiplications in each IPA generator-collapse round so Pasta curves can reuse GLV decomposition and table setup.

Enable the vendored pasta_curves glv feature. The stack inherits Rust 1.88 from #2.

Co-Authored-By: OpenAI Codex <[email protected]>
ValarDragon added a commit that referenced this pull request Aug 12, 2026
Batch the public same-scalar multiplications in each IPA generator-collapse round so Pasta curves can reuse GLV decomposition and table setup.

Enable the vendored pasta_curves glv feature. The stack inherits Rust 1.88 from #2.

Co-Authored-By: OpenAI Codex <[email protected]>
ValarDragon added a commit that referenced this pull request Aug 12, 2026
Batch the public same-scalar multiplications in each IPA generator-collapse round so Pasta curves can reuse GLV decomposition and table setup.

Enable the vendored pasta_curves glv feature. The stack inherits Rust 1.88 from #2.

Co-Authored-By: OpenAI Codex <[email protected]>
dorianvp pushed a commit to auzum197/halo2 that referenced this pull request Sep 2, 2026
Batch the public same-scalar multiplications in each IPA generator-collapse round so Pasta curves can reuse GLV decomposition and table setup.

Enable the vendored pasta_curves glv feature. The stack inherits Rust 1.88 from zakura-core/common#2.

Co-Authored-By: OpenAI Codex <[email protected]>
dorianvp pushed a commit to auzum197/halo2 that referenced this pull request Sep 13, 2026
Batch the public same-scalar multiplications in each IPA generator-collapse round so Pasta curves can reuse GLV decomposition and table setup.

Enable the vendored pasta_curves glv feature. The stack inherits Rust 1.88 from zakura-core/common#2.

Co-Authored-By: OpenAI Codex <[email protected]>
dorianvp pushed a commit to auzum197/halo2 that referenced this pull request Sep 13, 2026
Batch the public same-scalar multiplications in each IPA generator-collapse round so Pasta curves can reuse GLV decomposition and table setup.

Enable the vendored pasta_curves glv feature. The stack inherits Rust 1.88 from zakura-core/common#2.

Co-Authored-By: OpenAI Codex <[email protected]>
ValarDragon pushed a commit that referenced this pull request Nov 1, 2026
)

* perf(sapling-crypto)!: hold value commitments as bytes, not points

Parsing a Sapling bundle decompressed every spend's and output's cv into a
Jubjub point - a field square root each, plus a small-order check - and every
consumer short of proof and binding-signature verification then compressed it
straight back: the txid digest (cv().to_bytes() is the only field the digest
re-serialises from a parsed point), the outgoing cipher key (prf_ock), the
sighash, serialisation. Profiled on a wallet's memo backfill, that round trip
was 26% of all CPU.

ValueCommitment now keeps its 32 bytes. to_bytes() returns them; try_point()
decompresses and checks small order on demand, by value; derive() computes the
point once and stores its encoding; from_bytes_unvalidated() is the parser's
constructor and from_bytes_not_small_order() still validates eagerly for callers
that want that. The verifier calls try_point() and fails closed on an invalid
encoding, and CommitmentSum takes the point rather than the commitment, so the
callers that need arithmetic validate first. The consensus checks move from
parse time to verification time, where a node checks the description anyway.

Microbenchmark over 30,752 testnet transactions (110 MB; 3,339 Sapling spends,
11,462 outputs): Transaction::read 1.930 s to 0.993 s, 1.94x; 130 to 67 us per
Sapling description. The wallet crates read cv as bytes only (prf_ock,
serialisation), so they need no change; as_inner()'s only caller in this
repository is the verifier.

BREAKING CHANGE: ValueCommitment::as_inner() is removed (use try_point());
CommitmentSum's AddAssign/SubAssign take &jubjub::ExtendedPoint; a parsed cv is
no longer validated at parse time.

* docs(changelog): fragment for #2

* fix(sapling-crypto)!: sum value commitments fallibly with CommitmentSum::try_sum

The Add, Sub and Sum impls over ValueCommitment decoded each point with an
expect. Transaction::read now yields unvalidated commitments, so summing the
cvs of a parsed transaction could panic. Replace them with
CommitmentSum::try_sum, which returns None on an invalid commitment; the
builder expects on its own commitments and the PCZT IO finalizer returns
ValueCommitMismatch.

Correct the ValueCommitment doc on network data, and test that try_point
accepts exactly the encodings parsing used to accept.

* test(zcash_primitives): an invalid Sapling cv parses and fails verification

Corrupt a spend cv and an output cv of a valid testnet transaction, first
to the identity and then to bytes off the curve. The transaction still
reads and round-trips, and the batch validator, the single verifier and
CommitmentSum::try_sum all reject it.

* docs(changelog): fragment for #638
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.

2 participants