@@ -54,12 +54,80 @@ Bitcoin infrastructure software.
5454meeting, highlighting some of the important questions and answers. Click on a
5555question below to see a summary of the answer from the meeting.*
5656
57- FIXME is a PR by FIXME that FIXME: LarryRuane
57+ [ Track AddrMan totals by network and table, improve precision of adding fixed seeds] [ review club 26847 ]
58+ is a PR by Martin Zumsande, co-authored by Amiti Uttarwar, that
59+ allows the Bitcoin Core client to more reliably find outbound peers
60+ and distribute them more broadly across available network types (for
61+ example, IPV4, IPV6, tor, i2p). It does this by enhancing ` AddrMan `
62+ (the peer address manager) to keep track of the number of address entries
63+ separately by network and "tried" versus "new" type, which in turn allows
64+ better use of fixed seeds. This is the first step in a larger effort to
65+ improve outbound peer selection.
5866
5967{% include functions/details-list.md
60- q0="FIXME"
61- a0="FIXME"
62- a0link="https://bitcoincore.reviews/FIXME#l-FIXME "
68+ q0="When is a network considered reachable?"
69+ a0="A network is assumed to be reachable unless we're sure we
70+ can't access it, or our configuration has specified one or
71+ more _ other_ networks using the ` -onlynet= ` configuration option
72+ (only those are considered reachable, even if other network
73+ types are actually available).
74+ a0link="https://bitcoincore.reviews/26847#l-22 "
75+
76+ q1="How is an address received over the p2p network treated depending
77+ on whether the address's network is reachable vs. non-reachable --
78+ do we store it (add it to ` AddrMan ` ) and/or forward it to peers?"
79+ a1="If its network is reachable, we relay the address to two
80+ randomly-chosen peers, else we relay it to 1 or 2 peers (whether
81+ 1 or 2 is randomly-chosen).
82+ We only store the address if its network is reachable."
83+ a1link="https://bitcoincore.reviews/26847#l-51 "
84+
85+ q2="How can a node currently get stuck with only unreachable addresses
86+ in ` AddrMan ` , finding no outbound peers? How does this PR fix it?"
87+ a2="If the ` -onlynet ` configuration changes. For example, suppose the
88+ node has always been run with ` -onlynet=ipv4 ` so its AddMan has
89+ no ipv6 addresses. Then the node is restarted with ` -onlynet=ipv6 ` .
90+ The fixed seeds have some ipv6 addresses, but without the PR, the node
91+ won't use them since the ` AddrMan ` isn't _ completely_ empty (it has some
92+ ipv4 addresses from before). With the PR, the startup code will add
93+ some ipv6 fixed seeds, since ` AddrMan ` doesn't contain any addresses
94+ _ of that_ (now reachable) _ network type_ .
95+ a2link="https://bitcoincore.reviews/26847#l-98 "
96+
97+ q3="When an address we'd like to add to ` AddrMan ` collides with an existing
98+ address, what happens? Is the existing address always dropped in favor
99+ of the new address?"
100+ a3="No, generally the existing address is retained (not the new one),
101+ unless the existing address is deemed "terrible"
102+ (see ` AddrInfo::IsTerrible() ` ).
103+ a3link="https://bitcoincore.reviews/26847#l-100 "
104+
105+ q4="Why would it be beneficial to have an outbound connection to each
106+ reachable network at all times?"
107+ a4="A selfish reason is that it's harder to eclipse-attack the node,
108+ since the attacker would need to run nodes on multiple networks.
109+ A non-selfish reason is that it helps keep the overall network
110+ together, avoiding chain splits caused by network partitions.
111+ If half the nodes, including miners, ran with ` -onlynet=x ` and
112+ the other half, including miners, ran ` -onlynet=y ` , then two
113+ chains could emerge."
114+ a4link="https://bitcoincore.reviews/26847#l-114 "
115+
116+ q5="Why is the current logic in ` ThreadOpenConnections() ` , even with
117+ the PR, insufficient to guarantee that the node has an outbound
118+ connection to each reachable network at all times?"
119+ a5="Nothing in the PR _ guarantees_ any particular distribution of
120+ peers among the reachable networks. For example, if we had 10k
121+ clearnet addresses and only 1k I2P addresses in ` AddrMan ` , it's
122+ likely that all our peers will be clearnet (ipv4 or ipv6)."
123+ a5link="https://bitcoincore.reviews/26847#l-123 "
124+
125+ q6="What would be the next steps towards this goal (see the previous
126+ question) after this PR?"
127+ a6="The next planned steps are to add logic to the connection-making
128+ process to attempt to have at least one connection to each
129+ reachable network. This PR prepares for that."
130+ a6link="https://bitcoincore.reviews/26847#l-144 "
63131%}
64132
65133<!-- FIXME:harding to add releases/rc if any on Tuesday -->
@@ -128,3 +196,4 @@ Proposals (BIPs)][bips repo], and [Lightning BOLTs][bolts repo].*
128196[ news230 jam ] : /en/newsletters/2022/12/14/#local-jamming-to-prevent-remote-jamming
129197[ news228 jam ] : /en/newsletters/2022/11/30/#reputation-credentials-proposal-to-mitigate-ln-jamming-attacks
130198[ jam xs ] : https://github.com/ClaraShk/LNJamming/blob/main/meeting-transcripts/23-01-23-transcript.md
199+ [ review club 26847 ] : https://bitcoincore.reviews/26847
0 commit comments