Module transactions

Source
Expand description

Transactions management for the p2p network.

Re-exports§

pub use self::constants::tx_fetcher::DEFAULT_SOFT_LIMIT_BYTE_SIZE_POOLED_TRANSACTIONS_RESP_ON_PACK_GET_POOLED_TRANSACTIONS_REQ;
pub use self::constants::SOFT_LIMIT_BYTE_SIZE_POOLED_TRANSACTIONS_RESPONSE;
pub use config::TransactionFetcherConfig;
pub use config::TransactionPropagationMode;
pub use config::TransactionPropagationPolicy;
pub use config::TransactionsManagerConfig;
pub use validation::*;

Modules§

config
Aggregation on configurable parameters for TransactionsManager.
constants
Default and spec’d bounds.
fetcher
Component responsible for fetching transactions from [NewPooledTransactionHashes]. TransactionFetcher is responsible for rate limiting and retry logic for fetching transactions. Upon receiving an announcement, functionality of the TransactionFetcher is used for filtering out hashes 1) for which the tx is already known and 2) unknown but the hash is already seen in a previous announcement. The hashes that remain from an announcement are then packed into a request with respect to the [EthVersion] of the announcement. Any hashes that don’t fit into the request, are buffered in the TransactionFetcher. If on the other hand, space remains, hashes that the peer has previously announced are taken out of buffered hashes to fill the request up. The [GetPooledTransactions] request is then sent to the peer’s session, this marks the peer as active with respect to MAX_CONCURRENT_TX_REQUESTS_PER_PEER.
validation
Validation of NewPooledTransactionHashes66 and NewPooledTransactionHashes68 announcements. Validation and filtering of announcements is network dependent.

Structs§

PeerMetadata
Tracks a single peer in the context of TransactionsManager.
PendingPoolImportsInfo
Tracks stats about the TransactionsManager.
TransactionsHandle
Api to interact with TransactionsManager task.
TransactionsManager
Manages transactions on top of the p2p network.

Enums§

NetworkTransactionEvent
All events related to transactions emitted by the network.

Type Aliases§

PoolImportFuture
The future for importing transactions into the pool.