diff --git a/mesh.dot b/mesh.dot new file mode 100644 index 00000000000..adeb21f51d6 --- /dev/null +++ b/mesh.dot @@ -0,0 +1,68 @@ +digraph G +{ + inita->initb [dir="both"] + inita->initc [dir="both"] + inita->initd [dir="both"] + inita->inite [dir="both"] + inita->initf [dir="both"] + inita->initg [dir="both"] + inita->inith [dir="both"] + inita->initi [dir="both"] + inita->initj [dir="both"] + inita->initk [dir="both"] + + initb->initc [dir="both"] + initb->initd [dir="both"] + initb->inite [dir="both"] + initb->initf [dir="both"] + initb->initg [dir="both"] + initb->inith [dir="both"] + initb->initi [dir="both"] + initb->initj [dir="both"] + initb->initk [dir="both"] + + initc->initd [dir="both"] + initc->inite [dir="both"] + initc->initf [dir="both"] + initc->initg [dir="both"] + initc->inith [dir="both"] + initc->initi [dir="both"] + initc->initj [dir="both"] + initc->initk [dir="both"] + + initd->inite [dir="both"] + initd->initf [dir="both"] + initd->initg [dir="both"] + initd->inith [dir="both"] + initd->initi [dir="both"] + initd->initj [dir="both"] + initd->initk [dir="both"] + + inite->initf [dir="both"] + inite->initg [dir="both"] + inite->inith [dir="both"] + inite->initi [dir="both"] + inite->initj [dir="both"] + inite->initk [dir="both"] + + initf->initg [dir="both"] + initf->inith [dir="both"] + initf->initi [dir="both"] + initf->initj [dir="both"] + initf->initk [dir="both"] + + initg->inith [dir="both"] + initg->initi [dir="both"] + initg->initj [dir="both"] + initg->initk [dir="both"] + + inith->initi [dir="both"] + inith->initj [dir="both"] + inith->initk [dir="both"] + + initi->initj [dir="both"] + initi->initk [dir="both"] + + initj->initk [dir="both"] +} + diff --git a/mesh.png b/mesh.png new file mode 100644 index 00000000000..1001199df6f Binary files /dev/null and b/mesh.png differ diff --git a/ring.dot b/ring.dot new file mode 100644 index 00000000000..9b677bc0e8a --- /dev/null +++ b/ring.dot @@ -0,0 +1,14 @@ +digraph G +{ + inita->initb [dir="both"] + initb->initc [dir="both"] + initc->initd [dir="both"] + initd->inite [dir="both"] + inite->initf [dir="both"] + initf->initg [dir="both"] + initg->inith [dir="both"] + inith->initi [dir="both"] + initi->initj [dir="both"] + initj->initk [dir="both"] + initk->inita [dir="both"] +} diff --git a/ring.png b/ring.png new file mode 100644 index 00000000000..02018e1f510 Binary files /dev/null and b/ring.png differ diff --git a/star.dot b/star.dot new file mode 100644 index 00000000000..f9b558b78a6 --- /dev/null +++ b/star.dot @@ -0,0 +1,14 @@ +digraph G +{ + initg->initb [dir="both"] + initg->initc [dir="both"] + initg->initd [dir="both"] + initg->inite [dir="both"] + initg->initf [dir="both"] + initg->inita [dir="both"] + initg->inith [dir="both"] + initg->initi [dir="both"] + initg->initj [dir="both"] + initg->initk [dir="both"] +} + diff --git a/star.png b/star.png new file mode 100644 index 00000000000..d39d43362a1 Binary files /dev/null and b/star.png differ diff --git a/testnet-diagrams.sh b/testnet-diagrams.sh new file mode 100755 index 00000000000..8eaa3ac7105 --- /dev/null +++ b/testnet-diagrams.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +circo ring.dot -Tpng -oring.png +circo star.dot -Tpng -ostar.png +fdp mesh.dot -Tpng -omesh.png diff --git a/testnet.md b/testnet.md index c9220bd8e4c..90f7c123a8b 100644 --- a/testnet.md +++ b/testnet.md @@ -34,12 +34,15 @@ Network topology or "shape" describes how the nodes are connected in order to sh The Launcher has definitions of three different network "shapes" based on inter-nodal connections, which can be selected by a command line option, or you can supply your own network topology by editing the Launcher generated configuration file. #### Ring network +![](ring.png "Ring Diagram") This is the simplest network, where each node identifies just the node next to it as it's only peer. #### Star network +![](star.png "Star Diagram") A "star" is intended to support the use larger number nodes in the testnet. In this case the number of peers connected to a node and the distribution of those nodes varies based on the number of nodes in the network. #### Mesh network +![](mesh.png "Mesh Diagram") In a "mesh" network, each node is connected to as many peer nodes as possible. # The Launcher Application @@ -172,7 +175,7 @@ keys | specify the authentication tokens for this node. peers | this list indicates the other nodes in the network to which this one actively connects. Since this file may be edited to alter the hostname, public name, or p2p port values, the peers list here holds aliases for the actual endpoints eventually written to the individual config.ini files. producers | this list identifies which of the producers from the genesis.json file are held by this node. Note that the launcher uses a round-robin algorithm to spread the producer instances across the producing nodes. -###Provisioning Distributed Servers +### Provisioning Distributed Servers The ssh_helper section of the testnet.json file contains the ssh elements necessary to connect and issue commands to other servers. In addition to the ssh_helper section which provides access to global configuration settings, the per-node configuration may provide overriding identity and connection arguments. It is also necessary to provision the server by at least copying the eosd executable, and the genesis.json files to their appropriate locations relative to some named EOS root directory. For example, I defined the EOS root to be `/home/phil/blockchain/eos`. When run, the launcher will run through a variety of shell commands using ssh and finally using scp to copy a config.ini file to the appropriate data directory on the remote. @@ -191,7 +194,7 @@ The launcher app creates a separate date and configuration directory for each no A file called "last_run.json" contains hints for a later instance of the launcher to be able to kill local and remote nodes when run with -k. -#What Remains To Be Done +# What Remains To Be Done Functionality that remains to be implemented: caching signed transactions then purging them on a schedule. Sending summaries of blocks rather than whole blocks. Optimizing the routing between nodes. Failover during new node synchronization if a peer fails to respond timely enough