> For the complete documentation index, see [llms.txt](https://nodedocs.saga.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nodedocs.saga.xyz/validator-and-full-node-setup/joining-ssc-mainnet-post-genesis.md).

# 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](/introduction/requirements.md).
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](broken://pages/3OpfVsQGw5Nsj4bIgBrd).

## Steps to Join as a Validator Post-Genesis

{% hint style="info" %}
While these steps can be followed to join as a validator after the Genesis event, we recommend [joining the network as a full node](broken://pages/3OpfVsQGw5Nsj4bIgBrd) and allowing your node to sync prior to executing these steps.
{% endhint %}

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

```bash
sscd q bank balances <validator key from Step 1> \
--node <Other existing validator node's RPC endpoint address provided by Saga Team>
```

3. 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 <mark style="color:blue;">`echo "<key mnemonic>" | sscd init --chain-id ssc-1 --recover`</mark>. 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`)
4. 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.

   ```bash
   #######################################################
   ###           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"
   ```
5. Copy the `genesis.json` file provided by the Saga team to `~/.ssc/config/`, overwriting any existing genesis file in that location.
6. Now we are ready to create our validator. We do this using the following command

   ```bash
   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
   ```
7. 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:

   ```bash
   $ 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
```

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

```bash
$ 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)

9. 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 <mark style="color:blue;">`sscd q tendermint-validator-set`</mark> does not list the validator.

This typically happens when your validator gets jailed. See [Cosmos Hub documentation](https://hub.cosmos.network/main/validators/validator-setup.html#common-problems) for more details.

You can check this by issuing the `sscd q staking validator <validator operator address>`command. Example:

```bash
$ 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:

```bash
$ 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://nodedocs.saga.xyz/validator-and-full-node-setup/joining-ssc-mainnet-post-genesis.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
