This document covers repo-specific security boundaries. See the BTCDecoded Security Policy for organization-wide policy.
This document defines the security boundaries, threat model, and limitations of the BTCDecoded blvm-node implementation. This is critical for understanding what this node can and cannot do safely.
Operators: deployment exposure classes (RPC / P2P / modules) and required vs recommended vs unsupported combinations are summarized in the BLVM book — Deployment posture — and in RPC transport × authentication.
- Consensus validation (delegated to blvm-consensus via blvm-protocol)
- Network protocol (P2P message parsing, peer management)
- Storage layer (block storage, UTXO set, chain state)
- RPC interface (JSON-RPC 2.0 API)
- Module orchestration (loading, IPC, lifecycle management)
- Mempool management
- Mining coordination
- Consensus rule validation (delegated to blvm-consensus)
- Protocol variant selection (delegated to blvm-protocol)
- Private key management (no wallet functionality)
- Cryptographic key generation (delegated to blvm-sdk or modules)
- Governance enforcement (delegated to blvm-commons)
-
Consensus Validation
- Block validation using blvm-consensus
- Transaction validation and script execution
- Proof of work verification
- Economic rule enforcement (supply limits, fees)
-
Network Protocol
- Bitcoin P2P protocol message parsing
- Peer connection management
- Block and transaction relay
- Network message validation
-
Storage Layer
- Block storage and indexing
- UTXO set management
- Chain state tracking
- Transaction indexing
-
RPC Interface
- JSON-RPC 2.0 compliant API
- Blockchain data queries
- Network status reporting
- Mining coordination
-
Private Key Management
- NO private key storage
- NO private key generation
- NO wallet functionality
- NO signing operations
-
Wallet Operations
- NO address generation
- NO transaction creation
- NO UTXO selection
- NO change calculation
-
Mining Operations
- NO actual mining (proof of work)
- NO block template generation
- NO nonce searching
- NO mining pool coordination
Environment: Trusted network only Timeline: 6-12 months testing phase Threats: Limited to development and testing scenarios
- Eclipse attacks
- Sybil attacks
- Network partitioning attacks
- Malicious peer injection
- Code vulnerabilities in consensus validation
- Memory corruption in parsing
- Integer overflow in calculations
- Resource exhaustion (DoS)
- Supply chain attacks on dependencies
Environment: Public Bitcoin network Timeline: After security audit and hardening Threats: Full Bitcoin network threat model
- Eclipse attacks — malicious peers isolate node
- Sybil attacks — fake peer identities
- Network partitioning — routing attacks
- Resource exhaustion — memory/CPU DoS
- Protocol manipulation — malformed messages
-
Storage Layer
- ✅ RocksDB is included in default features (performance path for mainnet-scale IBD)
- ✅ redb available as
--features redb(pure Rust; no default C++rocksdb) ⚠️ sledavailable behind--features sled(not recommended for production mainnet)- ✅ Database abstraction allows switching backends (
database_backendconfig) ⚠️ No advanced indexing (sufficient for current use case)
-
Network Layer
- ✅ Peer management implemented
- ✅ Rate limiting implemented (token bucket, per-IP connection limits)
- ✅ DoS protection implemented (connection rate limiting, message queue limits, auto-ban, resource monitoring)
-
RPC Interface
- ✅ Authentication implemented (token-based and certificate-based, configurable)
- ✅ Rate limiting implemented (per-user, per-IP when auth disabled, batch-aware)
- ✅ IP rate limiting when auth disabled (rate-limit-only mode)
- ✅ Quinn RPC auth and rate limiting (same model as HTTP RPC)
- ✅ Batch RPC rate limiting (consumes min(batch_len, 10) tokens)
- ✅ Connection rate limiting (per-IP per minute for RPC and REST)
- ✅ REST vault/pool/congestion: oversized body returns 413
- ✅ Input validation and sanitization
- ✅ Access control via authentication
⚠️ Certificate auth (S-001): When using certificate-based RPC auth, the RPC endpoint must be behind TLS termination (e.g. nginx, Caddy) that sets thex-client-cert-fingerprintheader from the validated client certificate. Without this, the header is spoofable—any client can forge it. If RPC is not behind such TLS, use token-based auth only or disable cert auth.
-
Consensus Layer
- Signature verification now uses real transaction hashes ✅
- All consensus-critical dependencies pinned ✅
- Proper Bitcoin hashing implemented ✅
- Network protocol validation added ✅
- Fix signature verification with real transaction hashes
- Implement proper Bitcoin double SHA256 hashing
- Pin all dependencies to exact versions
- Add network protocol input validation
- Add storage bounds checking
- Add comprehensive test vectors
- Add redb as optional pure-Rust storage backend; RocksDB remains default feature set for performance
- Add DoS protection mechanisms (connection rate limiting, auto-ban, resource monitoring)
- Add RPC authentication (token-based and certificate-based)
- Implement rate limiting (per-user RPC rate limiting, network message rate limiting)
- Add comprehensive fuzzing (protocol parsing, compact blocks, enhanced edge cases)
- Add eclipse attack prevention (IP diversity tracking, limits connections from same IP range)
- Add storage bounds checking (prevents overflow, warns when approaching limits)
- Rate limiting when auth disabled
- Quinn RPC auth and rate limiting
- Batch RPC rate limiting
- RPC connection rate limiting
- REST vault/pool/congestion error handling (413 for oversized body)
- Professional security audit (external, requires security firm)
- Formal verification of critical paths (property tests for node invariants added)
- Advanced peer management (connection quality tracking, peer selection, reliability scoring)
- Performance optimization (performance profiler infrastructure added)
- Monitoring and alerting (metrics collection, health checks, RPC endpoints)
-
Validation Only
- Use for block and transaction validation
- Query blockchain state
- Monitor network health
- Educational purposes
-
Development and Testing
- Integration testing
- Consensus rule validation
- Protocol development
- Research and analysis
-
Never Use For
- Storing private keys
- Creating transactions
- Mining operations
- Production mainnet without hardening
-
Security Warnings
- Never expose RPC to untrusted/public networks without authentication. The node warns at startup when bound to a non-loopback address without auth (
rpc_auth.required = false); heed the warning. - Do not use for financial operations
- Do not rely on for consensus without audit
- Do not use sled storage for production
- Never expose RPC to untrusted/public networks without authentication. The node warns at startup when bound to a non-loopback address without auth (
secp256k1 = "=0.28.2"- ECDSA cryptographysha2 = "=0.10.9"- SHA256 hashingripemd = "=0.1.3"- RIPEMD160 hashingbitcoin_hashes = "=0.11.0"- Bitcoin-specific hashing
serde = "=1.0.193"- Serializationanyhow = "=1.0.93"- Error handlingthiserror = "=1.0.69"- Error types
If you discover a security vulnerability:
- DO NOT create public issues
- DO NOT discuss publicly
- DO report privately to: security@thebitcoincommons.org
- DO provide detailed reproduction steps
- DO allow reasonable time for fixes
- Acknowledgment within 48 hours
- Assessment within 7 days
- Fix development within 30 days
- Public disclosure after fix deployment
- Implements Bitcoin consensus rules
- Interoperates with common chain data and RPC conventions where implemented
- Follows BIP specifications
- Maintains protocol compatibility
- Follows Rust security best practices
- Implements defense in depth
- Uses secure coding patterns
- Maintains audit trail
This blvm-node implementation provides a solid foundation for Bitcoin consensus validation but is NOT suitable for production mainnet use without significant hardening. It is designed for:
- Educational purposes
- Development and testing
- Consensus rule validation
- Research and analysis
For production use, additional security hardening, professional audit, and mainnet-specific protections are required.
Last Updated: April 2026
Version: 0.1.0
Status: Pre-Production Testing