Bitcoin Core 28.99.0
P2P Digital Currency
Variables
NetMsgType Namespace Reference

Bitcoin protocol message types. More...

Variables

constexpr const char * VERSION {"version"}
 The version message provides information about the transmitting node to the receiving node at the beginning of a connection. More...
 
constexpr const char * VERACK {"verack"}
 The verack message acknowledges a previously-received version message, informing the connecting node that it can begin to send other messages. More...
 
constexpr const char * ADDR {"addr"}
 The addr (IP address) message relays connection information for peers on the network. More...
 
constexpr const char * ADDRV2 {"addrv2"}
 The addrv2 message relays connection information for peers on the network just like the addr message, but is extended to allow gossiping of longer node addresses (see BIP155). More...
 
constexpr const char * SENDADDRV2 {"sendaddrv2"}
 The sendaddrv2 message signals support for receiving ADDRV2 messages (BIP155). More...
 
constexpr const char * INV {"inv"}
 The inv message (inventory message) transmits one or more inventories of objects known to the transmitting peer. More...
 
constexpr const char * GETDATA {"getdata"}
 The getdata message requests one or more data objects from another node. More...
 
constexpr const char * MERKLEBLOCK {"merkleblock"}
 The merkleblock message is a reply to a getdata message which requested a block using the inventory type MSG_MERKLEBLOCK. More...
 
constexpr const char * GETBLOCKS {"getblocks"}
 The getblocks message requests an inv message that provides block header hashes starting from a particular point in the block chain. More...
 
constexpr const char * GETHEADERS {"getheaders"}
 The getheaders message requests a headers message that provides block headers starting from a particular point in the block chain. More...
 
constexpr const char * TX {"tx"}
 The tx message transmits a single transaction. More...
 
constexpr const char * HEADERS {"headers"}
 The headers message sends one or more block headers to a node which previously requested certain headers with a getheaders message. More...
 
constexpr const char * BLOCK {"block"}
 The block message transmits a single serialized block. More...
 
constexpr const char * GETADDR {"getaddr"}
 The getaddr message requests an addr message from the receiving node, preferably one with lots of IP addresses of other receiving nodes. More...
 
constexpr const char * MEMPOOL {"mempool"}
 The mempool message requests the TXIDs of transactions that the receiving node has verified as valid but which have not yet appeared in a block. More...
 
constexpr const char * PING {"ping"}
 The ping message is sent periodically to help confirm that the receiving peer is still connected. More...
 
constexpr const char * PONG {"pong"}
 The pong message replies to a ping message, proving to the pinging node that the ponging node is still alive. More...
 
constexpr const char * NOTFOUND {"notfound"}
 The notfound message is a reply to a getdata message which requested an object the receiving node does not have available for relay. More...
 
constexpr const char * FILTERLOAD {"filterload"}
 The filterload message tells the receiving peer to filter all relayed transactions and requested merkle blocks through the provided filter. More...
 
constexpr const char * FILTERADD {"filteradd"}
 The filteradd message tells the receiving peer to add a single element to a previously-set bloom filter, such as a new public key. More...
 
constexpr const char * FILTERCLEAR {"filterclear"}
 The filterclear message tells the receiving peer to remove a previously-set bloom filter. More...
 
constexpr const char * SENDHEADERS {"sendheaders"}
 Indicates that a node prefers to receive new block announcements via a "headers" message rather than an "inv". More...
 
constexpr const char * FEEFILTER {"feefilter"}
 The feefilter message tells the receiving peer not to inv us any txs which do not meet the specified min fee rate. More...
 
constexpr const char * SENDCMPCT {"sendcmpct"}
 Contains a 1-byte bool and 8-byte LE version number. More...
 
constexpr const char * CMPCTBLOCK {"cmpctblock"}
 Contains a CBlockHeaderAndShortTxIDs object - providing a header and list of "short txids". More...
 
constexpr const char * GETBLOCKTXN {"getblocktxn"}
 Contains a BlockTransactionsRequest Peer should respond with "blocktxn" message. More...
 
constexpr const char * BLOCKTXN {"blocktxn"}
 Contains a BlockTransactions. More...
 
constexpr const char * GETCFILTERS {"getcfilters"}
 getcfilters requests compact filters for a range of blocks. More...
 
constexpr const char * CFILTER {"cfilter"}
 cfilter is a response to a getcfilters request containing a single compact filter. More...
 
constexpr const char * GETCFHEADERS {"getcfheaders"}
 getcfheaders requests a compact filter header and the filter hashes for a range of blocks, which can then be used to reconstruct the filter headers for those blocks. More...
 
constexpr const char * CFHEADERS {"cfheaders"}
 cfheaders is a response to a getcfheaders request containing a filter header and a vector of filter hashes for each subsequent block in the requested range. More...
 
constexpr const char * GETCFCHECKPT {"getcfcheckpt"}
 getcfcheckpt requests evenly spaced compact filter headers, enabling parallelized download and validation of the headers between them. More...
 
constexpr const char * CFCHECKPT {"cfcheckpt"}
 cfcheckpt is a response to a getcfcheckpt request containing a vector of evenly spaced filter headers for blocks on the requested chain. More...
 
constexpr const char * WTXIDRELAY {"wtxidrelay"}
 Indicates that a node prefers to relay transactions via wtxid, rather than txid. More...
 
constexpr const char * SENDTXRCNCL {"sendtxrcncl"}
 Contains a 4-byte version number and an 8-byte salt. More...
 

Detailed Description

Bitcoin protocol message types.

When adding new message types, don't forget to update ALL_NET_MESSAGE_TYPES below.

Variable Documentation

◆ ADDR

constexpr const char* NetMsgType::ADDR {"addr"}
inlineconstexpr

The addr (IP address) message relays connection information for peers on the network.

Definition at line 75 of file protocol.h.

◆ ADDRV2

constexpr const char* NetMsgType::ADDRV2 {"addrv2"}
inlineconstexpr

The addrv2 message relays connection information for peers on the network just like the addr message, but is extended to allow gossiping of longer node addresses (see BIP155).

Definition at line 81 of file protocol.h.

◆ BLOCK

constexpr const char* NetMsgType::BLOCK {"block"}
inlineconstexpr

The block message transmits a single serialized block.

Definition at line 127 of file protocol.h.

◆ BLOCKTXN

constexpr const char* NetMsgType::BLOCKTXN {"blocktxn"}
inlineconstexpr

Contains a BlockTransactions.

Sent in response to a "getblocktxn" message.

Since
protocol version 70014 as described by BIP 152

Definition at line 218 of file protocol.h.

◆ CFCHECKPT

constexpr const char* NetMsgType::CFCHECKPT {"cfcheckpt"}
inlineconstexpr

cfcheckpt is a response to a getcfcheckpt request containing a vector of evenly spaced filter headers for blocks on the requested chain.

Definition at line 254 of file protocol.h.

◆ CFHEADERS

constexpr const char* NetMsgType::CFHEADERS {"cfheaders"}
inlineconstexpr

cfheaders is a response to a getcfheaders request containing a filter header and a vector of filter hashes for each subsequent block in the requested range.

Definition at line 242 of file protocol.h.

◆ CFILTER

constexpr const char* NetMsgType::CFILTER {"cfilter"}
inlineconstexpr

cfilter is a response to a getcfilters request containing a single compact filter.

Definition at line 229 of file protocol.h.

◆ CMPCTBLOCK

constexpr const char* NetMsgType::CMPCTBLOCK {"cmpctblock"}
inlineconstexpr

Contains a CBlockHeaderAndShortTxIDs object - providing a header and list of "short txids".

Since
protocol version 70014 as described by BIP 152

Definition at line 206 of file protocol.h.

◆ FEEFILTER

constexpr const char* NetMsgType::FEEFILTER {"feefilter"}
inlineconstexpr

The feefilter message tells the receiving peer not to inv us any txs which do not meet the specified min fee rate.

Since
protocol version 70013 as described by BIP133

Definition at line 192 of file protocol.h.

◆ FILTERADD

constexpr const char* NetMsgType::FILTERADD {"filteradd"}
inlineconstexpr

The filteradd message tells the receiving peer to add a single element to a previously-set bloom filter, such as a new public key.

Since
protocol version 70001 as described by BIP37. Only available with service bit NODE_BLOOM since protocol version 70011 as described by BIP111.

Definition at line 172 of file protocol.h.

◆ FILTERCLEAR

constexpr const char* NetMsgType::FILTERCLEAR {"filterclear"}
inlineconstexpr

The filterclear message tells the receiving peer to remove a previously-set bloom filter.

Since
protocol version 70001 as described by BIP37. Only available with service bit NODE_BLOOM since protocol version 70011 as described by BIP111.

Definition at line 180 of file protocol.h.

◆ FILTERLOAD

constexpr const char* NetMsgType::FILTERLOAD {"filterload"}
inlineconstexpr

The filterload message tells the receiving peer to filter all relayed transactions and requested merkle blocks through the provided filter.

Since
protocol version 70001 as described by BIP37. Only available with service bit NODE_BLOOM since protocol version 70011 as described by BIP111.

Definition at line 164 of file protocol.h.

◆ GETADDR

constexpr const char* NetMsgType::GETADDR {"getaddr"}
inlineconstexpr

The getaddr message requests an addr message from the receiving node, preferably one with lots of IP addresses of other receiving nodes.

Definition at line 132 of file protocol.h.

◆ GETBLOCKS

constexpr const char* NetMsgType::GETBLOCKS {"getblocks"}
inlineconstexpr

The getblocks message requests an inv message that provides block header hashes starting from a particular point in the block chain.

Definition at line 107 of file protocol.h.

◆ GETBLOCKTXN

constexpr const char* NetMsgType::GETBLOCKTXN {"getblocktxn"}
inlineconstexpr

Contains a BlockTransactionsRequest Peer should respond with "blocktxn" message.

Since
protocol version 70014 as described by BIP 152

Definition at line 212 of file protocol.h.

◆ GETCFCHECKPT

constexpr const char* NetMsgType::GETCFCHECKPT {"getcfcheckpt"}
inlineconstexpr

getcfcheckpt requests evenly spaced compact filter headers, enabling parallelized download and validation of the headers between them.

Only available with service bit NODE_COMPACT_FILTERS as described by BIP 157 & 158.

Definition at line 249 of file protocol.h.

◆ GETCFHEADERS

constexpr const char* NetMsgType::GETCFHEADERS {"getcfheaders"}
inlineconstexpr

getcfheaders requests a compact filter header and the filter hashes for a range of blocks, which can then be used to reconstruct the filter headers for those blocks.

Only available with service bit NODE_COMPACT_FILTERS as described by BIP 157 & 158.

Definition at line 237 of file protocol.h.

◆ GETCFILTERS

constexpr const char* NetMsgType::GETCFILTERS {"getcfilters"}
inlineconstexpr

getcfilters requests compact filters for a range of blocks.

Only available with service bit NODE_COMPACT_FILTERS as described by BIP 157 & 158.

Definition at line 224 of file protocol.h.

◆ GETDATA

constexpr const char* NetMsgType::GETDATA {"getdata"}
inlineconstexpr

The getdata message requests one or more data objects from another node.

Definition at line 96 of file protocol.h.

◆ GETHEADERS

constexpr const char* NetMsgType::GETHEADERS {"getheaders"}
inlineconstexpr

The getheaders message requests a headers message that provides block headers starting from a particular point in the block chain.

Since
protocol version 31800.

Definition at line 113 of file protocol.h.

◆ HEADERS

constexpr const char* NetMsgType::HEADERS {"headers"}
inlineconstexpr

The headers message sends one or more block headers to a node which previously requested certain headers with a getheaders message.

Since
protocol version 31800.

Definition at line 123 of file protocol.h.

◆ INV

constexpr const char* NetMsgType::INV {"inv"}
inlineconstexpr

The inv message (inventory message) transmits one or more inventories of objects known to the transmitting peer.

Definition at line 92 of file protocol.h.

◆ MEMPOOL

constexpr const char* NetMsgType::MEMPOOL {"mempool"}
inlineconstexpr

The mempool message requests the TXIDs of transactions that the receiving node has verified as valid but which have not yet appeared in a block.

Since
protocol version 60002 as described by BIP35. Only available with service bit NODE_BLOOM, see also BIP111.

Definition at line 139 of file protocol.h.

◆ MERKLEBLOCK

constexpr const char* NetMsgType::MERKLEBLOCK {"merkleblock"}
inlineconstexpr

The merkleblock message is a reply to a getdata message which requested a block using the inventory type MSG_MERKLEBLOCK.

Since
protocol version 70001 as described by BIP37.

Definition at line 102 of file protocol.h.

◆ NOTFOUND

constexpr const char* NetMsgType::NOTFOUND {"notfound"}
inlineconstexpr

The notfound message is a reply to a getdata message which requested an object the receiving node does not have available for relay.

Since
protocol version 70001.

Definition at line 156 of file protocol.h.

◆ PING

constexpr const char* NetMsgType::PING {"ping"}
inlineconstexpr

The ping message is sent periodically to help confirm that the receiving peer is still connected.

Definition at line 144 of file protocol.h.

◆ PONG

constexpr const char* NetMsgType::PONG {"pong"}
inlineconstexpr

The pong message replies to a ping message, proving to the pinging node that the ponging node is still alive.

Since
protocol version 60001 as described by BIP31.

Definition at line 150 of file protocol.h.

◆ SENDADDRV2

constexpr const char* NetMsgType::SENDADDRV2 {"sendaddrv2"}
inlineconstexpr

The sendaddrv2 message signals support for receiving ADDRV2 messages (BIP155).

It also implies that its sender can encode as ADDRV2 and would send ADDRV2 instead of ADDR to a peer that has signaled ADDRV2 support by sending SENDADDRV2.

Definition at line 87 of file protocol.h.

◆ SENDCMPCT

constexpr const char* NetMsgType::SENDCMPCT {"sendcmpct"}
inlineconstexpr

Contains a 1-byte bool and 8-byte LE version number.

Indicates that a node is willing to provide blocks via "cmpctblock" messages. May indicate that a node prefers to receive new block announcements via a "cmpctblock" message rather than an "inv", depending on message contents.

Since
protocol version 70014 as described by BIP 152

Definition at line 200 of file protocol.h.

◆ SENDHEADERS

constexpr const char* NetMsgType::SENDHEADERS {"sendheaders"}
inlineconstexpr

Indicates that a node prefers to receive new block announcements via a "headers" message rather than an "inv".

Since
protocol version 70012 as described by BIP130.

Definition at line 186 of file protocol.h.

◆ SENDTXRCNCL

constexpr const char* NetMsgType::SENDTXRCNCL {"sendtxrcncl"}
inlineconstexpr

Contains a 4-byte version number and an 8-byte salt.

The salt is used to compute short txids needed for efficient txreconciliation, as described by BIP 330.

Definition at line 266 of file protocol.h.

◆ TX

constexpr const char* NetMsgType::TX {"tx"}
inlineconstexpr

The tx message transmits a single transaction.

Definition at line 117 of file protocol.h.

◆ VERACK

constexpr const char* NetMsgType::VERACK {"verack"}
inlineconstexpr

The verack message acknowledges a previously-received version message, informing the connecting node that it can begin to send other messages.

Definition at line 70 of file protocol.h.

◆ VERSION

constexpr const char* NetMsgType::VERSION {"version"}
inlineconstexpr

The version message provides information about the transmitting node to the receiving node at the beginning of a connection.

Definition at line 65 of file protocol.h.

◆ WTXIDRELAY

constexpr const char* NetMsgType::WTXIDRELAY {"wtxidrelay"}
inlineconstexpr

Indicates that a node prefers to relay transactions via wtxid, rather than txid.

Since
protocol version 70016 as described by BIP 339.

Definition at line 260 of file protocol.h.