You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep track of which TxIds we're asking from which peers and don't ask for the same one from multiple peers unless that would otherwise cause things to stall, in which case we should make another request for the same TxId.
Say a node just connected to the network and has an empty Mempool, it might end up requesting the exact same transaction (the first tx in all the other nodes' Mempools) from all nodes concurrently.
Just like for BlockFetch, we could have a "bulk sync" mode (don't request the same tx from multiple nodes, maximise bandwidth) and a "deadline" mode (request the same tx from a configurable number of nodes, minimise latency), based on, e.g., Mempool size.
Potential approach: keep a Map txid ConcurrentRequests in (a var in) the NodeKernel (like RecentTxIds in #1476) where the ConcurrentRequests is a Word. Not just a Set txid, because we want to allow concurrent requests in the deadline mode. We have to be careful with requests that don't get replies, they should be retried after a timeout.
The text was updated successfully, but these errors were encountered:
Splitting off option (3) from #1161:
Say a node just connected to the network and has an empty Mempool, it might end up requesting the exact same transaction (the first tx in all the other nodes' Mempools) from all nodes concurrently.
Just like for BlockFetch, we could have a "bulk sync" mode (don't request the same tx from multiple nodes, maximise bandwidth) and a "deadline" mode (request the same tx from a configurable number of nodes, minimise latency), based on, e.g., Mempool size.
Potential approach: keep a
Map txid ConcurrentRequests
in (a var in) theNodeKernel
(likeRecentTxIds
in #1476) where theConcurrentRequests
is aWord
. Not just aSet txid
, because we want to allow concurrent requests in the deadline mode. We have to be careful with requests that don't get replies, they should be retried after a timeout.The text was updated successfully, but these errors were encountered: