Skip to main content

Module inbound

Module inbound 

Source
Expand description

The inbound service handles requests from Zebra’s peers.

It downloads and verifies gossiped blocks and mempool transactions, when Zebra is close to the chain tip.

It also responds to peer requests for blocks, transactions, and peer addresses.

ModulesΒ§

cached_peer_addr_response πŸ”’
Periodically-refreshed GetAddr response for the inbound service.
downloads πŸ”’
A download stream that handles gossiped blocks from peers.

StructsΒ§

Inbound
Uses the node state to respond to inbound peer requests.
InboundSetupData
The services used by the Inbound service.
SharedRecvError
A wrapper around Arc<TryRecvError> that implements Error.

EnumsΒ§

Setup
Tracks the internal state of the Inbound service during setup.

ConstantsΒ§

GETDATA_MAX_TRANSACTION_COUNT
The maximum number of transaction IDs the Inbound service will look up in the mempool in response to a transaction request, before ignoring any additional transaction IDs in that request.
GETDATA_SENT_BYTES_LIMIT
The number of bytes the Inbound service will queue in response to a single block or transaction request, before ignoring any additional block or transaction IDs in that request.
MAX_INBOUND_RESPONSE_TIME
The maximum amount of time an inbound service response can take.

FunctionsΒ§

compact_request πŸ”’
Screens compact requests without publishing bodies or caching probabilistic failure verdicts.
screen_compact_header πŸ”’
Rejects malformed or unauthenticated headers before exposing local mempool membership.

Type AliasesΒ§

BlockDownloadPeerSet πŸ”’
GossipedBlockDownloads πŸ”’
Mempool πŸ”’
SemanticBlockVerifier πŸ”’
State πŸ”’