-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Merge bitcoin#15759: p2p: Add 2 outbound block-relay-only connections #4862
Conversation
Transaction relay is primarily optimized for balancing redundancy/robustness with bandwidth minimization -- as a result transaction relay leaks information that adversaries can use to infer the network topology. Network topology is better kept private for (at least) two reasons: (a) Knowledge of the network graph can make it easier to find the source IP of a given transaction. (b) Knowledge of the network graph could be used to split a target node or nodes from the honest network (eg by knowing which peers to attack in order to achieve a network split). We can eliminate the risks of (b) by separating block relay from transaction relay; inferring network connectivity from the relay of blocks/block headers is much more expensive for an adversary. After this commit, bitcoind will make 2 additional outbound connections that are only used for block relay. (In the future, we might consider rotating our transaction-relay peers to help limit the effects of (a).)
We don't want relay of addr messages to leak information about these network links.
If we set fRelay=false in our VERSION message, and a peer sends an INV or TX message anyway, disconnect. Since we use fRelay=false to minimize bandwidth, we should not tolerate remaining connected to a peer violating the protocol.
It's made to avoid possible typos with arguments, because some of them have default values and it's very high probability to make a mistake here.
…factor] Move tx relay state to separate structure`
This pull request has conflicts, please rebase. |
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.
LGTM as a backport. -blocksonly
was broken already and fixing it is out of scope for this PR imo (see #4888)
ACK
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.
utACK for squash merge
All commits there are actually a backport bitcoin#15759 but provided not squashed because it's easier to merge them one-by-one: changes are too big.
Before merge should be all squash except may be 94c99e0
Please, help to decide if need to have spare bloom filter for
vInventoryOtherToSend
becausefilterInventoryKnown
can't be used anymore for relay-only peers. Related merge request in past is #2292commit 189c19e
Merge: b5a8d0c 0ba0802
Author: fanquake fanquake@gmail.com
Date: Sat Sep 7 17:24:05 2019 +0800