-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Hi! I'm proposing some changes to addr
handling in Bitcoin Core, and trying to ensure there will not be negative consequences for other clients on the network. For more information about the changes, please see my mailing list post. The crux is that, if the changes are accepted, bitcoin core would stop sending addr
messages to inbound peers who don't "indicate interest" aka initiate an addr-related message (addr, addrv2, getaddr, or sendaddrv2).
I'd like to ensure that bitcore clients will initiate an addr related message to outbound peers. I've looked in the code and its possible my proposed change to bitcoin core would cause issues for bitcore clients. Can someone help confirm my understanding?
For this concern to be relevant, a fundamental question is: do bitcore nodes rely on decentralized address discovery (aka sending addr
p2p messages) to identify nodes to connect to? If no, this concern is irrelevant. I found this snippet of code which suggests to me that the node uses DNS seeds to get addresses. Is this the sole technique, or just the one for bootstrapping?
If decentralized address discovery is used, then the next question is: do bitcore nodes initiate any addr messages to outbound connections?
Here are some relevant code snippets I have found
- A "todo" to self advertise when constructing a
version
message (link) - It looks like a function is defined to send a
getaddr
message here, but I'm unable to find where this is invoked. I'm very unfamiliar with javascript, so I might just be misunderstanding the code. - I looked the code in
bitcore/packages/bitcore-p2p/lib/peer.js
and can't seem to find anywhere that
would send anaddr
orgetaddr
message.
None of these components demonstrate to me exactly what the address expectations & behavior is. Since my ability to follow this code is minimal, I'd really appreciate some help identifying if this is a point of concern.
Thanks in advance!
Amiti