Skip to main content

Module maintain

Module maintain 

Source
Expand description

Transaction pool maintenance tasks.

Structsยง

KeyExpiryTracker ๐Ÿ”’
Tracks keychain key expiry timestamps for eviction.
KeyId ๐Ÿ”’
Composite key identifying a keychain key: (account, key_id).
PendingStalenessTracker ๐Ÿ”’
Tracks pending transactions across snapshots to detect stale transactions.
TempoPoolState ๐Ÿ”’
Tracking state for pool maintenance operations.
TempoPoolUpdates
Aggregated block-level invalidation events for the transaction pool.

Constantsยง

DEFAULT_PENDING_STALENESS_INTERVAL ๐Ÿ”’
Default interval for pending transaction staleness checks (30 minutes). Transactions that remain pending across two consecutive snapshots will be evicted.
EVICTION_BUFFER_SECS ๐Ÿ”’
Evict transactions this many seconds before they expire to reduce propagation of near-expiry transactions that are likely to fail validation on peers.

Functionsยง

evict_underpriced_transactions_for_t1 ๐Ÿ”’
Removes transactions with max_fee_per_gas below the T1 base fee from the pool.
handle_reorg
Handles a reorg event by identifying orphaned AA 2D transactions from the old chain that are not in the new chain.
maintain_tempo_pool
Unified maintenance task for the Tempo transaction pool.