> ## Documentation Index
> Fetch the complete documentation index at: https://sidiorresearchlabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Mainnet

# Mainnet

This document outlines the steps to join an existing mainnet.

## Prerequisite Readings

* [Validator Security](./security)

## Join Mainnet

You need to set the **genesis file** and **seeds**. If you need more information about past networks, check our
[mainnet repo](https://github.com/Paxeer-Network/mainnet). The table below gives an overview of all Mainnet Chain
IDs. Note that, the displayed version might differ when an active Software Upgrade proposal exists on chain.

| Chain ID         | Description         | Version  | Status |
| ---------------- | ------------------- | -------- | ------ |
| `hyperpax_125-1` | HyperPaxeer Mainnet | `v2.0.2` | `Live` |

:::warning
**IMPORTANT:** If you join mainnet as a validator make sure you follow all the
[security](./security) recommendations!
:::

## Server Timezone Configuration

Make sure your server **timezone configuration is UTC**.
To know what is your current timezone, run the `timedatectl` command.

:::danger
🚨 **DANGER**: Having a different timezone configuration
may cause a `LastResultsHash` mismatch error.
This will take down your node!
:::

## Install `hyperpaxd`

Follow the [installation](./../validate/setup-and-configuration/run-a-validator) document to
install the `hyperpaxd` binary.

:::warning
Make sure you have the right version of `hyperpaxd` installed.
:::

### Save Chain ID

We recommend saving the mainnet `chain-id` into your `hyperpaxd`'s `client.toml`.
This will make it so you do not have to manually pass in the `chain-id` flag for every CLI command.

:::tip
See the Official [Chain IDs](./../protocol/concepts/chain-id#official-chain-ids) for reference.
:::

```bash theme={null}
hyperpaxd config chain-id hyperpax_125-1
```

## Initialize Node

We need to initialize the node to create all the necessary validator and node configuration files:

```bash theme={null}
hyperpaxd init <your_custom_moniker> --chain-id hyperpax_125-1
```

:::danger
Monikers can contain only ASCII characters. Using Unicode characters will render your node unreachable.
:::

By default, the `init` command creates your `~/.hyperpaxd` (i.e `$HOME`) directory with subfolders `config/` and `data/`.
In the `config` directory, the most important files for configuration are `app.toml` and `config.toml`.

## Genesis & Seeds

### Copy the Genesis File

Download the `genesis.json` file from the [`archive`](https://archive.hyperpaxd.org/mainnet/genesis.json) and copy it over
to the `config` directory: `~/.hyperpaxd/config/genesis.json`. This is a genesis file with the chain-id and genesis
accounts balances.

```bash theme={null}
wget https://archive.hyperpaxd.org/mainnet/genesis.json
mv genesis.json ~/.hyperpaxd/config/
```

Then verify the correctness of the genesis configuration file:

```bash theme={null}
hyperpaxd validate-genesis
```

### Add Seed Nodes

Your node needs to know how to find [peers](https://docs.tendermint.com/v0.34/tendermint-core/using-tendermint.html#peers).
You'll need to add healthy [seed nodes](https://docs.tendermint.com/v0.34/tendermint-core/using-tendermint.html#seed)
to `$HOME/.hyperpaxd/config/config.toml`. The [`mainnet`](https://github.com/Paxeer-Network/mainnet) repo contains links to some
seed nodes.

Edit the file located in `~/.hyperpaxd/config/config.toml` and the `seeds` to the following:

```toml theme={null}
#######################################################
###           P2P Configuration Options             ###
#######################################################
[p2p]

# ...

# Comma separated list of seed nodes to connect to
seeds = "<node-id>@<ip>:<p2p port>"
```

You can use the following code to get seeds from the repo and add it to your config:

```bash theme={null}
SEEDS=`curl -sL https://raw.githubusercontent.com/Paxeer-Network/mainnet/main/Paxeer-Network_9001-2/seeds.txt | awk '{print $1}' | paste -s -d, -`
sed -i.bak -e "s/^seeds =.*/seeds = \"$SEEDS\"/" ~/.hyperpaxd/config/config.toml
```

:::tip
For more information on seeds and peers, you can the Tendermint [P2P documentation](https://docs.tendermint.com/master/spec/p2p/peer.html).
:::

### Add Persistent Peers

We can set the [`persistent_peers`](https://docs.tendermint.com/v0.34/tendermint-core/using-tendermint.html#persistent-peer)
field in `~/.hyperpaxd/config/config.toml` to specify peers that your node will maintain persistent
connections with.

## Run a Mainnet Validator

:::tip
For more details on how to run your validator, follow the validator [these](./setup-and-configuration/run-a-validator)
instructions.
:::

```bash theme={null}
hyperpaxd tx staking create-validator \
--amount=1000000000000ahpx \
--pubkey=$(hyperpaxd tendermint show-validator) \
--moniker="PaxeerValidator" \
--chain-id=<chain_id> \
--commission-rate="0.05" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1000000" \
--gas="auto" \
--gas-prices="0.025ahpx" \
--from=<key_name>
```

:::danger
🚨 **DANGER**: <u>Never</u> create your validator keys using a [`test`](./../protocol/concepts/keyring#testing)
keying backend. Doing so might result in a loss of funds by making your funds remotely accessible via the `eth_sendTransaction`
JSON-RPC endpoint.

Ref: [Security Advisory: Insecurely configured geth can make funds remotely accessible](https://blog.ethereum.org/2015/08/29/security-alert-insecurely-configured-geth-can-make-funds-remotely-accessible/)
:::

## Start mainnet

The final step is to [start the nodes](./../protocol/Paxeer-Network-cli/single-node#start-node). Once enough voting power (+2/3)
from the genesis validators is up-and-running, the node will start producing blocks.

```bash theme={null}
hyperpaxd start
```

## Share your Peer

You can share your peer to posting it in the `#find-peers` channel in the [HyperPaxeer Discord](https://discord.gg/Paxeer-Network).

:::tip
To get your Node ID use

```bash theme={null}
hyperpaxd tendermint show-node-id
```

:::

## State Syncing a Node

If you want to join the network using State Sync (quick, but not applicable for archive nodes), check our
[State Sync](./setup-and-configuration/state-sync) page.
