Protocol Messages

This chapter describes protocol messages, and documents the current protocol messages. Protocol messages are used to share protocol data like blocks and transactions.

Levin

All protocol messages are in the notification levin format. Although there are some messages that fall under requests/responses, levin will treat them as notifications.

All admin messages are in the request/response levin format. This means requests will set the expect response bit and responses will set the return code to 1.

Messages

Notify New Block

ID: 20011

FieldsTypeDescription
bBlock Complete EntryThe full block
current_blockchain_heightu64The current chain height

Notify New Transactions

ID: 20022

FieldsTypeDescription
txsA vector of bytesThe txs
_BytesPadding to prevent traffic volume analysis
dandelionpp_fluffboolTrue if this message contains fluff txs, false if stem

Notify Request Get Objects

ID: 20033

FieldsTypeDescription
blocksA vector of [u8; 32] serialized as a single stringThe block IDs requested
pruneboolTrue if we want the blocks in pruned form, false otherwise

Notify Response Get Objects

ID: 20044

FieldsTypeDescription
blocksA vector of Block Complete EntryThe blocks that were requested
missed_idsA vector of [u8; 32] serialized as a single stringIDs of any missed blocks
current_blockchain_heightu64The current blockchain height

Notify Request Chain

ID: 20065

FieldsTypeDescription
block_idsA vector of [u8; 32] serialized as a single stringA list of block IDs in reverse chronological order, the top and genesis block will always be included
pruneboolTrue if we want the response to contain pruned blocks, false otherwise

Notify Response Chain Entry

ID: 20076

FieldsTypeDescription
start_heightu64The start height of the entry
total_heightu64The height of the peer's blockchain
cumulative_difficultyu64The low 64 bits of the cumulative difficulty
cumulative_difficulty_top64u64The high 64 bits of the cumulative difficulty
m_block_idsA vector of [u8; 32] serialized as a single stringThe block IDs in this entry
m_block_weightsA vector of u64 serialized as a single stringThe block weights
first_blockbytes (epee string)The header of the first block in m_block_ids

Notify New Fluffy Block

ID: 20087

FieldsTypeDescription
bBlock Complete EntryThe block, may or may not contain txs
current_blockchain_heightu64The current chain height

Notify Request Fluffy Missing Tx

ID: 20098

FieldsTypeDescription
block_hash[u8; 32] serialized as a stringThe block hash txs are needed from
current_blockchain_heightu64The current chain height
missing_tx_indicesA vector of u64 serialized as a single stringThe indices of the needed txs in the block

Notify Get Txpool Compliment

ID: 20109

FieldsTypeDescription
hashesA vector of [u8; 32] serialized as a stringThe current txpool txs

6

https://github.com/monero-project/monero/blob/cc73fe71162d564ffda8e549b79a350bca53c454/src/cryptonote_protocol/cryptonote_protocol_defs.h#L291