9 #error This header can only be compiled as C++.
12 #ifndef PIVX_PROTOCOL_H
13 #define PIVX_PROTOCOL_H
83 extern const char*
ADDR;
101 extern const char*
INV;
131 extern const char*
TX;
143 extern const char*
BLOCK;
162 extern const char*
PING;
169 extern const char*
PONG;
176 extern const char*
ALERT;
222 extern const char*
SPORK;
239 extern const char*
MNPING;
288 extern const char*
MNAUTH;
302 extern const char*
CLSIG;
387 if (stored_format_version == 0) {
389 }
else if (stored_format_version ==
DISK_VERSION_ADDRV2 && (s.GetVersion() & ADDRV2_FORMAT)) {
393 throw std::ios_base::failure(
"Unsupported CAddress disk format version");
401 use_v2 = s.GetVersion() & ADDRV2_FORMAT;
408 store_time = s.GetVersion() != INIT_PROTO_VERSION;
415 uint64_t services_tmp;
416 SER_WRITE(obj, services_tmp = obj.nServices);
A CService with information about it as peer.
static constexpr uint32_t DISK_VERSION_IGNORE_MASK
SERIALIZE_METHODS(CAddress, obj)
ServiceFlags nServices
Serialized as uint64_t in V1, and as CompactSize in V2.
static constexpr uint32_t DISK_VERSION_INIT
Historically, CAddress disk serialization stored the CLIENT_VERSION, optionally OR'ed with the ADDRV2...
uint32_t nTime
Always included in serialization, except in the network format on INIT_PROTO_VERSION.
CAddress(CService ipIn, ServiceFlags nServicesIn)
static constexpr uint32_t DISK_VERSION_ADDRV2
The version number written in disk serialized addresses to indicate V2 serializations.
CAddress(CService ipIn, ServiceFlags nServicesIn, uint32_t nTimeIn)
static constexpr uint32_t TIME_INIT
friend bool operator<(const CInv &a, const CInv &b)
std::string ToString() const
std::string GetCommand() const
bool IsMasterNodeType() const
SERIALIZE_METHODS(CInv, obj)
A combination of a network address (CNetAddr) and a (TCP) port.
Bitcoin protocol message types.
const char * QFCOMMITMENT
The qfcommit message is used to propagate LLMQ final commitments.
const char * MNBROADCAST2
The mnbroadcast2 message is used to broadcast masternode startup data to connected peers Supporting B...
const char * BUDGETVOTESYNC
The budgetvotesync message is used to request budget vote data from connected peers.
const char * FILTERLOAD
The filterload message tells the receiving peer to filter all relayed transactions and requested merk...
const char * MNWINNER
The mnwinner message is used to relay and distribute consensus for masternode payout ordering.
const char * BLOCK
The block message transmits a single serialized block.
const char * FILTERCLEAR
The filterclear message tells the receiving peer to remove a previously-set bloom filter.
const char * HEADERS
The headers message sends one or more block headers to a node which previously requested certain head...
const char * GETMNLIST
The dseg message is used to request the Masternode list or an specific entry.
const char * ADDRV2
The addrv2 message relays connection information for peers on the network just like the addr message,...
const char * SENDHEADERS
Indicates that a node prefers to receive new block announcements via a "headers" message rather than ...
const char * PONG
The pong message replies to a ping message, proving to the pinging node that the ponging node is stil...
const char * GETMNWINNERS
The getmnwinners message is used to request winning masternode data from connected peers.
const char * QSENDRECSIGS
The qsendrecsigs message is used to propagate LLMQ intra-quorum partial recovered signatures.
const char * QGETSIGSHARES
const char * GETADDR
The getaddr message requests an addr message from the receiving node, preferably one with lots of IP ...
const char * FINALBUDGETVOTE
The finalbudgetvote message is used to broadcast or relay finalized budget votes to connected peers.
const char * NOTFOUND
The notfound message is a reply to a getdata message which requested an object the receiving node doe...
const char * MEMPOOL
The mempool message requests the TXIDs of transactions that the receiving node has verified as valid ...
const char * TX
The tx message transmits a single transaction.
const char * FILTERADD
The filteradd message tells the receiving peer to add a single element to a previously-set bloom filt...
const char * QPCOMMITMENT
const char * ADDR
The addr (IP address) message relays connection information for peers on the network.
const char * VERSION
The version message provides information about the transmitting node to the receiving node at the beg...
const char * GETBLOCKS
The getblocks message requests an inv message that provides block header hashes starting from a parti...
const char * MNBROADCAST
The mnbroadcast message is used to broadcast masternode startup data to connected peers.
const char * FINALBUDGET
The finalbudget message is used to broadcast or relay finalized budget metadata to connected peers.
const char * GETHEADERS
The getheaders message requests a headers message that provides block headers starting from a particu...
const char * GETDATA
The getdata message requests one or more data objects from another node.
const char * MNPING
The mnping message is used to ensure a masternode is still active.
const char * QJUSTIFICATION
const char * BUDGETVOTE
The budgetvote message is used to broadcast or relay budget proposal votes to connected peers.
const char * VERACK
The verack message acknowledges a previously-received version message, informing the connecting node ...
const char * SYNCSTATUSCOUNT
The syncstatuscount message is used to track the layer 2 syncing process.
const char * BUDGETPROPOSAL
The budgetproposal message is used to broadcast or relay budget proposal metadata to connected peers.
const char * ALERT
The alert message warns nodes of problems that may affect them or the rest of the network.
const char * SENDADDRV2
The sendaddrv2 message signals support for receiving ADDRV2 messages (BIP155).
const char * PING
The ping message is sent periodically to help confirm that the receiving peer is still connected.
const char * SPORK
The spork message is used to send spork values to connected peers.
const char * MERKLEBLOCK
The merkleblock message is a reply to a getdata message which requested a block using the inventory t...
const char * GETSPORKS
The getsporks message is used to request spork data from connected peers.
const char * QSIGSHARESINV
const char * MNAUTH
The mnauth message is used authenticate MN connections.
const char * INV
The inv message (inventory message) transmits one or more inventories of objects known to the transmi...
const std::vector< std::string > & getAllNetMessageTypes()
GetDataMsg
getdata message types
@ MSG_QUORUM_JUSTIFICATION
@ MSG_MASTERNODE_ANNOUNCE
@ MSG_MASTERNODE_SCANNING_ERROR
@ MSG_BUDGET_FINALIZED_VOTE
@ MSG_QUORUM_PREMATURE_COMMITMENT
@ MSG_QUORUM_RECOVERED_SIG
@ MSG_QUORUM_FINAL_COMMITMENT
const std::vector< std::string > & getTierTwoNetMessageTypes()
ServiceFlags
nServices flags
#define SER_WRITE(obj, code)
void SerReadWriteMany(Stream &s, CSerActionSerialize ser_action, const Args &... args)
#define SER_READ(obj, code)