Peer addresses that match the criteria from the GetPeerAddresses request.
GetHeaders
Size
Name
Data Type
Description/Comments
1
Size
uint8_t
The number of headers being requested.
?
Hashes
Hash[]
The 32-byte Blake2b hashes of the block headers being requested.
Header
Size
Name
Data Type
Description/Comments
2
Version
uint16
The version of the block.
8
Height
uint64
Height of this block since the genesis block (height 0).
8
Timestamp
int64
Timestamp at which the block was built.
32
Previous
Hash
Blake2b hash of the block previous to this in the chain.
32
PreviousRoot
Hash
Merklish root of all the commitments in the previous block's TxHashSet.
32
OutputRoot
Hash
Merklish root of all the commitments in the TxHashSet.
32
RangeProofRoot
Hash
Merklish root of all range proofs in the TxHashSet.
32
KernelRoot
Hash
Merklish root of all transaction kernels in the TxHashSet.
32
TotalKernelOffset
BlindingFactor
Total accumulated sum of kernel offsets since genesis block.
8
OutputMMRSize
uint64
Total size of the output Merkle Mountain Range(MMR) after applying this block.
8
KernelMMRSize
uint64
Total size of the kernel MMR after applying this block.
178
ProofOfWork
ProofOfWork
Proof of work and related.
Headers
Size
Name
Data Type
Description/Comments
2
Size
uint16_t
The number of headers received.
?
Headers
BlockHeader[]
The headers matching the hashes provided in the GetBlockHeaders request.
GetBlock
Size
Name
Data Type
Description/Comments
32
BlockHash
Hash
The Blake2b hash of the block being requested.
Block
Size
Name
Data Type
Description/Comments
405
Header
BlockHeader
The block header.
?
Body
TransactionBody
The block transaction containing the inputs, outputs, and kernel(s).
GetCompactBlock
Size
Name
Data Type
Description/Comments
32
BlockHash
Hash
The Blake2b hash of the compact block being requested.
CompactBlock
Size
Name
Data Type
Description/Comments
405
Header
BlockHeader
The header with metadata and commitments to the rest of the data.
8
Nonce
uint64
Nonce for connection specific short_ids.
?
Body
CompactBlockBody
Container for out_full, kern_full and kern_ids in the compact block.
StemTransaction
Size
Name
Data Type
Description/Comments
32
Offset
BlindingFactor
The kernel "offset" k2.
?
Body
TransactionBody
The transaction body containing the inputs, outputs, and kernel(s).
Transaction
Size
Name
Data Type
Description/Comments
32
Offset
BlindingFactor
The kernel "offset" k2.
?
Body
TransactionBody
The transaction body containing the inputs, outputs, and kernel(s).
TxHashSetRequest
Size
Name
Data Type
Description/Comments
32
BlockHash
Hash
Blake2b hash of the block for which the TxHashSet should be provided.
8
Height
uint64
Height of the corresponding block.
TxHashSetArchive
The response to a TxHashSetRequest. Includes a zip stream of the archive after the message body.
Size
Name
Data Type
Description/Comments
32
BlockHash
Hash
Blake2b hash of the block for which the txhashset are provided.
8
Height
uint64
Height of the corresponding block.
8
Bytes
uint64
Size in bytes of the archive.
BanReason
Size
Name
Data Type
Description/Comments
4
BanReason
ReasonForBanEnum
The reason for the ban.
Protocol Versions and Capabilities
Capabilities
Any feature that users will have the ability to disable should be implemented as a new capability (See CapabilitiesMask above). This includes things like archive mode/full history.
Protocol Version
Any change to the p2p protocol that is not toggled by the addition of a new capability should result in an increase in protocol version (See Hand & Shake messages above). This includes any addition or removal of a field or entire message, or any backward-incompatible behavior change to an existing field or message. When interacting with peers on an older protocol version, backward compatibility must be maintained, so the newer node should follow the rules of the older protocol version.
Phasing out old peers
To reduce the long-term complexity of the code, we can periodically bump the "major" protocol version. Although the protocol version is just a uint32, we can consider every increase by 1000 a new "major" protocol version. We can then gracefully phase out stubborn peers that refuse to upgrade by only supporting 1 major protocol version in the past. Here's what this would look like in practice:
Peers with a protocol version in the range [0-999] should be able to interact with any peer in the range [0-1999].
Peers with a protocol version in the range [1000-1999] should be able to interact with any peer in the range [0-2999].
Peers with a protocol version in the range [2000-2999] should be able to interact with any peer in the range [1000-3999].
Determining when to increase the "major" version is left up to the discretion of the developers. Care must be taken to ensure we are not increasing too quickly however, as any major bump could result in the inability to connect to certain older peers.