Skip to content

add mobench support to ProveKit main#429

Open
dcbuild3r wants to merge 1759 commits into
mainfrom
dcbuild3r/main-mobench-fixtures
Open

add mobench support to ProveKit main#429
dcbuild3r wants to merge 1759 commits into
mainfrom
dcbuild3r/main-mobench-fixtures

Conversation

@dcbuild3r
Copy link
Copy Markdown
Collaborator

@dcbuild3r dcbuild3r commented Apr 30, 2026

Summary

  • add main-based mobench fixtures for passport, OPRF, and P-256 bigcurve
  • run BrowserStack triad profile across Vivo Y21, Pixel 7, S24 and iOS fallback triad
  • fix Android prove timing so fixture clone/setup is outside the measured prove span
  • use jemalloc as the Android fallback allocator under the native C FFI allocator
  • harden Android incomplete-fixture reporting with timeout/build/kill-evidence fields

Android mobench fix note

The previous failing run was https://github.com/worldfnd/provekit/actions/runs/26007468825. The missing Vivo Y21 monolithic cell did not recover a BrowserStack session payload or summary.json; available artifacts only show the BrowserStack fetch timeout after 7200s for build c943753d95fd0b34f5775aa0a3bc6ff58cbcc3ca. I grepped the recovered Android artifacts and job log for lowmemorykiller, Process * was killed, oom_reaper, SIGKILL, and abnormal signal text; there was no hit because BrowserStack did not return the killed session logs for that cell.

Before/failure memory from that run:

  • Vivo Y21 OPRF: 328 MB process peak, 10.061s
  • Vivo Y21 fragmented age check: 1187 MB process peak, 65.342s
  • Vivo Y21 monolithic age check: no row; BrowserStack timeout/no summary
  • S24 OPRF: 426 MB process peak, 2.809s

What changed:

  • Android and iOS now use the same semantic boundary for prove benches: per-iteration fixture setup happens before the measured closure, and profile_phase("prove") wraps only the prover entry point. Previously prepared.clone() ran inside profile_phase("prove"), so clone cost and peak memory were charged to proving.
  • Android native C FFI fallback allocation now routes through jemalloc instead of Bionic malloc when no host callback/mmap allocator is active.
  • If BrowserStack returns no summary, failure.json now records attempts, fetch timeout seconds, build id, and any LMK/OOM/SIGKILL lines recovered from attempt/device logs.

After numbers: pending the fresh BrowserStack rerun on this commit.

Validation

  • cargo fmt --all
  • cargo test -p bench-mobile --lib
  • cargo test -p bench-mobile --test examples_smoke
  • cargo test -p bench-mobile --test passport_smoke
  • cargo check -p provekit-ffi --target aarch64-linux-android with NDK 26.1 aarch64-linux-android34-clang
  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/mobile-bench-reusable.yml")'
  • git diff --check

xrvdg and others added 30 commits April 2, 2026 14:15
Current WHIR doesn't support out of order NTT.
fix: binop width selection to preserve byte semantics [LA-D]
fix: bind evals to transcript [LA - K]
…calization-main

fix: canonicalize duplicate witness terms in R1CS constraints [LA - C]
fix: bind RSA public exponent to fixed values [LA-E]
…anges

Fix :  Unbound LogUp Transcript Challenges Let the Prover Choose Lookup Randomness [LA-G]
…erived-indices

Fix : Unchecked Witness-Derived Indices Cause Deterministic Prover Panics in RAM and Multiplicity Builders [LA-H]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bench Run mobile benchmarks on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants