Beginner
Running cosmos nodes with Cosmovisor
cosmovisor
is a small process manager for Cosmos SDK application binaries that monitors the governance module for incoming chain upgrade proposals. If it sees a proposal that gets approved, cosmovisor
can automatically download the new binary, stop the current binary, switch from the old binary to the new one, and finally restart the node with the new binary.
git clone https://github.com/millicentnetwork/millid.git cd millid/ make install millid version millid init mLabs1 --chain-id millicent-testnet cd ~/.millid/config && nano genesis.json // edit genesis file millid keys add millicent-primary millid keys add millicent-secondary millid add-genesis-account milli1fhrvxnstynz35zpspfhf0munzh93hgnznsc7cr 5000000000MILLI millid add-genesis-account milli1rmt6d9vgvvw67v4wx9l7hrzw83kg25guvx0nfy 5000000000MILLI millid gentx millicent-primary 10000000MILLI --chain-id millicent-testnet millid collect-gentxs git clone https://github.com/cosmos/cosmos-sdk cd cosmos-sdk && git checkout v0.42.7 cd cosmovisor make cosmovisor cp cosmovisor $GOPATH/bin/cosmovisor whereis cosmovisor // verify cosmovisor export DAEMON_NAME=millid export DAEMON_HOME=$HOME/.millid source ~/.profile echo $DAEMON_NAME // verify DAEMON NAME mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin mkdir -p $DAEMON_HOME/cosmovisor/upgrades which millid //verify cp $HOME/go/bin/millid $DAEMON_HOME/cosmovisor/genesis/bin sudo nano /etc/systemd/system/millid.service [Unit] Description=millid Daemon (cosmovisor) After=network-online.target [Service] User=root ExecStart=/root/go/bin/cosmovisor start Restart=always RestartSec=3 LimitNOFILE=4096 Environment="DAEMON_NAME=millid" Environment="DAEMON_HOME=/root/.millid" Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false" Environment="DAEMON_RESTART_AFTER_UPGRADE=true" Environment="DAEMON_LOG_BUFFER_SIZE=512" [Install] WantedBy=multi-user.target sudo -S systemctl daemon-reload sudo -S systemctl enable millid sudo systemctl start millid sudo systemctl status millid sudo systemctl stop millid.service // To stop the service journalctl -fu millid // will print logs of the network
Total Supply Query
millid query bank total --denom MILLI
Create Validator
millid tx staking create-validator \ --amount=9000000MILLI \ --pubkey=$(millid tendermint show-validator) \ --moniker="mlab3-validator" \ --chain-id=millicent-testnet \ --commission-rate="0.10" \ --commission-max-rate="0.20" \ --commission-max-change-rate="0.01" \ --min-self-delegation="10000" \ --gas="259999" \ --gas-prices="10MILLI" \ --from=mlab3-primary