Skip to main content

Module compact_relay

Module compact_relay 

Source
Expand description

Opt-in compact block transport for committed blocks.

A negotiated peer announces a new block as its header, short transaction IDs and coinbase. The receiver rebuilds the block from its mempool, asks once for the transactions it is missing, and falls back to an ordinary getdata on any problem. Consensus checks and source scoring remain in the ordinary downloader.

Structsยง

CompactRelay ๐Ÿ”’
ServingBlock ๐Ÿ”’

Constantsยง

ANNOUNCED_BLOCKS ๐Ÿ”’
The number of blocks a connection remembers its peer announcing in compact form.
MAX_RECOVERY_REPLIES ๐Ÿ”’
The number of transaction recovery requests answered for each delivered announcement.
RECOVERY_TIMEOUT ๐Ÿ”’
RETENTION ๐Ÿ”’

Staticsยง

RECEIVED_SLOTS ๐Ÿ”’
SENT_SLOTS ๐Ÿ”’

Functionsยง

encoded_size ๐Ÿ”’
Returns the number of bytes in valueโ€™s encoding, or None if its encoding fails.
response_timer ๐Ÿ”’
Returns the timer for the response to handler.
smaller_announcement ๐Ÿ”’
Returns compact if its encoding is smaller than blockโ€™s encoding.