Skip to content

v0.2.6

Latest

Choose a tag to compare

@jake1104 jake1104 released this 13 Nov 11:41

GrayNFS v0.2.6

0.x carries no compatibility promise.

Highlights

  • WASM clock restoration (correctness fix): the wasm Instant backend moved from the Date wall clock to monotonic performance.now(), and elapsed() now diffs against a fresh now() instead of itself (it returned zero by construction). The ECM second tranche and the pilot cost model are correct on wasm again.
  • ECPP primality proofs live: is_prime_proof(method="ecpp") produces and verifies certificates at 64-128 bits (12/12 primes certified, 9/9 composites declined, zero disagreements vs BPSW/Frobenius; release 128-bit prove ~3.5 s, ms-scale verify). The 64-bit AKS cap is kept; the is_probable_prime hot path is untouched.
  • Batch throughput: streaming input reads (300k-line RSS 28.6 to 6.8 MB), --jobs / factor_batch(max_workers=) bounded parallelism preserving input order with memory-budget queuing.
  • GNFS checkpoint/resume: --checkpoint/--resume plus Python support, collector-state serialization with checksum and version, corrupt and version-mismatched files refused.
  • SNFS as a GNFS special-form path (method stays gnfs): engine reuse with scoped unit handling, honest negative result — the large-form showdown (48 runs) went 0 SNFS / 1 generic / 7 voided on usable-relation starvation, so the scope is narrowed to small special forms in docs.
  • Browser Web Worker demo with cancel-by-terminate, diagnostics and wall-clock display.
  • Version-marking release 0.2.5 to 0.2.6; benchmark cells unchanged.

Breaking changes

  • None for the native Rust, Python or CLI surface behavior: every addition is additive-only (--jobs, --checkpoint/--resume, --no-snfs, use_snfs, max_workers, method="ecpp"), all with defaults preserving existing behavior.
  • WASM smoke expectation: the hostile105-budget case now accepts a product-verified ECM win inside the 1000 ms budget (single-thread wasm solves it in ~520-600 ms since the clock fix). The wasm ResourceLimit failure path is no longer pinned by CI; the native suite still covers ResourceLimit extensively.

What's changed

  • Clock: monotonic performance.now() backend via js-sys Reflect with Date.now() fallback; wasm regression pins (nonzero-elapsed, monotonic tick, add/sub round-trip); ECM-tranche and pilot-cost pins proving the control flow.
  • Smoke + CI: elapsedMs > 0 and wall-clock bounds plus per-stage ranges (the elapsedMs == 0 hole is closed); new wasm-build-smoke CI job (wasm check + wasm-pack build + Node smoke); version/api-surface scripts extended to the wasm crate and JS signatures.
  • SNFS: snfs.rs eligibility gate and x^k +/- a^{k-1}, m = a*b construction with the scaled identity f(m) == a^{k-1} * N; gnfs_divisor_with_polynomial engine reuse with scoped abs-norm handling; 61-97-bit corpus (8 entries, degrees 3/4/5, both signs); same-budget A/B evidence in bench/snfs/.
  • Batch: streaming reader keeping the 6-key JSONL schema; order-preserving bounded workers with per-job CPU assignment and memory-budget queuing.
  • Checkpoint: PartialBank, pending maps, union-find, coordinates, position, polynomial and factor-base persisted with checksum and version; tamper/version/n-mismatch refusal; batch rejects checkpoint flags.
  • Primality: over-64-bit AKS False clarified as unproven-not-composite; ECPP certificate design (verifier-first), reduced prover, integration, release timings.
  • Docs: README first line is an integer-factorization engine with SIQS (degree 2) and GNFS (degrees 3-5); 512 MiB documented as a soft estimate-based guard; Worker demo linked.
  • CI/toolchain fixes: wasm-pack installed via taiki-e/install-action (jetli/wasm-pack-action@v2 does not exist); needless_range_loop iterator forms for the new stable (behavior-neutral).

Benchmarks

  • Native CI smoke gate (release, 16 threads, medians of 5, binary 1aef3eab, 2026-11-12): OVERALL PASS 4/4, all product-verified - bit100-deg2 siqs 1878/945 med 192.0 (limit 322.5), bit100-default ecm med 98.0 (limit 197.5), hostile105-deg2 siqs 1177/926 med 618.0 (limit 4290.0), deg3skip-deg2 siqs 240/145 med 18.0 (limit 45.0).
  • SNFS showdown (release, 1 thread, 120 s budget, 3 reps per arm, 48 runs): 0 SNFS cells / 1 generic (E1, generic 3/3 ~44 s) / 7 voided (systematic relation-deadline or memory walls both arms); every completed run product-verified.
  • ECPP (release): 12/12 primes certified and verified, 9/9 composites declined, zero cross-verification disagreements; 128-bit prove ~3.5 s, verify milliseconds.
  • WASM smoke on the tagged tree: 3/3 PASS, version: 0.2.6; hostile105 either a product-verified ECM win (~520-600 ms) or a clean ResourceLimit under load (either-outcome gate, 3 consecutive exit-0 runs covering both paths).
  • Full gates on the tagged tree: fmt clean, clippy -D warnings clean, cargo test --workspace all green, pytest 67 passed on the attached wheel, check_version 9/9, check_api_surface 16/16, check_invariants 32/32.
  • Standing pins held exact: 1878/945, 1177/926, 240/145, 3023/2160 standing (3677/2419 historical), b70-deg3 5062/3698 observed-only.

Full Changelog: v0.2.5...v0.2.6