Skip to content

Find peers: DNS seeds and hostnames #44

Open

Description

@lorenzolfm

Waits on #20 and #21. elo dials the one IP literal that the command line names (parse in src/main.rs). A hostname is bad usage, and elo cannot find a peer by itself.

Today a person picks the peer. A peer from a seed is a stranger, and elo checks only that each header is on the one before it. So a stranger could choose elo's chain and fill its memory.

Core v31.1 has these sources:

  • DNS seeds. Each network has a list (kernel/chainparams.cpp:144-151, :384-385, :444-445). Core asks x<services>.<seed> and takes at most 32 IPs from each seed (net.cpp:2372-2382).
  • Fixed seeds. A list in the binary, used when no other source gave an address for 60 s (net.cpp:2631, :2646).
  • Peers. addr messages (Address relay: addr, addrv2, getaddr, sendaddrv2 #11), saved in peers.dat (net.cpp:2410).
  • Names. A hostname on -connect or -addnode gets a lookup (net.cpp:406).

To decide:

  • Sources. DNS seeds first, or fixed seeds too? Fixed seeds need a list that the repo keeps current.
  • Usage. Does elo mainnet with no peer find one? A named peer stays, because regtest has no real seeds (kernel/chainparams.cpp:641).
  • Which peer. Pick at random from the answers, and take the next one on a failure. This uses the retry of Reconnect when a connection ends #42.
  • How many peers. One at a time, or more? Core keeps 8 full-relay and 2 block-relay connections (net.h:69, :73). Peers can disagree at the tip, and one connection cannot hold both branches until Forks: more than one branch of headers #22. Read the logs of a running elo with an LLM, and file issues #31 asks for more peers.
  • Trust in a seed. One seed can answer with only its own peers. Does elo ask more than one, and mix the answers?

Activity

  1. lorenzolfm commented on Nov 14, 2026

    @lorenzolfm
    OwnerAuthor

    Status after #89 and #90.

    Done:

    Open:

    Proposal: close #44, and move the trust question into #67. File fixed seeds as a new issue only if we want the list. Do you agree?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions