Ideal Topology

In the launch call yesterday for wave-2 pioneers, Duncan briefly mentioned something like 20 peers in our topology as ideal. Since we have to define topology ourselves, what is truly ideal? As this opens up wider in the public HTN, how should we manage who we say yes to and who we say no to for peering agreements?

We obviously can’t have bidirectional peering with 1000 other stakepool relays and still have room for the general public Daedalus and Yoroi users to have room to connect as well. Should we just pick a few nearby, a few mid-distance, and a few far away from us and hope there is nobody who ends up on the edges of the network?

Good question.
Theoretically - just as a first thought - we could have a couple (because decentralized) of topology-maintainers. We could all agree on a standard port, and then simply configure

{
	"addr": "known-relays.topology-provider-a.net",
	"port": 3001,
	"valency": 10
},
{
	"addr": "known-relays.another-topology-provider.net",
	"port": 3001,
	"valency": 10
},
...

Now each of this couple full of topology-providers maintains the A-Record in his DNS-Zone by filling it with many IPs and setting it to round-robin answers.

Nodes who use such a topology-file will resolve up to 10 IPs from each topology-provider.
And they can also add some personal nodes.

This would mean a limited and doable workload for those maintainers. Doing it just for testnet individually is a mess (imo)

Probably for the first testnet phase it is even not so important to have as much as possible connections.
And then hopefully soon we see some p2p layer introduced.

2 Likes

From Sam on the FF TG channel:

We will have p2p prior to any pools on mainnet making blocks. For now, our biggest priorities this sprint are finishing the CLI commands needed for pools and rewards transfer and starting the db-sync integration with Shelley.

The question is still very valid: what are we going to do before this is implemented?

Getting everyone to agree on a port is going to be problematic. Also requiring people to have static ip so it can be added to an A record could be limiting. The maintainer might have to have a system where they continually check people’s own DNS records and then update their A record with the latest IP.

1 Like

You should be careful when using a high valency and a domain name in this way.
cardano-node will perform multiple connection attempts in parallel which means that it will prefer fast responding (likely geographically close) nodes.

3 Likes

Provided that most of the pioneers can agree on a port number this would work better.
Divide your topology providers per continent, the africa-provider provides A records to relays in africa, the europe-provider for relays in eruope and so on. The valency used should be 5 for the topology provider in your continent. and 2 for other continents.
Example snippet for a relay running in europe.
{
“addr”: “europe.topology-provider-a.net”,
“port”: 3001,
“valency”: 5
},
{
“addr”: “norht-america.topology-provider.net”,
“port”: 3001,
“valency”: 2
},

2 Likes