Module transactions
Expand description
Transactions management for the p2p network.
Modules§
- Aggregation on configurable parameters for
TransactionsManager
. - Default and spec’d bounds.
- 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 the [EthVersion
] 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. The [GetPooledTransactions
] request is then sent to the peer’s session, this marks the peer as active with respect toMAX_CONCURRENT_TX_REQUESTS_PER_PEER
. - Validation of
NewPooledTransactionHashes66
andNewPooledTransactionHashes68
announcements. Validation and filtering of announcements is network dependent.
Structs§
- Filter for announcements containing EIP
TxType
s. - Wrapper for types that implement
FilterAnnouncement
. The definition of a valid announcement is network dependent. For example, different networks support differentTxType
s, and differentTxType
s have different transaction size constraints. Defaults toEthMessageFilter
. - Tracks a single peer in the context of
TransactionsManager
. - Tracks stats about the
TransactionsManager
. - Configuration for fetching transactions.
- Api to interact with
TransactionsManager
task. - Manages transactions on top of the p2p network.
- Configuration for managing transactions within the network.
Enums§
- Outcome from filtering
NewPooledTransactionHashes68
. Signals to caller whether to penalize the sender of the announcement or not. - All events related to transactions emitted by the network.
- Determines how new pending transactions are propagated to other peers in full.
- Outcomes from validating a
(ty, hash, size)
entry from aNewPooledTransactionHashes68
. Signals to the caller how to deal with an announcement entry and the peer who sent the announcement.
Constants§
- 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. - The size of a decoded signature in bytes.
- Soft limit for the byte size of a
PooledTransactions
response on assembling aGetPooledTransactions
request.
Traits§
- Filters valid entries in
NewPooledTransactionHashes68
andNewPooledTransactionHashes66
in place, and flags misbehaving peers. - Generic filter for announcements and responses. Checks for empty message and unique hashes/ transactions in message.
- Interface for validating a
(ty, size, hash)
tuple from aNewPooledTransactionHashes68
..
Type Aliases§
- The future for importing transactions into the pool.