feat: port MPF write path to WASM with browser demo#147
Merged
Conversation
735672a to
09d26fb
Compare
This was referenced Apr 22, 2026
93a7c06 to
d3d37ac
Compare
082bc9b to
7db9201
Compare
Contributor
|
Verify demo (read side): https://lambdasistemi-haskell-mts-pr-147.surge.sh |
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.
Refs #146
Summary
This PR carries the full MPF browser-write stack on top of
main.The original proof-layer blocker is resolved: MPF exclusion proofs with Aiken proof-format parity landed via #150 and are part of this branch history. On top of that, this PR wires the proof surface through the WASM executables, the browser demo, the docs site, and the preview deployment.
The latest fixes in this branch also close the last integration gap in the browser demo: the MPF write side now routes raw query keys through the same Aiken
blake2b_256(key)trie path that the verifier expects, so inclusion proofs generated bympf-write.wasmverify correctly inmpf-verify.wasm.What Changed
Pure MPF / Aiken parity
MPF.Hashes.mkMPFHashthrough the pure Blake2b path used bycsmt-verifymts:mpf-writewhile keepingmts:mpfas the native re-export shimMPF.Verifyverification for exact Aiken proof-step CBOR, covering both inclusion and exclusionWASM executables
mpf-write-wasmMPFInMemoryDBptype, and Aiken proof bytesmpf-verify-wasm0= inclusion1= exclusion0xff= no proof because the forest is emptyBrowser demo and packaging
verifiers/browser-write-mpf/mpf-verify.wasmmpf-wasm-write-demoinflake.nixnix/docs.nixand stage all three demos into the MkDocs siteWASM dependency cleanup
memory/basementdependency frommpf-writeByteStringwasm32-wasicross-build succeed instead of only the native-fwasmcomponent buildLint cleanup
HLintblockers in the touched verifier and test modules so CI can pass on the merge commitVerification
nix develop --quiet -c cabal build -O0 -fwasm exe:mpf-verify-wasm exe:mpf-write-wasmnix develop --quiet -c just hlintnix develop --quiet -c just test 'MPF.Verify'./dist-newstyle/build/x86_64-linux/ghc-9.8.4/mts-0.4.0.0/t/unit-tests/build/unit-tests/unit-tests --match MPF.Verify./dist-newstyle/build/x86_64-linux/ghc-9.8.4/mts-0.4.0.0/t/unit-tests/build/unit-tests/unit-tests --match MPF.Blake2b./dist-newstyle/build/x86_64-linux/ghc-9.8.4/mts-0.4.0.0/t/unit-tests/build/unit-tests/unit-tests --match MPF.Proof.Insertion./dist-newstyle/build/x86_64-linux/ghc-9.8.4/mts-0.4.0.0/t/unit-tests/build/unit-tests/unit-tests --match MPF.ProofCompatkey=a, value=ayieldsptype=0, proof9fff, verifier exit0key=a, value=byieldsptype=0, proof9fff, verifier exit0nix build .#mpf-wasm-write-demonix build .#docsdemo-write-mpf/index.html,mpf-write.wasm, andmpf-verify.wasmReview Guidance
Start here:
specs/004-mpf-wasm-write-demo/lib/mpf-write/MPF/Proof/Exclusion.hslib/mpf-write/MPF/Verify.hsapp/mpf-write-wasm/Main.hsapp/mpf-verify-wasm/Main.hsverifiers/browser-write-mpf/nix/wasm.nixnix/docs.nixflake.nixRemaining State
The branch is up to date and ready to merge once CI is green.