Repository navigation
GrayNFS v0.2.6
0.x carries no compatibility promise.
Highlights
- WASM clock restoration (correctness fix): the wasm
Instantbackend moved from theDatewall clock to monotonicperformance.now(), andelapsed()now diffs against a freshnow()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; theis_probable_primehot 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/--resumeplus Python support, collector-state serialization with checksum and version, corrupt and version-mismatched files refused. - SNFS as a GNFS special-form path (
methodstaysgnfs): 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
ResourceLimitfailure path is no longer pinned by CI; the native suite still coversResourceLimitextensively.
What's changed
- Clock: monotonic
performance.now()backend via js-sys Reflect withDate.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 > 0and wall-clock bounds plus per-stage ranges (theelapsedMs == 0hole is closed); newwasm-build-smokeCI job (wasm check + wasm-pack build + Node smoke); version/api-surface scripts extended to the wasm crate and JS signatures. - SNFS:
snfs.rseligibility gate andx^k +/- a^{k-1},m = a*bconstruction with the scaled identityf(m) == a^{k-1} * N;gnfs_divisor_with_polynomialengine reuse with scoped abs-norm handling; 61-97-bit corpus (8 entries, degrees 3/4/5, both signs); same-budget A/B evidence inbench/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
Falseclarified 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@v2does not exist);needless_range_loopiterator 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 cleanResourceLimitunder load (either-outcome gate, 3 consecutive exit-0 runs covering both paths). - Full gates on the tagged tree: fmt clean, clippy
-D warningsclean,cargo test --workspaceall green, pytest 67 passed on the attached wheel,check_version9/9,check_api_surface16/16,check_invariants32/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