Skip to main content

Module tx_fetcher

Module tx_fetcher 

Source
Expand description

Constants used by TransactionFetcher.

Constants§

AVERAGE_BYTE_SIZE_TX_ENCODED
Assumed byte size of a transaction whose size wasn’t announced, used when packing requests.
DEFAULT_MAX_CAPACITY_CACHE_PENDING_FETCH
Default maximum number of announced transaction hashes to keep track of, pending and inflight. Once reached, the peer tracking the most hashes gives up its oldest pending hash for a newly announced one.
DEFAULT_MAX_COUNT_ANNOUNCED_HASHES_PER_PEER
Default maximum number of tracked hashes a single peer can be a candidate for. Bounds the memory a single peer can occupy in the fetcher with its announcements.
DEFAULT_MAX_COUNT_CONCURRENT_REQUESTS
Default maximum number of concurrent GetPooledTransactions requests.
DEFAULT_MAX_COUNT_CONCURRENT_REQUESTS_PER_PEER
Default maximum number of concurrent GetPooledTransactions requests per peer.
DEFAULT_SOFT_LIMIT_BYTE_SIZE_POOLED_TRANSACTIONS_RESP_ON_PACK_GET_POOLED_TRANSACTIONS_REQ
Default soft limit for the byte size of the expected PooledTransactions response when packing a GetPooledTransactions request. This is much smaller than the 2 MiB SOFT_LIMIT_BYTE_SIZE_POOLED_TRANSACTIONS_RESPONSE applied when assembling a response, so that a single request fetches at most about one blob transaction and doesn’t hog the connection to a peer.
MAX_COUNT_CANDIDATE_PEERS_PER_HASH
Maximum number of peers remembered as candidates for a single hash. The first eager sources are retained while later announcements replace the oldest fallback sources.
MAX_COUNT_EAGER_CANDIDATE_PEERS_PER_HASH
Number of candidates a hash is queued for right away. The remaining candidates only get the hash queued once one of these failed to deliver it, which keeps late announcements cheap while a hash is not given up on when its first announcers fail.
MAX_FETCH_ATTEMPTS_PER_HASH
Maximum fetch attempts for a single hash, independent of candidate storage capacity.