Conversation
f2837b7 to
7a6d54e
Compare
Merged
Add provekit-wasm crate with wasm-bindgen bindings for browser-based proof generation. Gate mavros/witness-generation deps behind cfg(not(wasm32)). Fix binary parser HEADER_SIZE off-by-one (20→21). Enable shared memory via linker flags for wasm-bindgen-rayon threading. Includes wasm-demo playground with noir_js witness generation, multi-threaded proof computation, and platform-adaptive fallbacks for iOS/Android/desktop. complete_age_check (712k constraints): ~7s with 14 threads vs ~32s single-threaded (4.5x speedup).
… auto-loading WASM - Add WasmProver (.wpkp) and WasmVerifier (.wpkv) lightweight artifact formats - Add convert-wasm CLI command and --wasm flag on prepare - Enable in-browser proof verification via dedicated Verify Proof button - Auto-load WASM on page open, load .wpkp/.wpkv in parallel - WASM crate now accepts only .wpkp for proving and .wpkv for verifying
Rewrite setup.mjs to build WASM+CLI once and prepare both SHA256 and Poseidon circuits automatically (no arguments needed). Wire circuit selector in index.html to switch between circuits, sync window.activeCircuit for demo-web.mjs, and fix DOM cleanup bug that destroyed hidden proof elements on re-run.
…flow, and dashboard polish - Embed circuit artifact in .wpkp so browser needs only 3 files (prover.wpkp, verifier.wpkv, inputs.json) - Add getCircuit(), getNumConstraints(), getNumWitnesses() WASM bindings - Wire constraints and witnesses counts to dashboard metric cards - Add circuit descriptions that update per selected circuit - Unify custom upload steps to match standard 5-step pipeline - Fix icon observer for Loading/Verifying/Ready states - Fix serve.mjs directory import resolution for wasm-bindgen-rayon workers - Update CLI convert-wasm to accept circuit path for embedding
Eliminate the separate .wpkp/.wpkv WASM artifact formats. The WASM prover now deserializes the full Prover struct from .pkp (XZ) and Verifier from .pkv (Zstd) directly, reconstructing the circuit JSON for noir_js from the embedded program and ABI fields. - Rewrite WASM lib.rs to use ProverCore/VerifierCore with auto-detect XZ vs Zstd decompression (ruzstd StreamingDecoder) - Remove WasmNoirProver, WasmProver, WasmVerifier structs and all their Prove/Verify impls from common, prover, verifier crates - Delete convert-wasm CLI command and --wasm flag from prepare - Update demo to fetch .pkp/.pkv, accept .pkp/.pkv uploads
- provekit-wasm: extract prove_inner to deduplicate prove_bytes/prove_js, add version validation, shared header parser, proper error formatting, add getrandom03 dep and dependency comments - provekit-prover: deduplicate prove/prove_with_witness (507→374 lines), replace all panics/unwraps with Result propagation, prove_mavros takes [Vec<FieldElement>; 3] instead of Phase1Result - provekit-common: remove WASM dead-code stubs, cfg-gate mod json, add doc comment on NoirProver field duplication rationale - skyscraper/core: re-export compress_many to eliminate duplicated cfg blocks in pow.rs - skyscraper/hla: delete dead rust_simd_codegen.rs (428 lines, never declared in lib.rs) - skyscraper/bn254-multiplier: add inline(never) justification comment - wasm-demo JS: remove dead code, debug logs, redundant comments, extract shared artifact loading (587→455 lines) - Revert accidental verifier-server whitespace change - Remove /wasm-node-demo/ from .gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
provekit-wasm)Changes
ProverandVerifierclasses withproveBytes()APIUsage
cd playground/wasm-node-demo
pnpm install
pnpm run setup -- path/to/noir-circuit
pnpm run demo # Node.js
pnpm run demo:web # Browser (localhost:8080)
Blocked on #198