Operations, Networking & Interfaces
Complete operator reference for running bmcbitcoind across clearnet and anonymity networks,
serving JSON-RPC / REST / Esplora / ZMQ, managing encrypted HD wallets, and performing zero-downtime binary swaps.
1. P2P & Privacy Networks
IPv4, IPv6 & BIP324 v2
Listens on IPv4 and IPv6 simultaneously (8333 main, 48333 testnet4, 38333 signet, 18444 regtest).
v2transport=1 (default) enables BIP324 ElligatorSwift + ChaCha20-Poly1305 encrypted transport
inbound and outbound with seamless v1 fallback.
Tor v3 & Stream Isolation
Configure onion=127.0.0.1:9050 (or proxy= for all networks). With listenonion=1
and torcontrol=127.0.0.1:9051, authenticates via HASHEDPASSWORD / NULL / SAFECOOKIE (never plaintext cookie)
and publishes a persistent v3 onion service. All proxied connections (onion, IPv4, IPv6, DNS, and seed gathers) use random
per-connection SOCKS5 credentials (proxyrandomize=1) for Tor circuit isolation.
I2P (SAM 3.1) & CJDNS
Set i2psam=127.0.0.1:7656 to maintain a persistent I2P destination (i2p_private_key)
for outbound and inbound streams, plus transient I2P sessions for private broadcast. Enable CJDNS fc00::/8
routing with cjdnsreachable=1.
2. JSON-RPC, REST & Esplora Facade
Embedded JSON-RPC Server (162 Core Methods)
- Authentication: Ephemeral
0600.cookiefile (default), salted-HMACrpcauth=(compatible with Core'srpcauth.py), orrpcuser/rpcpassword. Per-user method restrictions viarpcwhitelist=+rpcwhitelistdefault=(supporting usernames up to 255 characters). - Multi-Lane Concurrency: Intake threads classify requests into
FAST(lock-free:uptime,getblockcount,getblockchaininfo,getpeerinfo,getnetworkinfo),NOLOCK(private lane mutex: mempool reads,getblock,getrawtransactionv0/v1,getchaintxstats), andEXCL(writer-preferring rwlock, yielded around cross-process IPC and external signer execution). - HTTP Hardening: Rejects
Transfer-Encoding, duplicate/negative/overflowingContent-Length(400 Bad Request), enforces total request deadlines (408) and bounded work queues (503).
Core REST (rest=1) & Esplora Facade (bmc.esploraport)
- REST: Serves Core's 14 unauthenticated
/rest/*routes (.json,.hex,.bin) on the RPC listener (keep loopback-bound). - Esplora for mempool.space: Enable
bmc.esploraport=3002withtxindex=1,txospenderindex=1, andaddrindex=1to point an unpatchedmempool.spacebackend directly atbmcbitcoind(BACKEND: "esplora"). Runs a fixed worker pool with no wildcard CORS and a background serialized mempool refresher.
3. HD Wallet, Descriptors, Miniscript & MuSig2
- HD & Encryption: BIP32/BIP39 seed wallet with AES-256-CBC encryption (
encryptwallet,walletpassphrase,walletlock), multi-wallet support (createwallet,loadwallet,unloadwallet), and0600O_NOFOLLOW+ durable-fsync wallet backups. - Descriptors & Miniscript: Full parsing, range expansion, checksum verification, and non-malleable satisfaction for
pkh,wpkh,sh,wsh,tr,rawtr,multi/sortedmulti,multi_a, and full iterative Miniscript (including Tapscriptthresh()>255 subexpressions). - BIP327 MuSig2 & PSBT v0/v2: Full PSBT v0/v2 (BIP370/371/373) pipeline with
musig()(BIP390) descriptors, thread-safe stack-allocated nonce generation, secret intermediate wiping, and verified 3-of-3 interoperability with Bitcoin Core wallets. - External Signer (
signer=): HWI-compatible external signer interface executing in a dedicated process group withg_exec_lockyielded and a bounded 30s timeout (SIGTERM/SIGKILLcleanup) so a hung hardware signer cannot stall RPC.
4. Native ZMTP 3.1 ZMQ & Shell Hooks
- Zero-Dependency ZMQ: Native ZMTP 3.1 PUB server (no
libzmqdependency) supportingzmqpubhashblock,zmqpubhashtx,zmqpubrawblock,zmqpubrawtx, andzmqpubsequence(with per-topic*hwmand clean shutdown teardown). - Non-Blocking Shell Hooks:
blocknotify,alertnotify,startupnotify, andshutdownnotifysanitize%sbefore execution and synchronize child startup via aCLOEXECpipe (never blocking on unrelated children underSIGCHLD=SIG_IGN).
5. Configuration Reference (bitcoin.conf)
| Key | Default | Category | Description |
|---|---|---|---|
chain / signet / testnet4 / regtest | main | Chain | Select network. Legacy testnet3 is explicitly refused. |
signetchallenge | public signet | Chain | Custom BIP325 signet challenge script (derives network magic). |
listen / port / bind | 1 / default / all | P2P | Inbound P2P listener on IPv4 & IPv6. |
proxy / onion / proxyrandomize | — / proxy / 1 | Privacy | SOCKS5 proxy + random per-connection Tor circuit isolation. |
torcontrol / torpassword / listenonion | 127.0.0.1:9051 / — / 1 | Privacy | Ephemeral Tor v3 onion service management (SAFECOOKIE / HASHEDPASSWORD). |
i2psam / i2pacceptincoming / cjdnsreachable | — / 1 / 0 | Privacy | I2P SAM 3.1 bridge and CJDNS fc00::/8 routing. |
onlynet / v2transport / asmap | all / 1 / — | P2P | Restrict outbound networks, enable BIP324 v2 transport, ASMap bucketing. |
maxmempool / mempoolexpiry / persistmempool | 300 MiB / 336 h / 1 | Mempool | Shared mempool byte budget, expiry, and Core-format mempool.dat persistence. |
limitclustercount / limitclustersize | 64 / 101 kvB | Mempool | Core v31.1 cluster mempool acceptance limits. |
minrelaytxfee / incrementalrelayfee / dustrelayfee | Core defaults | Mempool | Relay, RBF increment, and dust threshold feerates (BTC/kvB). |
dbcache / par / prune | 450 MiB / 0 (auto) / 0 | Storage | UTXO memtable budget, script verify threads (-1..64), pruning (0, 1, ≥550 MiB). |
txindex / txospenderindex / coinstatsindex | 0 | Indexes | Optional indexes built incrementally as sorted runs during IBD. |
blockfilterindex / addrindex | 0 | Indexes | BIP158 compact filters and native address history index (set before sync). |
rpcport / rpcbind / rpcallowip / rpcauth | default / loopback | RPC | JSON-RPC listener, IP allowlist, and salted-HMAC credentials. |
rpcwhitelist / rpcwhitelistdefault / rpcthreads | — / auto / 4 | RPC | Per-user method whitelists and RPC execution worker threads. |
rest / bmc.esploraport / bmc.esplorabind | 0 / 0 / 127.0.0.1 | HTTP | Unauthenticated Core REST and Esplora facade (loopback recommended). |
zmqpubhashblock / zmqpubrawtx / zmqpubsequence | — | ZMQ | Native ZMTP 3.1 publishers (wildcard tcp://* refused). |
signer / walletdir / disablewallet | — / chain dir / 0 | Wallet | External HWI signer command, wallet directory, and wallet disable flag. |
bmc.asyncflush / bmc.memtableanon | 1 / 1 | Tuning | Forked async UTXO memtable flush (B3) and anonymous huge-page memtable (B11). |
bmc.lsmreads / bmc.dropappends | mmap / 0 | Tuning | Switch to pread + page-cache drop for low-PSS sync (~22 GB peak vs ~56 GB). |
bmc.benchlog / bmc.indexrunblocks | 0 / 20000 | Diagnostics | Per-stage benchmark timing logs and sorted-run height interval. |
6. Atomic Upgrade & Rollback Runbook
Production deployments use versioned binaries behind a symlink (bmcbitcoind.live) so rollbacks take seconds:
# 1. Verify full Linux gate before installing
make -C asm test 2>&1 | tee /tmp/bmc_gate.log
make -C asm gate-log-check LOG=/tmp/bmc_gate.log
# 2. Build hardened runtime & install atomically beside previous release
make -C asm runtime
cp -p asm/daemon/bmcbitcoind asm/daemon/bmcbitcoind.deploy-YYYYMMDDa
ln -sfn bmcbitcoind.deploy-YYYYMMDDa asm/daemon/bmcbitcoind.live
sudo systemctl restart bmcbitcoind
# 3. Verify live build commit, tip sync, mempool & fee estimator
asm/daemon/bmc_cli -datadir=/path/to/datadir getnetworkinfo
asm/daemon/bmc_cli -datadir=/path/to/datadir getblockchaininfo
asm/daemon/bmc_cli -datadir=/path/to/datadir getmempoolinfo
asm/daemon/bmc_cli -datadir=/path/to/datadir estimatesmartfee 6