The following steps outline how to join the Saga Staking Chain network as a validator after the genesis event.
Prerequisites
Your hardware and network settings satisfy these requirements.
The machine should have a public IP and should be able to communicate with other validators using its p2p ports.
sscd binary
Access to an account on SSC with saga tokens, to enable you to fund the validator key.
RPC endpoint address of at least one of the functioning validator or full nodes in SSC Mainnet.
List of persistent_peers addresses provided by the Saga team.
Latest genesis.json provided by the Saga team.
Completed setting up your full node.
Steps to Join as a Validator Post-Genesis
While these steps can be followed to join as a validator after the Genesis event, we recommend joining the network as a full node and allowing your node to sync prior to executing these steps.
Create, or restore, a key with which to control the validator. This can be done using the sscd keys add command.
Ensure that the funded key in the previous step does have the funds. This can be verified by using the following command
sscd q bank balances <validator key from Step 1> \
--node <Other existing validator node's RPC endpoint address provided by Saga Team>
Initialize the validator on this machine by running sscd init <moniker> --chain-id ssc-1. If you would like to use the same mnemonic as the key created/restored in Step 1, you can also do echo "<key mnemonic>" | sscd init --chain-id ssc-1 --recover. This will generate a validator key using the same mnemonic. The init command also generates certain configuration files in the home directory for SSC (default ~/.ssc)
Next, update persistent_peers information in ~/.ssc/config/config.toml using the persistent peers provided by the Saga team. You will update this in the P2P section of config.toml file.
#######################################################
### P2P Configuration Options ###
#######################################################
[p2p]
# Address to listen for incoming connections
laddr = "tcp://0.0.0.0:26656"
# Address to advertise to peers for them to dial
# If empty, will use the same port as the laddr,
# and will introspect on the listener or use UPnP
# to figure out the address. ip and port are required
# example: 159.89.10.97:26656
external_address = ""
# Comma separated list of seed nodes to connect to
seeds = ""
# Comma separated list of nodes to keep persistent connections to
persistent_peers = "TBD"
Copy the genesis.json file provided by the Saga team to ~/.ssc/config/, overwriting any existing genesis file in that location.
Now we are ready to create our validator. We do this using the following command
sscd tx staking create-validator \
--pubkey=$(sscd tendermint show-validator) \
--amount=<Amount to stake with the validator> Example 100000000000usaga \
--chain-id=<Testnet Chain Id> Exmaple ssc-1 \
--node=<RPC address of existing validator> Example tcp://134.167.114.164:26657 \
--from=<Key from Step 1> Exmaple saga16y3343xf6ecmh0469era2pmjvckgp2a2cxl0v0 \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1 \
--moniker=<Moniker for this validator> Example postgen-validator \
--gas-prices=<Gas price> Example 0usaga \
--gas=200000
If the command above is successful, you should be able to view your newly created validator using its validator operator address (prefixed with sagavaloper). As an example:
Note: You can also get a listing and status of all validators, with staking amounts, using the following command.
sscd q staking validators
You should also confirm that your validator is part of the validator set. This can be checked by using the following command on this validator machine:
Note: Our validator is part of the current tendermint validator set (see bolded text)
Now, we can start our node on this machine. Use sscd start to start the node. Important: You should ideally start the local validator as a service on this machine so it will restart if the machine goes down and is rebooted.
Troubleshooting
The validator node starts up but does not start as a validator or sscd q tendermint-validator-set does not list the validator.
This typically happens when your validator gets jailed. See Cosmos Hub documentation for more details.
You can check this by issuing the sscd q staking validator <validator operator address>command. Example:
You can see that the validator has gotten jailed and its status is now Unbonding. You can unjail the validator by issuing the sscd tx unjail command. Example:
This command, if successful, should unjail the validator, enabling it to rejoin the current tendermint validator set.
Note: If you validator remains jailed even after submitting an unjail transaction (which means the unjail transaction failed), please contact Saga Support.