Network Protocol
Bitcoin P2P wire format and framing in blvm-protocol. For the protocol engine, variants, message catalog, service flags, and BIPs: Protocol Overview. For transports (TCP, Quinn, Iroh), transport_preference, and the NetworkManager: Transport Abstraction. For operator bind addresses and CLI defaults: Node Configuration.
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. Treat blvm-protocol src/ as the source of truth rather than this summary.
Wire envelope
| Field | Size | Role |
|---|---|---|
| Magic | 4 bytes | Separates mainnet / testnet / regtest on the wire |
| Command | 12 bytes | NUL-padded ASCII (version, inv, block, …) |
| Length | 4 bytes | Payload size (LE uint32) |
| Checksum | 4 bytes | Integrity check on payload |
| Payload | variable | Serialized per command |
Implementation: blvm-protocol wire layer.
Network identifiers on the wire
Magic bytes and default P2P/RPC ports per variant: Protocol overview: Protocol variants.
Message taxonomy
Handshake, inventory, sync, relay, keepalive, and Commons extension commands: Protocol overview: Network messages.
See Also
- Protocol Overview - Protocol layer introduction
- Transport Abstraction - TCP, Quinn, and Iroh transports
- Node Configuration - Network and transport configuration
- Protocol Specifications - BIP implementations