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
GetPooledTransactionsrequests. - DEFAULT_
MAX_ COUNT_ CONCURRENT_ REQUESTS_ PER_ PEER - Default maximum number of concurrent
GetPooledTransactionsrequests 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
PooledTransactionsresponse when packing aGetPooledTransactionsrequest. This is much smaller than the 2 MiBSOFT_LIMIT_BYTE_SIZE_POOLED_TRANSACTIONS_RESPONSEapplied 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.