Skip to content

[enhancement]: proveAncestor in the WebAssembly package #26

Closed

Description

@samjay8

Context

prove_ancestor (behind externalize ancestry) proves an older ledger from a certified one and archived headers. Browsers and Node can't do this yet, so a wallet holding one fresh proof can't check a ledger from last week.

Scope

  • Export proveAncestor(bundleJson, headerFiles, ledger) from crates/externalize-wasm. headerFiles is an array of Uint8Arrays, the gzipped ledger-*.xdr.gz contents.
  • Return report::ancestry ({ verified: true, ledger, via, links }) or { verified: false, error }, the same never-throws contract as verify, and add its TypeScript type next to VerifyReport.
  • Decode with archive::read_gz_frames. Check that the wasm stays under CI's 1 MB size limit.

Done when

  • tests/node.cjs proves 64791250 from the fixture bundle and both fixture header files, and rejects with only the newer file.
  • The .d.ts declares the function with its typed result.

Comment to be assigned before starting. Read CONTRIBUTING.md for the checks this repository runs.

Activity

  1. added
    enhancement
    complexity:medium
    Stellar Wave
    on Oct 26, 2026
  2. khoap1220-hue commented on Oct 26, 2026

    @khoap1220-hue
    Contributor

    Hi @Externalize-Labs, I would like to work on #26 once assigned! I traced the root cause in crates/externalize-wasm, tests/node.cjs, .d.ts (prove_ancestor, externalize ancestry, proveAncestor(bundleJson, headerFiles, ledger)) and have a clean, isolated fix ready to implement.

    Proposed Implementation Plan:

    1. Core Implementation (crates/externalize-wasm, tests/node.cjs, .d.ts): Export proveAncestor(bundleJson, headerFiles, ledger) from crates/externalize-wasm. headerFiles is an array of Uint8Arrays, the gzipped ledger-*.xdr.gz contents.
    2. Edge-Case & Contract Validation: Return report::ancestry ({ verified: true, ledger, via, links }) or { verified: false, error }, the same never-throws contract as verify, and add its TypeScript type next to VerifyReport; Decode with archive::read_gz_frames. Check that the wasm stays under CI's 1 MB size limit.
    3. Verification & Tests: Verify via unit and regression tests covering: tests/node.cjs proves 64791250 from the fixture bundle and both fixture header files, and rejects with only the newer file; The .d.ts declares the function with its typed result.

    ETA: Clean, tested pull request ready within 4–6 hours of assignment.

  3. added a commit that references this issue on Oct 26, 2026
    25ee935
  4. samjay8 commented on Oct 29, 2026

    @samjay8
    ContributorAuthor

    @khoap1220-hue assigned to you, go ahead. Open a PR that says Closes #26; once CI and the checks pass it will be reviewed and merged.

  5. added a commit that references this issue on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar Wavearea/wasmcomplexity:mediumenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions