bmc Bitcoin Machine Code Technical Assessment
GitHub

Full Technical Assessment & Viability Analysis

An honest, evidence-backed engineering review of Bitcoin Machine Code (bmc) versus Bitcoin Core v31.1 as of v0.2.0 (2026-11-28, post-PR #511, assembly-first hardening wave, P0 wallet custody fixes & native Rust bmc-gui). Full Markdown source: docs/reports/PROJECT_ASSESSMENT_2026-11-27.md.

Executive Verdict

bmc is one of the most technically ambitious alternative Bitcoin full nodes ever constructed—and a remarkable demonstration of AI-authored systems engineering—but it is NOT a legitimate production custody or economic-validation replacement for Bitcoin Core today.

It beats Core v31.1 decisively on raw IBD speed (3.0× faster with all indexes), archive monotonicity, and single-binary explorer serving (unpatched mempool.space via native Esplora + addrindex), with a byte-identical MuHash3072 UTXO digest from genesis. Yet its 97,551 LOC of hand-written dual-architecture assembly, 14,680-LOC main.c monolith, zero independent human audits, early-stage fuzzing depth (havoc-mutated rather than years of coverage-guided OSS-Fuzz; see Continuous Fuzzing), and consensus-split asymmetry create structural risks that bug-fixing alone cannot close.

~407.2k LOC
1,415 files total (~227.3k prod, 140.1k tests, 22.6k oracles, 12.7k formal)
3.0× IBD
3h 17m 55s vs Core v31.1 9h 50m 04s with all indexes + MuHash parity
42.9% Asm
97,551 LOC hand-written assembly (64.3k x86-64 + 33.3k ARM64)
0 Human Audits
100% AI-authored & AI-audited; no OSS-Fuzz; no Guix signed releases

Honest Scorecard (bmc vs. Bitcoin Core v31.1)

DimensionbmcBitcoin Core v31.1Verdict
Mainnet IBD Speed (with indexes)9.5 / 10 (3h 17m)6.0 / 10 (9h 50m)bmc 3.0× faster
Indexing & Explorer Backend9.0 / 10 (zero-delay + native Esplora)5.5 / 10 (LevelDB + external electrs/fulcrum)bmc decisively better
Single-Core Crypto Speed8.5 / 10 (libsecp256k1 speed, 6× MuHash)9.0 / 10 (libsecp256k1 + audited C++)Near parity (Core assurance)
Consensus Parity & Safety5.0 / 10 (MuHash-matched, dual-asm risk)10.0 / 10 (de facto consensus spec)Core decisively better
Memory Safety & Attack Surface3.5 / 10 (97.5k LOC asm + raw C)8.5 / 10 (RAII C++, 15+ yr, OSS-Fuzz)Core decisively better
Codebase Maintainability4.5 / 10 (14.7k main.c, 3× arch ports)8.0 / 10 (modular C++, libbitcoinkernel)Core decisively better
Disk & RAM Efficiency5.5 / 10 (1.31 TB; 56.3 GB peak PSS)8.5 / 10 (918 GB; ~9–10 GB RAM)Core decisively better
RPC Concurrency & Tail Latency6.0 / 10 (fast point RPCs; g_exec_lock; p99 unmeasured)8.5 / 10 (fine-grained locks under load)Core better
Wallet Security & Ecosystem4.0 / 10 (AES-CBC non-AEAD, custom format)9.0 / 10 (SQLite descriptor wallets)Core decisively better
Supply Chain, Audits & Governance2.5 / 10 (0 human audits, no Guix, bus factor 1)9.5 / 10 (Guix, GPG quorum, CVE process)Core decisively better

1. Codebase Anatomy & Engineering Health

Direct measurement of main (3,829 commits) shows a substantial systems engineering codebase rather than a prototype—alongside acute monolith concentration and duplicated multi-architecture assembly.

Production Code Composition (~227,261 LOC across 505 Files)
x86-64 NASM (asm/*.asm)
64,277 LOC (28.3%)
70 files
Daemon C (asm/daemon/)
63,096 LOC (27.8%)
209 files
Core C (asm/*.c,*.h)
49,118 LOC (21.6%)
95 files
ARM64 Mach-O (port/osx/*.S)
33,274 LOC (14.6%)
50 files
Windows Port (port/win/)
16,276 LOC (7.2%)
74 files
CUDA GPU (asm/cuda/)
1,220
7 files

Supporting verification code totals another ~179,952 LOC: asm/tests/* (643 files, 140,056 LOC), validation/* Core oracles (122 files, 22,571 LOC), formal/* narrow formal proofs (125 files, 12,721 LOC), and scripts/* static auditors (20 files, 4,604 LOC).

Monolith Concentration

Nearly 60,000 LOC—over a quarter of all production code—is concentrated in just 11 files:

Source FileLOCPrimary Architectural Concern
asm/daemon/main.c14,680Boot, config, process supervision, IBD coordination, peer loops, and shutdown entangled in one file
asm/rpc_chain.c6,385Block/tx parsing, script disassembly, UTXO/index lookups, and JSON serialization combined
asm/bitcoin_utxo_lsm.asm5,498Complex on-disk LSM manifest, WAL, Bloom filter, run lookup, and compaction in raw x86-64 asm
asm/rpc_commands.c5,467Raw transactions, PSBT decode/sign, descriptors, and mempool RPCs in one translation unit
asm/daemon/utxo_live.c5,126Consensus block connect/disconnect, contextual checks, reorg handling, and undo management
asm/bitcoin_mempool_policy.c4,568Cluster linearization, RBF feerate diagrams, TRUC, ephemeral dust, and eviction policy
asm/rpc_node.c4,547P2P, network, mining, banlist, and live-node mempool RPCs
asm/rpc_wallet_ops.c4,529Wallet lifecycle, HD keys, signing, coin selection, and backup paths
asm/bitcoin_interp.asm + port/osx/bitcoin_interp.S3,679 + 3,104Two parallel hand-written assembly implementations of the full Script + Tapscript VM
port/osx/bitcoin_utxo_lsm.S3,560Parallel AArch64 hand-written re-implementation of the LSM UTXO engine

Genuinely Disciplined Practices

  • Automated static gatekeepers: SysV ABI stack & callee-saved auditors (482 fns), Makefile prereq (629 rules) / runlist (487 tests) / link-check / gate-log auditors.
  • Core source codegen: Script flags and exception hashes generated directly from Bitcoin Core v31.1 source.
  • End-to-end MuHash attestation: Full-chain genesis syncs checked against Core's MuHash3072 digest.
  • Candid documentation: Incident logs (LOG.md), explicit “What we have NOT measured” sections, and tracked divergence registers.

Structural Brittleness

  • 7+ duplicated binary parsers: Transaction and CompactSize parsing is hand-rolled across C and asm, repeatedly causing pointer-wrap/bounds bugs (H-05, H-07, CRIT-01, CRIT-05).
  • Asymmetric arch tooling (partially closed in v0.1.0): scripts/arm64_abi_audit.py now audits all 50 port/osx/*.S files for SP alignment and Darwin svc #0x80 carry-flag checks, though broader cross-arch fuzz parity remains ongoing.
  • Global .bss state across fork(): Repeatedly caused data races (H-16, H-18, MED-10) and post-fork thread-pool hazards (MED-02).

2. Where bmc Is Genuinely Better Than Bitcoin Core v31.1

Verified Architectural & Performance Advantages
  • 3.0× faster mainnet IBD with all indexes: Run 46 completed mainnet sync with txindex + coinstatsindex + blockfilterindex in 3h 17m 55s (7h 13m CPU) vs Core v31.1 Rerun #7's 9h 50m 04s (13h 15m CPU) on identical Ryzen 9 9950X3D NVMe hardware (dbcache=8192, assumevalid=938343), MuHash3072-identical at height 970,710. Full-script sync (assumevalid=0) finished in 8h 00m.
  • Zero-delay sorted-run indexes & native Esplora: Every optional index (txindex, txospenderindex, coinstatsindex, blockfilterindex, and native addrindex) builds asynchronously during IBD. txindex is 2.6× smaller than Core's LevelDB (26.9 GB vs 68.8 GB). The in-process Esplora facade powers an unpatched mempool.space instance with no electrs or fulcrum daemon.
  • Strictly monotonic, hole-free block archive: Parallel download workers stage verified 16-block chunks and one committer appends blk*.dat strictly in height order (unlike Core's arrival-order blk*.dat), delivering sequential read patterns and cleaner pruning.
  • Zero third-party runtime dependencies & fast point RPCs: No Boost, LevelDB, libevent, libzmq (native ZMTP 3.1), or SQLite. getblock is 1.7× faster (3 ms vs 5 ms v1; 31 ms vs 53 ms v2), getchaintips is 48× faster (2 ms vs 97 ms), Base58 is 7.9× faster, AVX2 MuHash insert is 6× faster, and hand-written secp256k1 matches libsecp256k1 (20.2 µs ECDSA / 22.3 µs BIP340).
  • Process-level fault isolation & build provenance: Untrusted inbound peers execute in forked child processes; RPC, download/apply, async UTXO flushers, coinstats fold, and index builders are isolated OS processes; getnetworkinfo exposes bmc_build_commit and bmc_build_dirty natively.

3. Where bmc Is Genuinely Worse Than Bitcoin Core v31.1

Critical Engineering & Operational Disadvantages
  • Order-of-magnitude larger memory-safety attack surface: 97,551 LOC of hand-written assembly + 112,214 LOC of raw C directly on untrusted P2P, script, and RPC boundaries. Even after four earlier audits (Aug–Oct 2026) and narrow formal proofs, the 2026-11-27 audit still uncovered 15 CRITICAL (including unauthenticated remote .bss overflow in getblocktxn, heap overflow in script_asm(), stack overflows in cons_verify/node_fetch_headers, and a P2TR/P2WSH zero-length address burn bug) and 40 HIGH defects. Core's RAII C++ (Span, DataStream, CScript), 15+ years of adversarial exposure, and continuous OSS-Fuzz represent a fundamentally safer baseline.
  • 3× cross-architecture maintenance & consensus-drift tax: Mirroring consensus, P2P, and storage changes across x86-64 NASM, AArch64 Mach-O, and Windows NT syscall emulation already produced ARM64-only security/consensus bugs (CRIT-04, CRIT-07, H-07, H-15) and compounds on every protocol upgrade.
  • Higher disk & RAM footprint: Total datadir with full indexes is 1,312.4 GB vs Core's 917.7 GB (+43%); rev*.dat undo is 2.5× larger (246.6 GB vs 100.0 GB) to make address-history rebuilds self-contained. Default mmap LSM mode peaked at 56.3 GB PSS in Run 46; low-memory pread + dropappends lowers PSS to 22.1 GB (still >2× Core's ~9–10 GB) at the cost of slowing IBD from 3h 17m to 5h 52m (4.4× slower lookups).
  • POSIX fork() fragility: Forking from a stateful/threaded daemon repeatedly triggered subtle bugs (SIGCHLD=SIG_IGN breaking waitpid() in CRIT-14/CRIT-15, leaked listener FDs in H-11, post-fork thread-pool deadlock risk in MED-02, plus Windows NT fork() emulation overhead).
  • Coarse RPC locking & unmeasured tail latency: Non-lane RPCs serialize on exclusive g_exec_lock; sustained concurrent p95/p99 RPC latency is unmeasured, and cold-cache getaddressbalance exhibited a 60× spread (40 s cold vs 0.6 s warm).
  • Wallet, ZMQ & feature gaps: BMCWENC1 wallet encryption is non-AEAD AES-256-CBC and incompatible with Core's SQLite descriptor wallets; no loadtxoutset (assumeutxo); ZMQ hashtx/rawtx omits non-mempool block-connected and disconnected txs; TrimToSize evicts per-leaf rather than by linearization chunk; getrawmempool reports raw blob bytes instead of DynamicMemoryUsage; no GUI or per-method help <cmd> text.

4. Side-by-Side Technical Matrix

CategoryBitcoin Machine Code (bmc)Bitcoin Core v31.1Advantage
Implementation97.5k LOC asm (x86-64 + ARM64) + 112k C + 16k Win shimsC++20 (+ libsecp256k1 C/asm)Core (safety)
Runtime DependenciesNone (native ZMTP 3.1, custom LSM, custom HTTP/JSON)LevelDB, libevent, SQLite, libzmq (opt), Qt (opt)bmc
Mainnet IBD + Indexes3h 17m 55s (7h 13m CPU)9h 50m 04s (13h 15m CPU)bmc (3.0×)
Block Archive LayoutHeight-monotonic, hole-free blk*.datArrival-order blk*.datbmc
Secondary IndexesBuilt during IBD; txindex 26.9 GB + addrindex + EsploraPost-connect; txindex 68.8 GB; no Esplora/addrindexbmc
Total Disk (Full + Indexes)1,312.4 GB (rev*.dat 246.6 GB)917.7 GB (rev*.dat 100.0 GB)Core (-30%)
Peak RAM During IBD56.3 GB PSS (mmap) / 22.1 GB (pread)~9–10 GB (dbcache=8192)Core
Single-Core Sig Verify20.2 µs ECDSA / 22.3 µs BIP34021.0 µs ECDSA / 22.0 µs BIP340Tie
Consensus AssuranceMuHash-matched; dual-asm consensus; 0 human auditsDe facto spec; 15+ yr battle-tested; libbitcoinkernelCore
Fuzzing & QA483 deterministic/diff tests + ASan/UBSan + 7-target guard-paged/Core-diff fuzzing (248.70B+ execs, 36.44B+ Core diff) + CIUnit/functional + 24/7 OSS-Fuzz (billions of inputs)Core (years of OSS-Fuzz)
Wallet & CustodyWatch-only + HWI hardware signer (PSBT) & native Rust bmc-gui; hot wallet experimental (AES-CBC, young code)Audited SQLite descriptor wallet + broad toolingCore
Release & Supply ChainTagged v0.2.0 3-platform CI archives (Node + GUI) + SHA256SUMS; no Guix or GPG quorum yetGuix reproducible builds, GPG quorum, CVE processCore

5. The Six Barriers to Becoming a Legitimate Bitcoin Client

Closing individual audit findings is necessary, but not sufficient. Six structural barriers separate bmc from being a legitimate alternative production Bitcoin client:

1. Consensus Risk Asymmetry (Chain Splits)

A single subtle edge-case divergence in script flags, DER/witness validation, sigop weighting, Tapscript limits, or reorg tie-breaking splits miners, exchanges, and users onto an invalid fork. Maintaining two separate hand-written assembly consensus engines (x86-64 and ARM64) multiplies that risk rather than containing it.

2. Zero Human Audit & Bus Factor = 1

100% of the ~227k LOC production codebase is AI-authored and AI-audited. Differential tests prove parity only on observed history and known vectors—they cannot rule out adversarial exploits on unseen mainnet inputs or microarchitectural side-channels in crypto assembly.

3. Early-Stage Coverage-Guided Fuzzing Depth

v0.2.0 runs a 24/7 7-target guard-paged & Core v31.1 differential fuzzing suite (248.70B+ havoc mutations, 36.44B+ Core diff checks logged), but Bitcoin Core's P2P hardness relies on years of coverage-guided OSS-Fuzz / libFuzzer / qa-assets probing every parser, compact block, PSBT, BIP324 stream, and storage record.

4. No Reproducible Builds or Release Governance

Production Bitcoin clients require deterministic Guix/Nix reproducible builds, semantic tagged releases, multi-maintainer GPG signatures, independent peer review quorums, and a mature CVE disclosure workflow. bmc currently ships as rolling main commits.

5. Assembly Tooling & C Monoliths

Keeping the core engine in hand-authored assembly is bmc's defining mission, but maintaining ~97.5k LOC across two architectures without checked assembly cursor macros, single-source spec codegen, an automated AArch64 ABI/syscall auditor, and decomposed C modules (breaking up 14,680-LOC main.c) creates a steep review wall.

6. Ecosystem & Operational Maturity

Lightning nodes (LND/CLN/LDK), exchanges, and hardware bridges rely on exact Core ZMQ block-tx events, predictable RAM on 8–16 GB VPS hosts, measured p99 RPC latency under load, SQLite descriptor wallet portability, and multi-year unattended uptime.

6. Honest Viability Matrix by Use Case

Use CaseStatus TodayPractical Guidance
Personal / Institutional Custody (Built-in Wallet)NOT VIABLEDo not hold real funds in bmc's wallet. Use Bitcoin Core + audited hardware signers.
Mining / Exchange Economic SettlementNOT VIABLEDo not use as sole consensus validator without libbitcoinkernel or independent human audits.
Block Explorer / mempool.space BackendHIGHLY VIABLEStrong fit today: 3× faster IBD, 2.6× smaller txindex, native addrindex + Esplora in one binary. Cross-check tip hash/MuHash against a Core node.
Chain Analytics & Archival ResearchHIGHLY VIABLEMonotonic hole-free blk*.dat, fast getblock, full-chain undo, and 3h 17m from-genesis syncs accelerate research workflows dramatically.
Differential Consensus Fuzzing OracleHIGHLY VIABLEAn independent from-scratch implementation with genesis-to-tip MuHash parity is a valuable differential testing counterpart to Core.
Systems / AI Engineering ReferenceEXCEPTIONALDemonstrates how much IBD and indexing performance is left on the table by legacy LevelDB + sequential-index architectures.

7. Concrete 4-Phase Roadmap to Production Legitimacy

Turning bmc from an impressive experimental benchmark node into a trusted alternative Bitcoin client requires halting feature sprawl and executing four structural engineering phases:

PhaseHorizonConcrete Structural Deliverables
Phase 1: Assembly-Native Hardening & Shadow Consensus Months 1–4
IN PROGRESS (v0.1.0)
Keep the core engine in hand-authored assembly while eliminating structural bug classes mechanically: shipped in v0.1.0 — checked cursor/bounds macros (asm/macros_safe.inc, port/osx/macros_safe.inc), automated AArch64 ABI & Darwin syscall auditor (scripts/arm64_abi_audit.py), and single-source consensus spec codegen (scripts/gen_consensus_inc.py). Remaining: adopt safe cursor macros across all 7+ parsers and add selectable --consensus-engine=bmc|dual|kernel via libbitcoinkernel for 24/7 live mainnet shadow validation.
Phase 2: Continuous Adversarial Fuzzing (Asm + C + Core Diff) Months 1–6 (Ongoing)
LIVE (v0.1.0)
Shipped in v0.1.0: 7-target guard-paged PROT_NONE assembly + ASan/UBSan C fuzz suite (fuzz/), 2.06M exec/s in-process Core v31.1 differential script fuzzer (fuzz_script_diff_inproc), 24/7 systemd fuzzing service (bmc-fuzz.service), and GitHub Actions CI (.github/workflows/ci.yml). Remaining: add AFL++/Honggfuzz hardware branch coverage, seed with Core's qa-assets corpus, register in bitcoinfuzz, and expand Z3/SMT proofs in formal/.
Phase 3: Decompose Monoliths & Operational Parity Months 4–10 Split main.c (14.7k LOC) and >4.5k-LOC RPC/mempool files into cohesive modules. Replace coarse g_exec_lock with read-mostly snapshot lanes and publish real p50/p95/p99 RPC latency under load. Upgrade wallet encryption to AEAD (BMCWENC2) with SQLite descriptor interop or explicitly scope bmc to watch-only/external-signer mode. Close ZMQ block-tx parity, loadtxoutset, and chunk-based mempool eviction.
Phase 4: Reproducible Releases & Human Audits Months 10–18 Ship deterministic Guix/Nix reproducible builds, semantic versioning with multi-maintainer GPG-signed release tags, a public bug bounty program, and funded independent human security audits of consensus, cryptography, and P2P networking before ever removing the experimental warning.