Repository navigation
Dependency sweep: drop unused deps, consolidate rand on 0.10, refresh lockfile - #206
Conversation
…ve aggregator rayon to dev-deps cargo-machete plus a manual sweep found: - common: rand was declared (optional, enabled by std) but never used - wormhole/circuit: hex never used - ownership/tests: anyhow, hex, qp-ownership-inputs never used - aggregator: rayon only used by the public_batch_compare example since the rayon code paths were removed in #94; multithread is kept as a no-op feature so downstream manifests keep resolving Co-authored-by: illuzen <illuzen@users.noreply.github.com>
…futures with pollster - clap 4.6.1 -> 4.6.7, serde_json 1.0.150 -> 1.0.154, libc 0.2.186 -> 0.2.191, zeroize 1.8.2 -> 1.9.1 - futures (executor only, dev/test/bench/example code) -> pollster 1.0.1, a zero-dependency block_on; drops five futures-* crates from the native build - env_logger stays at 0.11.9: 0.11.10+ need log ^0.4.29 while qp-plonky2 pins log =0.4.28 Co-authored-by: illuzen <illuzen@users.noreply.github.com>
…ptest to 1.12 The tree carried three rand lineages: 0.8 (aggregator, circuit-builder, common), 0.9 (tests + proptest 1.11) and 0.10 (qp-plonky2). Moving our code to 0.10 removes rand 0.8/0.9, rand_core 0.6/0.9, rand_chacha 0.3/0.9, getrandom 0.2/0.3, ppv-lite86, wasi and r-efi 5 from the build. API changes: thread_rng() -> rng(), Rng -> RngExt, gen() -> random(). StdRng output is unchanged (rand 0.10 switched the backing crate to chacha20 but kept the stream), so the seeded test vectors are unaffected. proptest 1.12 is the first release on rand 0.10. Its bit-vec 0.10 dependency has weak features that make borsh/toml_edit appear in Cargo.lock without ever being built (cargo tree --target all confirms). Co-authored-by: illuzen <illuzen@users.noreply.github.com>
Lockfile shrinks from 265 to 246 packages (the wit-bindgen/wasm-encoder tooling chain behind old wasip2/wasip3 drops out). Exact-pinned direct deps and everything qp-plonky2 pins are unchanged. Co-authored-by: illuzen <illuzen@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: Approve
Reviewer: GPT-6.1 Sol
Reviewed the complete diff from 080bc897108e4aed3e315ccd9229bbbbcdb1c9f2 to 40b323452ed2b46a90ff3709fccf77d4a29601d8. No blocking correctness, security, or compatibility findings.
The removed dependencies have no remaining code consumers. The rand migration retains the cryptographic thread-local generator for dummy nullifier preimages and proof shuffling, and the explicit thread_rng feature includes the required generator/seeding features. The executor replacement covers all former futures::executor::block_on calls. The aggregator keeps multithread available, with its remaining direct rayon use correctly covered by the example's dev-dependency. Dependency requirements fit the pinned Rust 1.93 toolchain.
Validation in an isolated detached worktree:
cargo check --workspace --all-targets --all-features --lockedpassed, including GPU-enabled examples, benches, and tests.- Release tests passed:
qp-wormhole-circuitheap zeroization and formal trace (3);testsencoding safety and spec differential (19);ownership-tests(11);qp-wormhole-circuit-builder(11). Total: 44 passed. cargo check --locked --no-default-features --target wasm32v1-nonepassed for both verifier crates and both inputs crates.cargo +nightly fmt --all -- --check,taplo format --check --config taplo.toml, locked workspace metadata, andgit diff --checkpassed.cargo tree --locked --target all -i borshconfirms borsh is not in the active dependency graph.
Limits: the broader release aggregation run (--lib -- circuit_logic dummy) was terminated by timeout 60 after many passing tests; no failure was observed, but that run is incomplete. GPU hardware execution was not tested. cargo audit could not run because cargo-audit is not installed. At the latest CI check, format, Clippy/docs, Lean, formal bridge, security audit, and Actions CodeQL passed; workspace tests, slow crypto tests, and Rust CodeQL were still running.
Its rayon code paths were removed in #94; parallelism comes from qp-plonky2/parallel. Downstream manifests enabling the feature need to drop it. Co-authored-by: illuzen <illuzen@users.noreply.github.com>
Summary
Result of a full sweep over the workspace's dependencies (cargo-machete, cargo-audit,
cargo tree --duplicates, crates.io for every direct dep). This PR contains the changes that are low-risk and verifiable here; wgpu 27 → 30 is a separate PR stacked on this one, and the remaining items (criterion 0.5 → 0.8, upstream qp-plonky2 pins) are listed at the bottom as follow-ups.Lockfile: 265 → 246 packages.
cargo auditis down to one advisory (paste, macOS-only viametal←wgpu-hal 27; fixed by the wgpu PR).Removed
randcommon(optional, enabled bystd)hexwormhole/circuitanyhow,hex,qp-ownership-inputsownership/testsrayon(as optional prod dep)wormhole/aggregatorpublic_batch_compareexample, so it moved to dev-depsmultithreadfeaturewormhole/aggregatorqp-plonky2/parallel). Breaking for downstream manifests that enable it — they need to drop the feature.futures(executor only)aggregator,gpudev-depsblock_onin tests/benches/examples; replaced with zero-dependencypollster 1.0.1, dropping fivefutures-*crates from the native buildUpgraded
randqp-plonky2; removes the 0.8 and 0.9 lineages (rand, rand_core, rand_chacha, getrandom ×2, ppv-lite86, wasi, r-efi 5). API renames only (thread_rng()→rng(),Rng→RngExt,gen()→random()).StdRngoutput is unchanged across 0.8 → 0.10, so seeded test vectors are unaffected.proptestbit-vec 0.10dep has weak features that makeborsh/toml_editappear inCargo.lockwithout ever being built (cargo tree --target allconfirms).zeroizeVecelements.wormhole/circuit/tests/heap_zeroization.rspasses.clapserde_jsonlibccargo update)chacha20 0.10.0with 0.10.2; everythingqp-plonky2pins is unchangedHeld back on purpose
env_logger0.11.10+ needslog ^0.4.29, butqp-plonky2pinslog =0.4.28. Stays at 0.11.9.serde1.0.229 andrand0.10.3:qp-plonky2pins=1.0.228/=0.10.1.criterion0.8.2 compiles with no code changes and removes theitertools 0.10duplicate, but pulls inalloca(C viacc),page_size,shlexinto the dev tree. Left as an opt-in.Verification
cargo clippy --workspace --all-targets --all-features --locked -- -D warningscleancargo +nightly fmt --all -- --check,taplo format --checkcleancargo docwarnings identical tomaincargo audit: onlyRUSTSEC-2024-0436(paste, pre-existing) remainsqp-wormhole-circuit(heap_zeroization,formal_trace),tests(encoding_safety,spec_differential),ownership-tests,qp-wormhole-circuit-builder,qp-wormhole-aggregator --lib circuit_logic dummyall pass;qp-wormhole-gpu --features constraint-exportcompiles (no GPU here to run it)qp-wormhole-verifier,qp-ownership-verifier,*-inputsstill build--no-default-features --target wasm32v1-none