bitcoin-kernel / browser-node — running node (testnet4)

The capstone: one continuous pipeline. Headers stream from a real peer over the bridge; the UTXO set is bootstrapped from a snapshot; blocks are validated forward and applied — the engine, WASM secp, UTXO set and OPFS persistence all run in a Web Worker, and set-consistency is checked with a SwiftSync 32-byte accumulator (not the full UTXO set). ← the eleven acts, explained

idle

network
testnet4
engine: idle
header tip (live)
via WS↔TCP bridge
full-consensus window
every script + signature, in worker
UTXO set
RAM, checkpointed to OPFS
blocks validated
0
persistence
OPFS sync access handle
set consistency
SwiftSync · 32-byte accumulator

Three scopes, not one chain: header tip validates every header to the live tip · full-consensus window deep-checks a bounded range (scripts + signatures need the full UTXO set in RAM — the 25 GB wall) · set consistency (SwiftSync, 32 bytes) scales that check to the whole chain.

Honest scope: this runs the node's real loop over a bounded range of real testnet4 blocks. Reaching the live tip with the full UTXO set hits a memory wall — the whole 14.1M-coin set is ~25 GB, over a tab's limit. SwiftSync (act ⑪) removes it: validate set-consistency with a 32-byte accumulator instead of the set — now wired into this loop (the "set consistency" card above). What remains is applying it at scale: a large range / full IBD with a WebTorrent hints file + streamed prevout data for scripts, so the node validates to the live tip holding nothing but the accumulator. tools/reach-tip.mjs already reaches the live tip today by keeping only the coins the forward blocks spend. Header sync needs a bridge to a testnet4 peer: either the local WS bridge (node bridge.mjs, default) or, for a click-and-run demo from anywhere, a WebRTC bridge signaled by a server — pass ?signal=wss://your.pod/.webrtc&room=<hex> (node bridge-webrtc.mjs on the other end). Without any bridge, the validation pipeline still runs. Add ?replay=1 to re-watch the full genesis→tip header climb (it otherwise resumes instantly from OPFS).