Node Implementation Overview
The node implementation (blvm-node) is a minimal reference Bitcoin node: it adds only non-consensus infrastructure on top of the consensus and protocol layers. Treat mainnet and high-value deployments like any consensus-adjacent system, hardening, monitoring, and review are required. Consensus logic comes from blvm-consensus, and protocol abstraction from blvm-protocol.
Release mainnet IBD: First Node Setup: Mainnet IBD.
Architecture
The node follows a layered architecture:
graph TB
subgraph "blvm-node"
NM[Network Manager
P2P networking, peer management] SL[Storage Layer
Block/UTXO storage] RS[RPC Server
JSON-RPC 2.0 API] MM[Module Manager
Process-isolated modules] MP[Mempool Manager
Transaction mempool] MC[Mining Coordinator
Block template generation] PP[Payment Processor
CTV support] end PROTO[blvm-protocol
Protocol abstraction] CONS[blvm-consensus
Consensus validation] NM --> PROTO SL --> PROTO MP --> PROTO MC --> PROTO PP --> PROTO PROTO --> CONS MM --> NM MM --> SL MM --> MP RS --> SL RS --> MP RS --> MC
P2P networking, peer management] SL[Storage Layer
Block/UTXO storage] RS[RPC Server
JSON-RPC 2.0 API] MM[Module Manager
Process-isolated modules] MP[Mempool Manager
Transaction mempool] MC[Mining Coordinator
Block template generation] PP[Payment Processor
CTV support] end PROTO[blvm-protocol
Protocol abstraction] CONS[blvm-consensus
Consensus validation] NM --> PROTO SL --> PROTO MP --> PROTO MC --> PROTO PP --> PROTO PROTO --> CONS MM --> NM MM --> SL MM --> MP RS --> SL RS --> MP RS --> MC
Key Components
Network Manager
- P2P protocol implementation (Bitcoin wire protocol)
- Multi-transport support (TCP, Quinn QUIC, Iroh)
- Peer connection management
- Message routing and relay
- Privacy protocols (Dandelion++ when
dandelionfeature enabled; FIBRE viablvm-fibremodule) - Package relay (BIP331)
Storage Layer
- Database abstraction with multiple backends (see Storage Backends)
- Bitcoin Core drop-in: one-time import from a synced Core datadir into
<datadir>/blvm/when therocksdbfeature is enabled (see Operations: Starting from a Core datadir) - Automatic backend fallback on failure
- Block storage and indexing
- UTXO set management
- Chain state tracking
- Transaction indexing
- Pruning support
RPC Server
- JSON-RPC 2.0 compliant API (see RPC API Reference)
- Bearer token RBAC (
tokens,admin_tokens) and HTTP Basic (username,password) for ckpool / Core-style clients - Optional REST
/api/v1/*when built withrest-apiand[rest_api].enabled(separate bind; off by default: see RPC API: REST) - Optional JSON-RPC over QUIC / HTTP/3 (see RPC API: QUIC)
- Authentication and rate limiting
- Method coverage
Module System
- Process-isolated modules (see Module System Architecture)
- IPC communication (Unix domain sockets, see Module IPC Protocol)
- Security sandboxing
- Permission-based API access
- Hot reload support
Mempool Manager
- Transaction validation and storage
- Fee-based transaction selection
- RBF (Replace-By-Fee) support with 4 configurable modes (Disabled, Conservative, Standard, Aggressive)
- Mempool policies and limits
- Transaction expiry
- Advanced indexing (address and value range indexing)
Mining Coordinator
- Block template generation (RPC)
- Stratum V2 (optional
blvm-stratum-v2module)
Payment Processing
- CTV (CheckTemplateVerify) payment state machine when
ctvcompile-time feature is enabled - BIP70 HTTP payment RPC when
bip70-httpis in the binary (blvmdefault features; omitted from portable release builds: see Installation) - Lightning Network via optional
blvm-lightningmodule (not core node RPC) - Payment vaults / covenant tooling in
blvm-nodepayment layer (CTV-gated at runtime)
Governance Integration
- Optional
[governance]configuration (e.g. Commons URL, relay toggles) andNODE_GOVERNANCEP2P capability for extensions such as ban list sharing - Module-visible governance events (proposal lifecycle, webhooks, fork detection) for optional out-of-process modules
Design Principles
- Zero Consensus Re-implementation: All consensus logic delegated to blvm-consensus
- Protocol Abstraction: Uses blvm-protocol for variant support (mainnet, testnet, regtest)
- Pure Infrastructure: Adds storage, networking, RPC, orchestration only
- Feature-complete infrastructure: Full node-style behavior (storage, P2P, RPC, modules) with performance optimizations; not a substitute for operational security review before production
Features
Network Features
- Multi-transport architecture (TCP, QUIC)
- Transaction relay (Dandelion++; FIBRE via
blvm-fibremodule) - High-performance block relay (FIBRE module)
- Package relay (BIP331)
- UTXO commitments (compile-time feature in release binaries; enable at runtime when used)
- Peer consensus protocol, spam filtering (bandwidth optimization during sync)
- LAN peering system (automatic local network discovery for faster IBD when LAN peers exist)
- Parallel IBD with optional IBD UTXO engine (
BLVM_IBD_ENGINE=1)
Storage Features
- Multiple database backends with abstraction layer (
auto→ heed3 (LMDB) in typical release builds; optional RocksDB, redb, sled, tidesdb) - Common on-disk chain layouts via RocksDB backend
- Automatic backend fallback on failure
- Pruning support
- Advanced transaction indexing (address and value range indexes)
- UTXO set management
Security Features
- IBD bandwidth protection (per-peer/IP/subnet limits, reputation scoring)
Module Features
- Process isolation
- IPC communication
- Security sandboxing
- Hot reload
- Module registry
Mining Features
- Block template generation
- Stratum V2 protocol (optional
blvm-stratum-v2module) - Merge mining (optional
blvm-merge-miningplugin) - Mining pool coordination
Payment Features
- Lightning Network via optional
blvm-lightningmodule - CTV payment vaults and covenant proofs (requires
ctvfeature at build time) - BIP70 payment RPC (requires
bip70-httpin the binary) - Payment state machines (BIP70 / on-chain verify paths)
Integration Features
- Governance webhook integration
- ZeroMQ notifications (optional
blvm-zmqmodule: see ZMQ module) - Optional REST
/api/v1/*(same caveats as RPC Server) - Module registry (P2P discovery)
Node Lifecycle
- Initialization: Load configuration, initialize storage, create network manager
- Startup: Connect to P2P network, discover peers, load modules
- Sync: Download and validate blockchain history
- Running: Validate blocks/transactions, relay messages, serve RPC requests
- Shutdown: Graceful shutdown of all components
Metrics and Monitoring
The node includes metrics collection:
- Network Metrics: Peer count, bytes sent/received, connection statistics
- Storage Metrics: Block count, UTXO count, database size
- RPC Metrics: Request count, error rate, response times
- Performance Metrics: Block validation time, transaction processing time
- System Metrics: CPU usage, memory usage, disk I/O
Source
- network/mod.rs (module root), network_manager.rs (connection and message handling)
- mod.rs
- mod.rs
- manager.rs
- mempool.rs
- miner.rs
- mod.rs
- config/governance.rs, network/peer_manager.rs (
governancefeature), P2P governance extensions - mod.rs
- metrics.rs
See Also
- Installation - Installing the node
- Quick Start - Running your first node
- Node Configuration - Configuration options
- Node Operations - Node management and operations
- RPC API Reference - JSON-RPC API documentation
- Mining Integration - Mining functionality
- Module System - Module system architecture
- Storage Backends - Storage backend details