sudotee/etc/systemd/system/mantrachaind.service>/dev/null<<EOF[Unit]Description=Mantra NodeAfter=network-online.target[Service]User=$USERExecStart=$(which cosmovisor) run startRestart=on-failureRestartSec=3LimitNOFILE=10000Environment="DAEMON_NAME=mantrachaind"Environment="DAEMON_HOME=$HOME/.mantrachain"Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"Environment="DAEMON_RESTART_AFTER_UPGRADE=true"Environment="UNSAFE_SKIP_BACKUP=true"[Install]WantedBy=multi-user.targetEOF
starting, stoping and restarting service
#reload, enable and startsudosystemctldaemon-reloadsudosystemctlenablemantrachaindsudosystemctlstartmantrachaind#stopsudosystemctlstopmantrachaindβ#restartsudosystemctlrestartmantrachaind#logssudojournalctl-xefumantrachaindβ#logs - filtered on block height linessudojournalctl-xefumantrachaind-g".*txindex"
Once started, the node will take some time to sync with the blockchain.
Visit https://explorer.testnet.mantrachain.io/mantrachain to see the current height of the blockchain. Use the journalctl command to check on the node's progress.
convert node into a validator
You can, either, create a new account or import an existing account.
create keys
Create a key file.
mantrachaindconfigkeyring-backendfile
Generate a new public key with mnemonic phrase.
mantrachaindkeysadd<your-moniker-keys>
where <your-moniker-keys>is the moniker and can be any valid string name (e.g. validator01-keys)
The above command will produce output like this:
- address: mantra1q55nrzygas0nespfu8mwt2yntq8gxll3kyug82
name: validator01-keys
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A/YebpAX8AqUNcNXcqIy53fJo8BGFCSaQA5A0XQWMlCG"}'
type: local
**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.
expect kid unfair uniform calm debris meadow despair vintage arrive walnut vast upset cart step funny truth vault naive note capable spray shine human
KEEP THE MNEMONIC PHRASE IN A SAFE PLACE!
import keys
Alternatively, if you already have an existing mnemonic that you'd like to use, then run the following:
mantrachaindtxstakingedit-validator \--new-moniker=<NEW-MONIKER> \--website="https://your-website.com" \--details="Some impressive info about your validator." \--chain-id=mantrachain-testnet-1 \--commission-rate="0.10" \--gas="auto" \--gas-adjustment2 \--gas-prices="0.0001uaum" \--from=<KEY-NAME>