Skip to content

Latest commit

 

History

History
231 lines (161 loc) · 6.01 KB

README.md

File metadata and controls

231 lines (161 loc) · 6.01 KB

Junø - uni-5 Testnet

This unincentivized testnet will start at juno v9.0.0.

The faucet will be patched to have a large sum of fake USDC, usdcx.

If you are reusing a testnet box, do this first

  1. Stop your node
  2. Build v9.0.0 tag of junod
  3. Reset using junod tendermint unsafe-reset-all --home ~/.juno (the --home flag is required)
  4. Remove genesis rm $HOME/.juno/config/genesis.json
  5. Remove gentxs rm -r $HOME/.juno/config/gentx/
  6. If you are using cosmovisor, remove symlink: rm $HOME/.juno/cosmovisor/current
  7. Then remove upgrades dir rm -r $HOME/.juno/cosmovisor/upgrades && mkdir $HOME/.juno/cosmovisor/upgrades
  8. Move junod to genesis bin: cp $HOME/go/bin/junod $DAEMON_HOME/cosmovisor/genesis/bin
  9. Remove any upgrade-info file in the data dir: rm $HOME/.juno/data/upgrade-info.json
  10. Check genesis bin is v9.0.0: $DAEMON_HOME/cosmovisor/genesis/bin/junod version
  11. If statesync is enabled in your config, turn it off
  12. Follow generate gentx as normal below

If you are using a remote signer (TMKMS) you will also need to:

  1. Stop the chain's signing process on the signer box
  2. Update chain id in that chain's config file
  3. Open the chain id's configured consensus.json and put 0 for height, round and step.
  4. Copy the priv_validator_key.json you used on the signer box to whatever box you use to generate the gentx, before generating it
  5. Restart the chain's signer process on the signer box before network genesis

Setup

Prerequisites: Make sure to have Golang >=1.18.

Minimum hardware requirements

  • 8-16GB RAM
  • 200GB of disk space
  • 2 cores

Go setup

You need to ensure your gopath configuration is correct. If the following 'make' step does not work then you might have to add these lines to your .profile or .zshrc in the users home folder:

nano ~/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin

Source update .profile

source .profile

Download Juno

git clone https://github.com/CosmosContracts/juno
cd juno
git checkout v9.0.0
make build && make install

Check that you have the right Juno version installed:

$ junod version --long
name: juno
server_name: junod
version: v9.0.0
commit: e6f9629538a88edf11aa7e7ed3d68c61f8e96aa6
build_tags: netgo,ledger

Setup validator node

Below are the instructions to generate & submit your genesis transaction

Generate genesis transaction (gentx)

  1. Initialize the Juno directories and create the local genesis file with the correct chain-id:
junod init <moniker-name> --chain-id=uni-5
  1. Create a local key pair (skip this step if you already have a key):
> junod keys add <key-name>
  1. Add your account to your local genesis file with a given amount and the key you just created. Use only 10000000000ujunox, other amounts will be ignored.
junod add-genesis-account $(junod keys show <key-name> -a) 10000000000ujunox
  1. Create the gentx, use only 9000000000ujunox:
junod gentx <key-name> 9000000000ujunox --chain-id=uni-5

If all goes well, you will see a message similar to the following:

Genesis transaction written to "${HOME}/.juno/config/gentx/gentx-******.json"
  1. Change minimum gas prices in app.toml to 0.0025ujunox.

Submit genesis transaction

  • Fork the testnets repo into your Github account

  • Clone your repo using

    git clone https://github.com/<your-github-username>/testnets
  • Copy the generated gentx json file to <repo_path>/uni-5/gentx/. If you want, rename it to <your-validator-moniker>.json so it's easier to identify.

    > cd testnets
    > cp "${HOME}/.juno/config/gentx/gentx*.json" ./uni-5/gentx/
  • Commit and push to your repo

  • Create a PR onto https://github.com/CosmosContracts/testnets

  • Only PRs from individuals / groups with a history successfully running nodes will be accepted. This is to ensure the network successfully starts on time.

Running in production

Note, as usual we'll be going through some upgrades for this testnet. Consider using Cosmovisor to make your life easier. Setting up Cosmovisor is covered in the Juno Documentation.

Download Genesis file when the time is right. Put it in your ${HOME}/.juno folder.

If you have not installed cosmovisor, create a systemd file for your Juno service:

sudo nano /etc/systemd/system/junod.service

Copy and paste the following and update <YOUR_USERNAME>:

Description=Juno daemon
After=network-online.target

[Service]
User=juno
ExecStart=/home/<YOUR_USERNAME>/go/bin/junod start
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target

Enable and start the new service:

sudo systemctl enable junod
sudo systemctl start junod

Check status:

junod status

Check logs:

journalctl -u junod -f

Once the Genesis has been Generated.

Genesis File

Genesis File:

   curl -s  https://raw.githubusercontent.com/CosmosContracts/testnets/main/uni-5/genesis.json > ~/.juno/config/genesis.json

Genesis sha256

sha256sum "${HOME}/.juno/config/genesis.json"
# f14bf43d43e69d470859d2ba1e1eee6d576229aeb1e7c26cc98d29254886820a

junod version

$ junod version --long
name: juno
server_name: junod
version: v9.0.0
commit: e6f9629538a88edf11aa7e7ed3d68c61f8e96aa6
build_tags: netgo,ledger

Seed nodes

TBD

Persistent Peers

TBC

Learn more