Basic concepts
Before attempting to use Data Mesher, there are a few important terms and concepts to understand.
Host Key
A host key is an ED25519 key pair in PEM format, which is required to be unique to an instance of Data Mesher within the cluster, and is used to:
- uniquely identify an instance when communicating within the cluster
- sign host claims when generating them for the local instance
- sign host claims when receiving them from other instances (as a witness)
Network Key
Another ED25519 key pair in PEM format, it is used to group hosts with a list of settings that control how state is shared and processed.
The public key is the network identifier, and the private key is required to sign any change in the network's settings.
Important
A host may be participating in multiple networks, but it can only claim hostnames within one of them at any given time. This is known as it's primary network.
Network Settings
How host claims behave within a network is defined by the following settings:
tld
-
A simple string, to be appended to each hostname being within that network.
For example, if a host wishes to claim the hostnames
mercury
,venus
andearth
, and the network it is participating in has atld
ofsol
, the resulting domain names will bemercury.sol
,venus.sol
andearth.sol
. hostTTL
-
The time after which a host's claims will expire, unless the host has signed a newer set of claims and distributed them within the cluster.
signingKeys
-
A list of ED25519 public keys, one or more of which has to have signed a host's claims before they are treated as valid. These keys correspond to host keys, and assign a special role to those hosts within a network.
In effect, they are trusted witnesses.
In the event of two hosts attempting to claim the same hostname, the earliest signature from one of the
signingKeys
is used to determine the winner.
Host Claims
This is a list of hostnames that an instance of Data Mesher wishes to claim within its primary network. As mentioned
above, these names are combined with the network's tld
to produce a list of domain names.
Host claims are required to be extended periodically, before the network's hostTTL
.
This is done automatically by the Data Mesher service, whereby it signs a new set of claims with the host key and distributes them within the network.