-
Notifications
You must be signed in to change notification settings - Fork 38.8k
doc: update helps for addnode rpc and -addnode/-maxconnections config options #21710
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
Conversation
|
Interesting. I didn't know Will have to test today and maybe ask related questions here or SE or Reddit. |
Thanks @prayank23. Indeed, as it's not documented AFAIK except in the 0.14 release notes a few years back, I imagine that many users won't ever know unless they look into the codebase, e.g. in static const int MAX_ADDNODE_CONNECTIONS = 8;and then verifying how the constant is used, or they infer it by using |
Maybe I missed it when I was experimenting with outgoing connections few days back: https://bitcoin.stackexchange.com/questions/103753/increase-maximum-number-of-outgoing-connections-for-full-node I should have tried Not sure what's the best way to test this. I tried adding random nodes from https://bitnodes.io/nodes/?q=United%20States using Added |
|
@prayank23 thanks for having a look. If you run a node with more than 8 Codewise, I suggest looking at the code returned by |
jarolrod
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK b4fcbcf
Looks good to me. Documenting in the help that addnode connections are counted separately from maxconnections is useful context to add.
FWIW, I found #6014 to be an interesting discussion about connection counts. |
|
ACK b4fcbcf
Thanks for sharing the link. I have 3 follow up questions after reading few things in that PR:
|
See #4687. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
…maxconnections config options b4fcbcf doc: update -maxconnections config option help (Jon Atack) 79685a8 doc: update -addnode config option help (Jon Atack) 2896c6c doc: update addnode rpc help (Jon Atack) Pull request description: Since bitcoin#9319 proposed by Gregory Maxwell and released in v0.14, peers manually added through the `-addnode` config option or using the `addnode` RPC have their own separate limit of 8 connections that does not compete with other inbound or outbound connection usage and is not subject to the limitation imposed by the `-maxconnections` option. This PR updates the `-addnode` and `-maxconnections` config options and the `addnode` RPC help docs with this information. `-addnode` config option help ``` $ bitcoind -h | grep -A5 addnode= -addnode=<ip> Add a node to connect to and attempt to keep the connection open (see the addnode RPC help for more info). This option can be specified multiple times to add multiple nodes; connections are limited to 8 at a time and are counted separately from the -maxconnections limit. $ bitcoind -h | grep -A3 maxconnections= -maxconnections=<n> Maintain at most <n> connections to peers (default: 125). This limit does not apply to connections manually added via -addnode or the addnode RPC, which have a separate limit of 8. ``` `addnode` rpc help ``` $ bitcoin-cli help addnode addnode "node" "command" Attempts to add or remove a node from the addnode list. Or try a connection to a node once. Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be full nodes/support SegWit as other outbound peers are (though such peers will not be synced from). Addnode connections are limited to 8 at a time and are counted separately from the -maxconnections limit. ``` ACKs for top commit: prayank23: ACK bitcoin@b4fcbcf jarolrod: ACK b4fcbcf Tree-SHA512: b6d69baa6cbf6d53f91bac5b39b549d49db6c95f92ea1bdd3588a6432794a25ac2c8b3c89e2c72bb9097e61f2717c8b5ecc404745d5992b88e523db03200898f
Since #9319 proposed by Gregory Maxwell and released in v0.14, peers manually added through the
-addnodeconfig option or using theaddnodeRPC have their own separate limit of 8 connections that does not compete with other inbound or outbound connection usage and is not subject to the limitation imposed by the-maxconnectionsoption.This PR updates the
-addnodeand-maxconnectionsconfig options and theaddnodeRPC help docs with this information.-addnodeconfig option helpaddnoderpc help