fatxpool
: optimize per-transaction listeners
#7071
Labels
T0-node
This PR/Issue is related to the topic “node”.
fatxpool
: optimize per-transaction listeners
#7071
During 2s block investigation it turned out that
ForkAwareTxPool::register_listeners
call takes significant amount of time.As the current implementation was delivered in the sprit of "make it work, make it fast", the time for optimization has come. Here is the idea.
Instead of having a single listener for every transaction in every view, we need to use the single stream of aggregated events for every transaction in the single view.
Some implementation details / hints:
(tx_hash, status)
, new stream needs to be added here, and should follow logic ofdropped_by_limits_sink
.(block_hash,status)
, per-tx msgs: invalidated, drpoped, finalzied, broadcated) and implements required logic (which currently is implemneted inExternalWatcherContext
,create_external_watcher
adds a new channel (rx
,tx
) between an unfolded stream (external listener instance) and mvl task. New enum for messages is needed.Brain dump pic attached for the record.
The text was updated successfully, but these errors were encountered: