Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intelligently request the same transaction from multiple nodes #1743

Closed
mrBliss opened this issue Mar 4, 2020 · 1 comment
Closed

Intelligently request the same transaction from multiple nodes #1743

mrBliss opened this issue Mar 4, 2020 · 1 comment
Assignees
Labels
optimisation Performance optimisation tx-submission Issues related to tx-submission protocol

Comments

@mrBliss
Copy link
Contributor

mrBliss commented Mar 4, 2020

Splitting off option (3) from #1161:

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.

@coot
Copy link
Contributor

coot commented Dec 20, 2023

Duplicate of #3311.

@coot coot closed this as completed Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimisation Performance optimisation tx-submission Issues related to tx-submission protocol
Projects
Status: No status
Development

No branches or pull requests

3 participants