The peer map

The cornerstone of Exscudo ecosystem is EON - a flexible blockchain technology. There is the technology portal that contains explanations and specifications necessary to have a detailed understanding of the technology, as well as a number of tools that may come handy for users and participants. One of the tools is the peer map representing a map of currently available peers (or nodes). This articles describes the method used to build and to update the peer map.

Options

There are two peer maps available at the portal, related to their corresponding networks:

Regardless of what the network is, the method used to create a respective map is the same and described below.

Context

There are three key points to be considered when understanding the method used to build the map:

  • All peers in the network are equal;
  • The technology portal server requests a network to return a list of peers data is currently exchanged between;
  • The requests are sent on a regular basis, updating the list of peers available at the time. The list, in its turn, gets converted into the map of peers.

Realization

The method used to request the list of peers is based on EON API get_well_known_nodes call.

EON Peer API

String[] metadata.get_well_known_nodes()

Get a list of peer addresses which the peer is connected to. The list contains only those connections which are currently active.

● Input parameters: none.

● Return value: array(string).

Examples:

>>>{"jsonrpc":"2.0","id":41782,"method":"metadata.get_well_known_nodes" }

<<<{"jsonrpc":"2.0","id":"41782","result":["193.124.176.13:9443","81.82 .229.114:9443","185.82.218.107:9443","45.32.87.241:9443","195.123.212.7 0:9443","45.76.124.206:9443","217.12.221.5:9443","176.78.128.15:9443"," 45.76.131.32:9443","104.156.246.67:9443","193.70.41.106:9443"]}

Drill

  1. When sent, the call results in a peer being asked for the list of other peers connected to it;
  2. The peers found are then asked again for the list of other peers connected to them. The same goes on for these latter peers;
  3. ...
  4. Finally, a unique list of peers is built, while all the peers that were asked earlier are being deleted from this list;
  5. This process goes on until a call does not receive any new peers.

As a result, processed are all the online peer addresses. A map of the connections between them is built.

Note

Newly deployed peers are not added to the peer map at once. There is a period of time required for them to inform (announce) other peers about self availability, as well as to establish connections. Plus, other peers have to take a positive decision to connect to the new ones, when randomly connecting to other available peers.