# Extension chains

**URL:** https://forum.hypercore.one/t/extension-chains/52
**Category:** Development
**Created:** [May 9, 2023, 7:31pm UTC](https://forum.hypercore.one/t/extension-chains/52 "2023-05-09T19:31:50Z")
**Posts on this page:** 1
**Showing post:** 42

<div class="post-metadata">

### Author: ![aliencoder](https://forum.hypercore.one/user_avatar/forum.hypercore.one/aliencoder/32/49_2.png) [@aliencoder](https://forum.hypercore.one/u/aliencoder)
#### Post date: [April 1, 2024, 9:58am UTC](https://forum.hypercore.one/t/extension-chains/52/42 "2024-04-01T09:58:34Z")

</div>

# Supernova extension-chain

Supernova will be the first Zenon EVM based extension-chain. Pillars that want to participate in the extension-chain genesis must follow the instructions below.

- Based on [Cronos](https://docs.cronos.org/) codebase
- Full `EVM` support
- `xZNN` used as native gas token
- Transaction fees are burned according to `EIP-1559`
- `ZNN` → `xZNN` gas fee for redeem
- `xZNN` → `ZNN` gas fee + 1% swap fee distributed to extension-chain Pillars

## Testnet Parameters

**Chain-id** : `supernova_74506-1`  
**Native coin** : `xZNN`  
**Management token** : `stake` (only used for Cosmos functionalities)

## Tutorial

I recommend using `Ubuntu 22.04` or latest `Debian` with `>4vCPUs` and `>8GB RAM` to run an extension-chain Pillar.

Root access is required. The Supernova directory is located at `/root/.supernova`

1. Prepare the environment

```bash
sudo apt update && apt upgrade -y
sudo apt install build-essential jq ufw
sudo ufw enable
sudo ufw allow 26656/tcp # Tendermint P2P
sudo ufw allow 26657/tcp # Tendermint RPC
sudo ufw allow 1317/tcp # Cosmos SDK REST API
sudo ufw allow 8545/tcp # EVM HTTP RPC
sudo ufw allow 8546/tcp # EVM WS RPC
sudo ufw reload

```

1. Install Go

```bash
git clone https://github.com/udhos/update-golang
cd update-golang
sudo ./update-golang.sh
source /etc/profile.d/golang_path.sh

```

1. Clone the repo

```bash
cd ~ && git clone https://github.com/alienc0der/supernova

```

1. Build from source:

```bash
cd supernova
git pull
make build

```

1. Add `supernovad` to `PATH`

```bash
echo 'export PATH=$PATH:/root/supernova/build' >> ~/.bashrc
source ~/.bashrc

```

1. Initialize `supernovad`. Replace `pillar_moniker` with the name of your Pillar.

```bash
supernovad init pillar_moniker --chain-id supernova_74506-1

```

1. Add `pillar_moniker` key

```bash
supernovad keys add pillar_moniker

```

1. Mint `stake` for the `pillar_moniker` account

```bash
supernovad add-genesis-account pillar_moniker 1500000000000000000000stake

```

1. Open Syrius desktop wallet, import your `producer` keystore from the Pillar’s machine and sign a message

Obtain the your own `tendermint/PubKeyEd25519` using the following command:

```bash
cat ~/.supernova/config/priv_validator_key.json | jq -r '.pub_key.value'

```

Extract the `tendermint/PubKeyEd25519` public key and sign the following message:

```auto
Supernova *insert tendermint/PubKeyEd25519*

```

Example message (use your own `tendermint/PubKeyEd25519` extracted earlier using the `cat` command instead of the dummy “EmqJ95SK1AyKdTpauS9Fv7zmWrfIG+y+vX7h5vRQF9E=”:

```auto
Supernova EmqJ95SK1AyKdTpauS9Fv7zmWrfIG+y+vX7h5vRQF9E=

```

Copy the signature. You will need it in the next step.

1. Issue `gentx` command with the signature from the previous step

Please note that the last parameter is `--details *insert signature*`. Replace _insert signature_ with the actual signature from the previous step.

```bash
supernovad gentx pillar_moniker 1000000000000000000000stake --chain-id supernova_74506-1 --moniker="pillar_moniker" --min-self-delegation="1000000" --details *insert signature* --ip="127.0.0.1"

```

If successful, you will get the following message in the terminal window:

**Genesis transaction written to /root/.supernova/config/gentx/gentx-0x0x0x0x0x0x0x0x0x0x.json**.

🚩 🚩 🚩 Privacy warning: remove the “memo” field from the `gentx` that contains the public IP of the VPS instance where the validator will be hosted. For a secure operation of the extension-chain validator, please check Step 11.

1. Send me via DM the resulting `gentx-0x0x0x0x0x0x0x0x0x0x.json`. Once there are more than 5 extension-chain Pillars, I will compile the `genesis.json` and post it here. After that we can coordinate to unleash the Supernova.

2. Setup a [Sentry node](https://docs.tendermint.com/v0.33/tendermint-core/validators.html) for the extension-chain Pillar (optional, recommended)

Create a new VPS with similar specs. Follow Steps 1 - 5. After that, initialize the sentry node:

```bash
supernovad init sentry --chain-id supernova_74506-1

```

Navigate to the configuration directory and edit the `config.toml` file with the parameters from the tables below. Peers are identified by `node_id@ip:port`. In order to get the `node_id`, use the following command:

```bash
supernovad tendermint show-node-id

```

```bash
vim /root/.supernova/config/config.toml

```

#### Validator Node Configuration

| Config [p2p] | Setting |
| --- | --- |
| pex | false |
| persistent\_peers | list of sentry\_node\_id@ip:port |
| private\_peer\_ids | none |
| unconditional\_peer\_ids | optionally list sentry\_node\_id@ip:port |
| addr\_book\_strict | false |

#### Sentry Node Configuration

| Config [p2p] | Setting |
| --- | --- |
| pex | true |
| persistent\_peers | validator\_node\_id@ip:port, optionally list sentry\_node\_id@ip:port |
| private\_peer\_ids | validator\_node\_id |
| unconditional\_peer\_ids | validator\_node\_id@ip:port, optionally list sentry\_node\_id@ip:port |
| addr\_book\_strict | false |

1. Enable EVM RPC endpoint for the Sentry node (optional)

SSH into your Sentry instance. Navigate to the configuration directory and edit the `app.toml` file with the parameters from the table below.

```bash
vim /root/.supernova/config/app.toml

```

| Config [json-rpc] | Setting |
| --- | --- |
| address | 0.0.0.0:8545 |
| ws-address | 0.0.0.0:8546 |

1. Setup a seed node (optional)

Create a new VPS with similar specs. Follow Steps 1 - 5. After that, initialize the seed node:

```bash
supernovad init seed --chain-id supernova_74506-1

```

Navigate to the configuration directory and edit the `config.toml` file with the parameters from the table below.

#### Seed Node Configuration

| Config [p2p] | Setting |
| --- | --- |
| laddr | tcp://0.0.0.0:26656 |
| external\_address | vps\_instance\_public\_ip:26656 |
| seed\_mode | true |

1. Add Supernova seed nodes (kudos @0x3639 @tapwoot @coinselor)

Navigate to the configuration directory and edit the `config.toml` file with the following seed nodes:

```auto
seeds = "b91ab16e7454eeaabcb0d4c5d2f900a08ed518aa@5.196.22.239:26656,7efe3e47afbbf38c44179d3802aee4cad7af47eb@208.115.200.55:26656,7cd3cb605a8da6a7be20736c171ee33d307d6f88@3.94.70.251:26656"

```

1. Setup a **Systemd service** (optional, recommended)

```bash
cp /root/supernova/build/supernovad /usr/local/bin/supernovad
sudo nano /etc/systemd/system/supernova.service

```

Assuming you’ve completed Step 5, paste the following configuration:

```auto
[Unit]
Description=supernova service
After=network.target
[Service]
LimitNOFILE=32768
User=root
Group=root
Type=simple
SuccessExitStatus=SIGKILL 9
ExecStart=/usr/local/bin/supernovad start
ExecStop=/usr/bin/pkill -9 supernovad
Restart=on-failure
TimeoutStopSec=10s
TimeoutStartSec=10s
[Install]
WantedBy=multi-user.target

```

Save and reload the configuration:

```bash
systemctl daemon-reload

```

Now please wait until the `genesis.json` contains all xchain Pillars that want to participate in the Gensis of the Supernova extension-chain.

After the final version of the `genesis.json` is uploaded on your machine, please start the `supernovad` service:

```bash
systemctl start supernova.service

```

❗❗❗ Please make sure you’re running the latest `supernovad` binary ❗❗❗

```bash
cd /root/supernova
git pull
make build

```

---

_[View the full topic](https://forum.hypercore.one/t/extension-chains/52)._
