Skip to main content

Module network

Module network 

Source
Expand description

Bitcoin P2P Network Protocol (Orange Paper Section 10)

This module provides Bitcoin P2P protocol message types and processing. Protocol-specific limits and validation are handled here, with consensus validation delegated to the consensus layer.

Modules§

commons
v2_transport

Structs§

AddrMessage
Address message containing peer addresses
AddrV2Message
BIP155: Extended address message (addrv2)
BlockMessage
Block P2P message: consensus block paired with its segwit witness stack.
BlockTxnMessage
BlockTxn message - Response with requested transactions (BIP152)
CmpctBlockMessage
CmpctBlock message - Compact block data (BIP152)
CompactBlockMessage
Compact block P2P message: decoded BIP152 compact block.
FeeFilterMessage
FeeFilter message setting minimum fee rate
GetBlockTxnMessage
GetBlockTxn message - Request missing transactions from compact block (BIP152)
GetBlocksMessage
GetBlocks message requesting blocks by locator
GetDataMessage
GetData message requesting specific objects
GetHeadersMessage
GetHeaders message requesting block headers
HeadersMessage
Headers message containing block headers
InvMessage
Inventory message listing available objects
InventoryVector
Inventory vector identifying objects
NetworkAddress
Network address structure (legacy format)
NetworkAddressV2
BIP155: Extended network address structure
NotFoundMessage
NotFound message indicating requested object not found
PeerState
Peer connection state
PingMessage
Ping message for connection keepalive
PongMessage
Pong message responding to ping
PrefilledTransaction
PrefilledTransaction - Transaction included in compact block
RejectMessage
Reject message rejecting a message with reason
SendCmpctMessage
SendCmpct message - Negotiate compact block relay support (BIP152)
TxMessage
Transaction P2P message (thin wrapper for dispatch).
VersionMessage
Version message for initial handshake

Enums§

AddressType
BIP155: Address type for addrv2 message
ChainObject
Chain object (block or transaction)
CompactBlockWireConvertError
Error converting between crate::bip152::CompactBlock and wire CmpctBlockMessage.
NetworkMessage
NetworkMessage: Bitcoin P2P protocol message types
NetworkResponse
Network response to a message

Traits§

ChainStateAccess
Trait for chain state access (node layer implements this)

Functions§

process_network_message
Process incoming network message