Network Protocol
The protocol layer abstracts Bitcoin's P2P network protocol, supporting multiple network variants. See Protocol Overview for details.
Protocol Abstraction
The blvm-protocol abstracts P2P message formats (standard Bitcoin wire protocol), connection management, peer discovery, block synchronization, and transaction relay. See Protocol Architecture for details.
Network Variants
Mainnet (BitcoinV1)
- Production Bitcoin network
- Full consensus rules
- Real economic value
Testnet3
- Bitcoin test network
- Same consensus rules as mainnet
- Different network parameters
- No real economic value
Regtest
- Regression testing network
- Configurable difficulty
- Isolated from other networks
- Fast block generation for testing
For implementation details, see the blvm-protocol README.
Transport Abstraction Layer
The network layer uses multiple transport protocols through a unified abstraction (see Transport Abstraction):
NetworkManager
└── Transport Trait (abstraction)
├── TcpTransport (Bitcoin P2P compatible)
└── IrohTransport (QUIC-based, optional)
Transport Options
TCP Transport (Default): Bitcoin P2P protocol compatibility using traditional TCP sockets. Maintains Bitcoin wire protocol format and is compatible with standard Bitcoin nodes. See Transport Abstraction.
Iroh Transport: QUIC-based transport using Iroh for P2P networking with public key-based peer identity and NAT traversal support. See Transport Abstraction.
Transport Selection
Configure transport via blvm.toml (top-level NodeConfig keys — there is no [network] table). See Node configuration.
transport_preference = "tcponly" # file: tcponly | irohonly | quinnonly | hybrid | all
CLI / ENV (e.g. BLVM_NODE_TRANSPORT) still accept human-readable forms like tcp_only, iroh_only, hybrid.
The protocol adapter serializes between blvm-consensus NetworkMessage types and transport-specific wire formats. The message bridge processes messages and generates responses. Default is TCP-only; enable Iroh via iroh feature flag.
Bitcoin wire and framing (blvm-protocol)
blvm-protocol owns Bitcoin P2P message framing (message type, length, payload, checksum) and related helpers. For TCP, entry points such as node_tcp tie that logic to the node’s socket path. Exact layering may evolve—treat blvm-protocol src/ as the source of truth rather than this summary.
See Also
- Protocol Architecture - Protocol layer design
- Message Formats - P2P message specifications
- Protocol Overview - Protocol layer introduction
- Node Configuration - Network and transport configuration
- Protocol Specifications - BIP implementations