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

p2p/enode: improve IPv6 support, add ENR text representation #19663

Merged
merged 6 commits into from
Jun 7, 2019

Commits on Jun 5, 2019

  1. p2p/enr: add entries for for IPv4/IPv6 separation

    This adds entry types for "ip6", "udp6", "tcp6" keys. The IP type stays
    around because removing it would break a lot of code and force everyone
    to care about the distinction.
    
    I also added a Signature method for completeness' sake.
    fjl committed Jun 5, 2019
    Configuration menu
    Copy the full SHA
    e111c0c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e2a36b8 View commit details
    Browse the repository at this point in the history
  3. p2p/enode: track IPv4 and IPv6 address separately

    LocalNode predicts the local node's UDP endpoint and updates the record.
    This change makes it predict IPv4 and IPv6 endpoints separately since
    they can now be in the record at the same time.
    fjl committed Jun 5, 2019
    Configuration menu
    Copy the full SHA
    e527144 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fd41587 View commit details
    Browse the repository at this point in the history
  5. all: switch to enode.Parse(...)

    This allows passing base64-encoded node records to all the places that
    previously accepted enode:// URLs. The URL format is still supported.
    fjl committed Jun 5, 2019
    Configuration menu
    Copy the full SHA
    02f2919 View commit details
    Browse the repository at this point in the history
  6. cmd/bootnode, p2p: log node URL instead of ENR

    ...and return the base64 record in NodeInfo.
    fjl committed Jun 5, 2019
    Configuration menu
    Copy the full SHA
    0324ece View commit details
    Browse the repository at this point in the history