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

FieldSizeRole
Magic4 bytesSeparates mainnet / testnet / regtest on the wire
Command12 bytesNUL-padded ASCII (version, inv, block, …)
Length4 bytesPayload size (LE uint32)
Checksum4 bytesIntegrity check on payload
PayloadvariableSerialized 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