-
Notifications
You must be signed in to change notification settings - Fork 7
Network Operations
TODO: validator, sentinel, failover nodes (0downtime), load balancers with HTTPS/WSS, generate genesis, create network config, create peer list in the config
# Update instance
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove
# Create 1Gb swap
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo chmod 600 /var/swap.1
sudo /sbin/swapon /var/swap.1
echo '/var/swap.1 swap swap defaults 0 0' | sudo tee --append /etc/fstab
# install node.js and yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo 'deb https://dl.yarnpkg.com/debian/ stable main' | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get -y install build-essential
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get -y install yarn
TODO: leap-node, logging, systemd service, firewall/security groups
TODO
https://github.com/leapdao/leap-node/issues/185#issuecomment-468921734
TODO: add image with network topology (load balancer for sentinels, two validators in intranet etc)
Drop node data (
DEBUG=tendermint,leap-node* leap-node --config leap-testnet.json --fresh
cp ~/.lotion/networks/leap-testnet-eta-955601066/.priv ~/.lotion/networks/leap-testnet-theta-218508104/
mkdir ~/.lotion/networks/leap-testnet-theta-218508104/config
cp ~/.lotion/networks/leap-testnet-eta-955601066/config/priv_validator_key.json ~/.lotion/networks/leap-testnet-theta-218508104/config/
cp ~/.lotion/networks/leap-testnet-eta-955601066/config/node_key.json ~/.lotion/networks/leap-testnet-theta-218508104/config/
DEBUG=tendermint,leap-node* leap-node --config leap-testnet.json --fresh
if you start a validator for a new network keeping the old validator key, be sure to remove old validator state. In older tendermint version the state is kept in priv_validator.json file along with the key you want to preserve.
- For older tendermint — edit priv_validator_key.json
- For new tendermint — just run the node with
--fresh
key (it will reset the state which is in a separate file from now on)
if you start a new network and upgrade to newer tendermint at the same time, then either
a) use the 1 option before you run the upgrade leap-node for the first time.
b) run updated node so that priv_validator structure is updated, stop the node, run it with --fresh
, then start normally
TODO
TODO: checklist for new validator, generate validator key with some ETH, call setSlot via governance