Satd: A Guided Code Tour of a Rust-Based Bitcoin Core Compatible Node
A guided tour of satd, a Rust-based full Bitcoin node compatible with Bitcoin Core, covering its architecture and storage design.
Satd is a Rust implementation of a full Bitcoin node that maintains byte-level compatibility with Bitcoin Core across four surfaces: consensus rules, P2P wire format, JSON-RPC method shapes, and bitcoin.conf syntax. The codebase spans roughly 219,000 lines of Rust across 19 workspace crates, plus a 24,000-line Go SDK, with all code snippets pulled verbatim from the project's master branch.
Where satd diverges deliberately from Core is in scope: a single process and RocksDB instance serve Esplora REST, Electrum, BIP 157/158 compact filters, and Prometheus metrics together. It replaces Core's raw ZMQ topics with a structured, cursor-replayable event streaming API backed by Rust and Go SDKs, and ships no wallet, pushing signing responsibility to clients while still supporting PSBT construction and analysis.
Architecturally, every read surface hangs off the same RocksDB instance, and index updates ride the same atomic write batch as block connection, preventing any index from drifting out of sync with the chain tip. A single Store trait abstracts four storage backends (RocksDbStore, CoinCache, SplitStore, InMemoryStore), with a documented remove-wins contract governing batch semantics. The overall design goal is collapsing a typical bitcoind + electrs + esplora + nginx + exporter stack into one process.
This synthesis was produced from its source by AI; there is no human editor or manual review step. How we work