Add network node whitelisting based on jgarzik's previous pull req.#3584
Add network node whitelisting based on jgarzik's previous pull req.#3584TheBlueMatt wants to merge 1 commit intobitcoin:masterfrom
Conversation
This takes jgarzik's previous pullreq and rejiggers a few things so that you can now add IP:0 to allow any port and so that banned nodes can make incoming connections as well. Also fixes an off-by-one in the param count for the listwhite RPC.
|
Would it make sense to add fWhiteListed to CNode, set at first connection, and then checked later when necessary? |
|
I think we should also make transactions received on whitelisted connections always propagate, even if we already had them. This is so that rebroadcasts of wallet transactions behind "us" do not get shielded. |
|
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/f9463ded6872e86748819d0e4f7e8330e0257a72 for binaries and test log. |
|
Don't CNodes get deleted after disconnection? Yes, bitcoind could be forced to relay everything it receives from a whitelisted node, but I don't have time to implement it (I just needed this for another project) :). |
|
Slightly OT, but what about adding a trusted nodes option so that blocks/transactions from these nodes don't need to be checked before being accepted? Or would it be better to use a node-based signature for this instead of relying on IP addresses? |
|
Closing in favor of #4378 |
|
Yes, comment updated |
|
I think you meant #4378. |
This takes jgarzik's previous pullreq (#3403) and rejiggers a few things so that you can now add IP:0 to allow any port and so that banned nodes can make incoming connections as well. Also fixes an off-by-one in the param count for the listwhite RPC.