Find answers instantly with AI search. Start typing your prompt below and let AI do the digging for you!

Joining SSC Mainnet Post-Genesis

The following steps outline how to join the Saga Staking Chain network as a validator after the genesis event.

Prerequisites

  1. Your hardware and network settings satisfy these requirements.

  2. The machine should have a public IP and should be able to communicate with other validators using its p2p ports.

  3. sscd binary

  4. Access to an account on SSC with saga tokens, to enable you to fund the validator key.

  5. RPC endpoint address of at least one of the functioning validator or full nodes in SSC Mainnet.

  6. List of persistent_peers addresses provided by the Saga team.

  7. Latest genesis.json provided by the Saga team.

  8. 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.

  1. Create, or restore, a key with which to control the validator. This can be done using the sscd keys add command.

  2. 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>
  1. 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)

  2. 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"
  3. Copy the genesis.json file provided by the Saga team to ~/.ssc/config/, overwriting any existing genesis file in that location.

  4. 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
  5. 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:

    $ sscd q staking validator sagavaloper16y3343xf6ecmh0469era2pmjvckgp2a2kdfvx7
    commission:
      commission_rates:
        max_change_rate: "0.010000000000000000"
        max_rate: "0.200000000000000000"
        rate: "0.100000000000000000"
      update_time: "2023-10-08T21:29:03.663149174Z"
    consensus_pubkey:
      '@type': /cosmos.crypto.ed25519.PubKey
      key: pC5SX+ux+KmqhMCBevyO0qmM4mdtHMYxRB+Qahvkb/U=
    delegator_shares: "100000000000.000000000000000000"
    description:
      details: ""
      identity: ""
      moniker: postgen-validator
      security_contact: ""
      website: ""
    jailed: false
    min_self_delegation: "1"
    operator_address: sagavaloper16y3343xf6ecmh0469era2pmjvckgp2a2kdfvx7
    status: BOND_STATUS_BONDED
    tokens: "99000000000"
    unbonding_height: "50254"
    unbonding_ids:
    - "6"
    unbonding_on_hold_ref_count: "0"
    unbonding_time: "2023-10-29T21:38:07.302005864Z"

    Note: You can also get a listing and status of all validators, with staking amounts, using the following command.

sscd q staking validators
  1. 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:

$ sscd q tendermint-validator-set
block_height: "51085"
total: "6"
validators:
- address: sagavalcons1265xzp4y03t43y309mak4vs8kemed7skpax0d7
  proposer_priority: "97507937"
  pub_key:
    type: tendermint/PubKeyEd25519
    value: tB3b7xIusD2IILmjfvwtUxWqHhndz5jFebC1AXv99vU=
  voting_power: "50000000"
- address: sagavalcons1t47p668ur73vcze6tknt09382507dup3acue85
  proposer_priority: "97507936"
  pub_key:
    type: tendermint/PubKeyEd25519
    value: egGBW7J4/GKFsWQtYspzZk1ceVoohklBfK3knu563Mg=
  voting_power: "50000000"
- address: sagavalcons1wee5py8vaufc723ayspeunves0gnxkdnx5esq9
  proposer_priority: "-59034062"
  pub_key:
    type: tendermint/PubKeyEd25519
    value: fpObXfleyFVfqr15rIjr/bzuZdreNVDHkNRonQ9WnsI=
  voting_power: "49000000"
- address: sagavalcons14sqenyy5z33wf6c0nfcjld0zupwmuwfr5lj4du
  proposer_priority: "-58545062"
  pub_key:
    type: tendermint/PubKeyEd25519
    value: FYEmSGqFrs0reMfH3V+f9NCB4qh7r9O9DnlZNQh8vcc=
  voting_power: "49000000"
- address: sagavalcons1rh3aenzq8gm57g3x86yv9wfejl4cgkh44e0wvg
  proposer_priority: "82875189"
  pub_key:
    type: tendermint/PubKeyEd25519
    value: XO8FIIiYKoz7zYpQQayaRyoI3CrkvLBpV1/ArTnTcCo=
  voting_power: "48510000"
- **address: sagavalcons1m4lj5rwjzszvvfdsgjeqzzqzzwsuw6vsj25gnv
  proposer_priority: "-160311938"
  pub_key:
    type: tendermint/PubKeyEd25519
    value: pC5SX+ux+KmqhMCBevyO0qmM4mdtHMYxRB+Qahvkb/U=
  voting_power: "99000"**

Note: Our validator is part of the current tendermint validator set (see bolded text)

  1. 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

  1. 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:

$ sscd q staking validator sagavaloper16y3343xf6ecmh0469era2pmjvckgp2a2kdfvx7
[...]
**jailed: true**
min_self_delegation: "1"
operator_address: sagavaloper16y3343xf6ecmh0469era2pmjvckgp2a2kdfvx7
**status: BOND_STATUS_UNBONDING**
tokens: "99000000000"
unbonding_height: "50254"
unbonding_ids:
- "6"
unbonding_on_hold_ref_count: "0"
unbonding_time: "2023-10-29T21:38:07.302005864Z"

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:

$ sscd tx slashing unjail --from postgen-validator --chain-id ssc-1 --node tcp://134.222.186.168:26657
Enter keyring passphrase (attempt 1/3):
auth_info:
  fee:
    amount: []
    gas_limit: "200000"
    granter: ""
    payer: ""
  signer_infos: []
  tip: null
body:
  extension_options: []
  memo: ""
  messages:
  - '@type': /cosmos.slashing.v1beta1.MsgUnjail
    validator_addr: sagavaloper16y3343xf6ecmh0469era2pmjvckgp2a2kdfvx7
  non_critical_extension_options: []
  timeout_height: "0"
signatures: []
confirm transaction before signing and broadcasting [y/N]: y
code: 0
codespace: ""
data: ""
events: []
gas_used: "0"
gas_wanted: "0"
height: "0"
info: ""
logs: []
raw_log: '[]'
timestamp: ""
tx: null
txhash: A4DA07A434BFBC355914EAE784F5240896B6928DEA5C54A2F6C4B4A7212119E4

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.

Last updated