Module transactions
Expand description
Transactions management for the p2p network.
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 theTransactionFetcher
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 theEthVersion
of the announcement. Any hashes that don’t fit into the request, are buffered in theTransactionFetcher
. 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. TheGetPooledTransactions
request is then sent to the peer’s session, this marks the peer as active with respect toMAX_CONCURRENT_TX_REQUESTS_PER_PEER
. - policy
- Defines the
TransactionPolicies
trait for aggregating transaction-related policies.
Structs§
- Peer
Metadata - Tracks a single peer in the context of
TransactionsManager
. - Pending
Pool Imports Info - Tracks stats about the
TransactionsManager
. - Transaction
Fetcher Config - Configuration for fetching transactions.
- Transactions
Handle - Api to interact with
TransactionsManager
task. - Transactions
Manager - Manages transactions on top of the p2p network.
- Transactions
Manager Config - Configuration for managing transactions within the network.
Enums§
- Network
Transaction Event - All events related to transactions emitted by the network.
- Transaction
Propagation Mode - Determines how new pending transactions are propagated to other peers in full.
Constants§
- DEFAULT_
SOFT_ LIMIT_ BYTE_ SIZE_ POOLED_ TRANSACTIONS_ RESP_ ON_ PACK_ GET_ POOLED_ TRANSACTIONS_ REQ - Default soft limit for the byte size of a
PooledTransactions
response on assembling aGetPooledTransactions
request. This defaults to less than theSOFT_LIMIT_BYTE_SIZE_POOLED_TRANSACTIONS_RESPONSE
, at 2 MiB, used when assembling aPooledTransactions
response. - SOFT_
LIMIT_ BYTE_ SIZE_ POOLED_ TRANSACTIONS_ RESPONSE - Soft limit for the byte size of a
PooledTransactions
response on assembling aGetPooledTransactions
request.
Traits§
- Announcement
Filtering Policy - A policy that defines how to handle incoming transaction announcements, particularly concerning transaction types and other announcement metadata.
- Transaction
Propagation Policy - A policy defining which peers pending transactions are gossiped to.
Type Aliases§
- Pool
Import Future - The future for importing transactions into the pool.