-
Notifications
You must be signed in to change notification settings - Fork 20k
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
p2p: new dial scheduler #20592
Merged
Merged
p2p: new dial scheduler #20592
Commits on Jan 24, 2020
-
This change replaces the peer-to-peer dial scheduler with a new and improved implementation. The new code is better than the previous implementation in two key aspects: - The time between discovery of a node and dialing that node is significantly lower in the new version. The old dialState kept a buffer of nodes and launched a task to refill it whenever the buffer became empty. This worked well with the discovery interface we used to have, but doesn't really work with the new iterator-based discovery API. - Selection of static dial candidates (created by Server.AddPeer or through static-nodes.json) performs much better for large amounts of static peers. Connections to static nodes are now limited like dynanic dials and can no longer overstep MaxPeers or the dial ratio.
Configuration menu - View commit details
-
Copy full SHA for 0c3cd1a - Browse repository at this point
Copy the full SHA 0c3cd1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 613ef8d - Browse repository at this point
Copy the full SHA 613ef8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 59556bd - Browse repository at this point
Copy the full SHA 59556bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74208c5 - Browse repository at this point
Copy the full SHA 74208c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 53005af - Browse repository at this point
Copy the full SHA 53005afView commit details
Commits on Jan 28, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c55a42e - Browse repository at this point
Copy the full SHA c55a42eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 105ff6f - Browse repository at this point
Copy the full SHA 105ff6fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c49d09 - Browse repository at this point
Copy the full SHA 3c49d09View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6353685 - Browse repository at this point
Copy the full SHA 6353685View commit details -
Also increase log level for "Can't resolve node"
Configuration menu - View commit details
-
Copy full SHA for 8cefa07 - Browse repository at this point
Copy the full SHA 8cefa07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 323d2f5 - Browse repository at this point
Copy the full SHA 323d2f5View commit details
Commits on Feb 6, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 28d1085 - Browse repository at this point
Copy the full SHA 28d1085View commit details
Commits on Feb 9, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 463842c - Browse repository at this point
Copy the full SHA 463842cView commit details -
p2p: fix maxDialedConns for maxpeers < dialRatio
Always allocate at least one dial slot unless dialing is disabled using NoDial or MaxPeers == 0. Most importantly, this fixes MaxPeers == 1 to dedicate the sole slot to dialing instead of listening.
Configuration menu - View commit details
-
Copy full SHA for af30b4d - Browse repository at this point
Copy the full SHA af30b4dView commit details -
p2p: fix RemovePeer to disconnect the peer again
Also make RemovePeer synchronous and add a test.
Configuration menu - View commit details
-
Copy full SHA for 92e1a62 - Browse repository at this point
Copy the full SHA 92e1a62View commit details -
Configuration menu - View commit details
-
Copy full SHA for 325de0c - Browse repository at this point
Copy the full SHA 325de0cView commit details -
p2p: clean up connection logging
We previously logged outgoing connection failures up to three times. - in SetupConn() as "Setting up connection failed addr=..." - in setupConn() with an error-specific message and "id=... addr=..." - in dial() as "Dial error task=..." This commit ensures a single log message is emitted per failure and adds "id=... addr=... conn=..." everywhere (id= omitted when the ID isn't known yet). Also avoid printing a log message when a static dial fails but can't be resolved because discv4 is disabled. The light client hit this case all the time, increasing the message count to four lines per failed connection.
Configuration menu - View commit details
-
Copy full SHA for df6ae09 - Browse repository at this point
Copy the full SHA df6ae09View commit details -
Configuration menu - View commit details
-
Copy full SHA for a132830 - Browse repository at this point
Copy the full SHA a132830View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.