Skip to content

Roadmap: browser-native Bitcoin node (epic) #1

@melvincarvalho

Description

@melvincarvalho

The tracking issue for building a browser-native Bitcoin node on the bitcoin-kernel engine. Background and the full architecture/perf model: bitcoin-kernel.github.io#1.

Principle: every step is gated by a benchmark

We do not build on guesses. Each milestone ships with a measured number, and the whole plan is re-checked against M0's results before we commit to the expensive parts.

Usable first, trustless later (resource tiers)

Opt into more resource to trust less. Tiers are designed in from day one, not bolted on.

Tier Does Cost Device
0 Lite headers + Neutrino wallet (BIP 157/158) ~100 MB, minutes phone
1 Validating assumeutxo snapshot, validate new blocks live a few GB laptop
2 Full backfill genesis to tip, fully trustless ~650 GB, lots of RAM desktop

Trust ladder: headers (PoW) -> filters/SPV (light) -> assumeutxo (one hash) -> backfill complete (trustless).

Three pillars

  1. Storage: OPFS, synchronous access handles in a Worker. (OPFS works on gh-pages with no special headers.)
  2. Compute: WASM-SIMD secp256k1 + Web Workers; UTXO set in RAM, no DB in the hot path.
  3. Networking: a small local WebSocket-to-TCP bridge. A browser cannot open raw TCP. WebRTC/WebTorrent block-swarming is a later decentralization layer, not the MVP.

Milestones

  • M0 — Benchmarks. Measure WASM-secp, SHA256, OPFS, and SharedArrayBuffer on real data before any app code. These numbers decide everything.
  • M1 — Headers + the bridge (Tier 0 foundation). Local TCP shim, headers-first sync to tip with full PoW/difficulty validation, persisted and resumable in OPFS.
  • M2 — Light wallet (Tier 0). BIP 158 filter scan backwards from tip; build a wallet's UTXO/history; verify inclusion via SPV.
  • M3 — assumeutxo (Tier 1). Load a hash-checked UTXO snapshot; validate new blocks forward (WASM workers, UTXO in RAM).
  • M4 — Backfill (Tier 2). Validate genesis to snapshot in the background; flip the UI from trusted snapshot to fully validated.
  • M5 — Durability / PWA. Persistent storage, installable, survives restart, resumes.

Known gh-pages gotchas to resolve along the way: SharedArrayBuffer needs COOP/COEP (service-worker workaround, or skip SAB initially); the TCP bridge is a separate local download, not hosted.

Sub-issues are filed per milestone, starting with M0. Non-goals: archival serving, mining, mempool/relay policy, matching native speed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions