Testnet genesis.json files and launch scripts.
This script helps to prepare data directory and configuration files.
./setup.sh <data_root> <moniker> [peers]
<data_root>
is where the node's data files and configuration files reside. Name any direcotry where the user haswrite
permission, and the script will create or reuse the directory. It is recommended to use the directory with the form of<path_to_data_dir>/<node_name>
.<moniker>
is a human-readable name for this node. Feel free to choose any descriptive name.[peers]
is a list of peers separated by comma. A peer address has form ofnode_id@ip_address_or_hostname:p2p_port
.node_id
can be obtained by queryinghttp://ip_address_or_hostname:26657/status
using tools such ascurl
. Defaultp2p_port
is 26656.
Since this script registers amod as service in systemctl
, the service can get
controlled with its general commands such as start
, stop
, etc. For example,
to start node, simply execute systemctl start amod
. Recent AMO testnet has a
seed node running on 172.104.88.12. It is recommended to use this node if you
have no knowledge of any other nodes.
This script helps to upgrade node's protocol by replacing binary file with the latest one at the very moment of upgrading protocol.
./upgrade.sh <data_root>
<data_root>
is where the script derive node's state related values, such asheight
andlast_height
, which are utilized to detect the right moment of upgrading protocol along withupgrade_protocol_height
from node's config values.
This python script provides the following features required for orchestrating AMO nodes in parallel mode.
init
: boot nodes, distribute coins and stake themup
: just boot nodesdown
: shutdown nodesrestart
: process sequentiallydown
->up
setup
: copy config files located underorchestration/data/<target>
to each target nodereset
: process sequentiallydown
->setup
->init
upgrade
: upgrade node protocolexec
: execute user input command in nodesscp
: copy files from local path to remote path in ssh
pip3 install -r requirements.txt
./orchestration/do.py { init | up | down | restart | setup | reset | upgrade | exec | scp }
To use the script, the preset data are required as follows:
$HOME/.ssh/id_rsa
: ssh private keyorchestration/config.json
: node orchestration infoorchestration/data/<target>/node_key.json
: tendermint node keyorchestration/data/<target>/priv_validator_key.json
: tendermint validator keyorchestration/data/<target>/config.toml.in
: tendermint config file
The tendermint related keys located under data
folder should correspond with
the ones written in the orchestation/config.json
.