Skip to content
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

multi: Add getaddrv2 and addrv2. #2627

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Commits on Feb 7, 2022

  1. addrmgr: Track network address types.

    This commit adds support for determining and tracking the type of a
    network address when constructed.
    sefbkn committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    650a935 View commit details
    Browse the repository at this point in the history
  2. addrmgr: Add network address type filter.

    This commit introduces a network address type filter that allows a
    caller to indicate the types of addresses that can be returned from
    the address manager.  This allows finer control of what types of
    addresses may be broadcast to a particular peer.  The filters are
    decided by the protocol version of the peer in a way that allows the
    address manager's internal implementation to remain agnostic of the
    protocol versioning logic.
    sefbkn committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    77e2118 View commit details
    Browse the repository at this point in the history
  3. peer: Partially decouple peer from wire.

    This prevents sending addresses in a version message that cannot be
    converted to a wire network address.
    sefbkn committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    2d13ac7 View commit details
    Browse the repository at this point in the history
  4. addrmgr: Remove DNS lookups from address manager.

    This removes the need to perform DNS lookups in the address manager.
    sefbkn committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    a32aa05 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2022

  1. addrmgr: Add TORv3 network address type.

    This change adds support for TORv3 addresses to the address
    manager.  It also allows connecting to a TORv3 hostname with the
    cli --connect flag when starting dcrd.  It does not support relaying
    TORv3 addresses over the peer to peer network.
    sefbkn committed Feb 26, 2022
    Configuration menu
    Copy the full SHA
    ddf3d7d View commit details
    Browse the repository at this point in the history
  2. multi: Remove TORv2 network address type.

    This change removes support for the TORv2 network address
    persistence and propogation across the peer to peer network.
    sefbkn committed Feb 26, 2022
    Configuration menu
    Copy the full SHA
    27215a0 View commit details
    Browse the repository at this point in the history
  3. peer/wire: Add addrv2 and getaddrv2 message types.

    This commit modifies the wire protocol by adding two new message
    types addrv2 and getaddrv2 and bumps the wire protocol version to 10.
    It does not introduce any new network address types and is intended
    to implement the minimum framework necessary to support easily adding
    new address types in future commits.
    
    These two new message types are intended to eventually replace their
    older counterparts, which are getaddr and addr respectively.  A peer
    sending a getaddrv2 or addrv2 message with a protocol version less than
    10 is in violation of the wire protocol and the peer is disconnected.
    Similarly, peers advertising a protocol version greater than or equal
    to 10 that send an addr or gettaddr message are in violation of the wire
    protocol and are disconnected.
    
    A getaddrv2 message is similar in structure and purpose to a getaddr
    message in that it has no payload and functions as a request for a peer
    to reply with an addrv2 message if it has addresses to share. An addrv2
    message is similar in structure and function to an addr message
    with a few key differences:
    
    - Port is now encoded as a little endian value rather than big endian.
    - Timestamp is encoded as a 64 bit value rather than a 32 bit value.
    - A network address type field is now serialized with each address to
      indicate the length and type of the address it precedes.
    - A message with zero addresses is no longer serializable.
    - Addresses are serialized their most compact form, rather than
      always being encoded into a 16 byte structure.
    sefbkn committed Feb 26, 2022
    Configuration menu
    Copy the full SHA
    404ec69 View commit details
    Browse the repository at this point in the history
  4. connmgr: Allow seeding additional address types.

    This commit adds support for address types supported by the address
    manager when recieving addresses from a seeder.
    sefbkn committed Feb 26, 2022
    Configuration menu
    Copy the full SHA
    c8b98b1 View commit details
    Browse the repository at this point in the history
  5. peer/wire: Relay TORv3 addresses.

    This commit relays TORv3 addresses across the peer to peer network and
    bumps the wire protocol version to 11.
    sefbkn committed Feb 26, 2022
    Configuration menu
    Copy the full SHA
    3632c29 View commit details
    Browse the repository at this point in the history