docs(js-verifier): add ADR 0001 and high-level architecture for JS bl…#1
Draft
piotrswierzy wants to merge 1 commit intofeat/js-tss-verifier-spikefrom
Draft
docs(js-verifier): add ADR 0001 and high-level architecture for JS bl…#1piotrswierzy wants to merge 1 commit intofeat/js-tss-verifier-spikefrom
piotrswierzy wants to merge 1 commit intofeat/js-tss-verifier-spikefrom
Conversation
…ock verifier library Proposes productizing the JS/TS TSS verification spike as @hiero-ledger/block-verifier, a pure-JS library for verifying HIP-1056 blocks in browsers and Node. ADR 0001 captures the P0 design decisions: single package with subpath exports, shallow parsing as an architectural invariant, pluggable crypto backend (noble default), pure JS with no native deps, targeting 1.0 with full P0 coverage (hash-only, Schnorr, WRAPS, hinTS). Includes a spike-findings section documenting tractability results, ArkWorks/serialization quirks that must be preserved (G1/G2 compressed flags, BLS12-381 Fr TWO_ADIC_ROOT, expand_message_xmd z_pad=48, Fp2 ordering, hinTS sizes), and the reasons snarkjs is unusable for WRAPS. The architecture document covers P0 (ships in 1.0) and P1 (block-contents inclusion proofs), with P2 (smart-contract verification) deferred to a follow-up ADR. Documents the module layering, the CryptoBackend injection contract, the public API surface, non-functional targets, and open questions around npm scope, repo carve-out, and P1 field-level proof scope. Relates-to: hiero-ledger#2323 Signed-off-by: Piotr Swierzy <piotr.swierzy@blockydevs.com>
4 tasks
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
Proposes productizing the JS/TS TSS verification spike as a pure-JS library,
@hiero-ledger/block-verifier, that lets browsers and Node runtimes verify HIP-1056 blocks end-to-end.Adds two design documents on top of the spike:
No code changes — docs only on top of the spike.
Context
Issue hiero-ledger#2323 asks for a JS/TS alternative to the Java-native verifier so the web3 community can verify blocks without a Rust/JNI dependency. The spike (PR hiero-ledger#2411) proved all three proof paths — Schnorr, WRAPS (Groth16+KZG on BN254), hinTS (BLS12-381, 10/10 checks) — are tractable in pure JS with
@noble/curves. With no known blockers remaining, the next step is turning the spike into a versioned, production-quality library.Key decisions (see ADR 0001 for rationale)
@hiero-ledger/block-verifierwith subpath exports (/codec,/hasher,/crypto) — one-install DX, tree-shakeable for bundle-conscious browser users.BlockUnparsedwire bytes, keepBlockItemUnparsedbytes as-is for hashing, deep-decode only control-plane messages. Matches Java block-node; decode-and-reencode was proven to break Merkle roots in the spike.CryptoBackendinterface, never directly on a curve lib. Default noble-based impl bundled; WASM/native backends can drop in without a major bump.TWO_ADIC_ROOT,expand_message_xmd z_pad=48, Fp2 ordering, hinTS VK/sig sizes, why snarkjs is unusable for WRAPS).Scope
Open questions for reviewers
@hiero-ledgerpackages/vs. standalone repo)Test plan
Relates-to: hiero-ledger#2323
Builds-on: hiero-ledger#2411