feat: implement WebAssembly Merkle Tree Module for client-side proof …#76
Merged
Merged
Conversation
Resolved a strict mode violation in the 'container-queries.spec.ts' Playwright test where `getByText("Live Telemetry")` matched both the section heading and the loading text span. Updated the locator to use an exact string match to ensure reliable test execution on CI.
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.
Description
Implement a WebAssembly (WASM) based Merkle Tree module to significantly improve client-side performance for tree construction and proof generation. This introduces a Rust-compiled WASM implementation along with a Web Worker wrapper to offload heavy cryptographic operations from the main thread.
Closes #62
Changes Made
rust/merkle/compiled to WebAssembly.src/utils/wasmLoader.tsto reliably fetch and instantiate the compiled.wasmbinary.src/utils/merkleWasm.tsto handle memory allocation and provide a clean TypeScript interface to the WASM exports (buildTree,generateProof,verifyProof).src/utils/merkleTree.tsto route calls through the WASM module if available, or fall back to a JavaScript stub if initialization fails.src/workers/merkleWorker.worker.tsto execute Merkle tree tasks entirely off the main UI thread, using transferable ArrayBuffers for zero-copy performance.src/tests/merkleWasm.bench.ts) to track and enforce minimum hash rates and proof generation times.vitest.config.tsto include.bench.tsfiles in the test suite.Verification