-
Notifications
You must be signed in to change notification settings - Fork 707
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
Fix nodes wasting bandwidth during sync due to transactions #6434
Comments
The way this works in many Bitcoin-derived networks is:
Is that the kind of solution you’re aiming for here? In Bitcoin, nodes that push too much unrequested data tend to get banned, to avoid wastage/attacks like this. |
Yes, second part of the solution is in #6433 and is independent from the issue described here |
Here is how it can be done once synced status information is available (#5624): autonomys@94a1a81?w=1 |
We really need a better transaction syncing protocol. There are ideas to use one of the bitcoin set reconciliation protocols. This should probably help here as well. |
Yes, we need improvements here for sure. New protocol is something I'd like to work on in mid-term future. I have some improvements to be made in fork-aware pool. Once they are done I could start looking into new protocol. |
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Motivation
On a busy network there could be quite some bandwidth occupied by transactions. However, when node is still syncing, there is no point in downloading transactions, which is exactly what is checked here:
polkadot-sdk/substrate/client/network/transactions/src/lib.rs
Lines 403 to 409 in edf79aa
The problem is that it is the receiving side! The node is already using a bunch of bandwidth trying to download blocks as fast as possible to import them, there is no point in receiving useless transactions on top of that, especially if they are large.
But there is a double bottom to this problem: wasteful bandwidth usage even when node is synced: #6433
Together situation can be very bad from my observation on our network for peers with slower network connection.
Request
Do not send transactions to syncing peers
Solution
This issue can be efficiently addressed with suggestions from #5624 (where frustratingly I'm yet to receive any feedback) where solution is for peers to voluntarily announce to each other if they are synced. This way sender can make a local decision whether it makes sense to propagate transactions to a particular peer or not.
Addressing both this and #5624 will likely require an RFC.
Are you willing to help with this request?
Yes!
The text was updated successfully, but these errors were encountered: