Request Remote Peer For His List Of Known Peers

Discussion in 'Connectivity' started by Dyrk, Mar 4, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. Dyrk

    Dyrk Sr. Member
    Developer

    Jan 7, 2016
    518
    376
    Male
    Wonderland
    Hey.
    Is there any possibility to ask remote peers for their list of peers?
    When I execute:
    Code:
    dcrctl getpeerinfo
    I get list of my known peers, it's 71 peer so far.

    But I want to discover all Decred Network, so I need recursively ask each unprocessed peer for his list of known peers. I didn't find any RPC call for something like this, but is it possible in theory?
     
  2. chappjc

    chappjc Full Member
    Developer Pool Operator (PoS)

    #2 chappjc, Mar 28, 2016
    Last edited: Mar 28, 2016
    The decred-seeder project is designed to do just what you describe -- recursively request all known nodes for their peers and connect to them. For a node to be classified as "good" a number of things must happen, but being routable on the internet is one of them.

    I have had it running on my VPS for a few weeks. It very quickly crawls the network and classifies the nodes as described here. It then optionally runs a DNS server to return the list of publicly-accessible nodes in response to A record queries. For example, see the result of and A request for dcrdns.monkeyland.io. It returns a number of the good nodes. The full list is shown on this page. I make no guarantees, as it is not my software.

    getpeerinfo is very different. It lists the peers your dcrd is connected to. That's it. Also keep in mind that it includes inbound peers (those who have connected to you) as well as outbound. A publicly accessible node must be reachable by you (outbound on your end, inbound on their end). There thousands of nodes online, but not so many that are configured to be reachable, and to advertise as their apparent routable IP address.
     
    Dyrk likes this.

Share This Page