Skip to content

Question about addr handling #1709

@amitiuttarwar

Description

@amitiuttarwar

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 peers who don't "indicate interest" aka initiate an addr-related message (addr, addrv2, getaddr, or sendaddrv2).

So, I'd like to ensure that btcd clients will initiate an addr related message to outbound peers. I've looked in the code and believe the software plays nice, and am looking for a +1 from someone more familiar with this project.

In server.go, I believe the peerHandler() calls handleAddPeerMsg when the node connects to a new peer (link). The logic of that function seems like if it successfully connects to an outbound peer on mainnet, it will send an addr message to self advertise, and sometimes send a getaddr message (link). Is this an accurate interpretation?

If my understanding is right, there should be no compatibility issues with my proposed changes.

tldr; I'm proposing a change to Bitcoin Core and want to make sure it does not break btcd, can someone confirm my understanding of the code?

Thanks in advance!
Amiti

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions