This testnet will start at the patched version of juno (v2.1.0
). You will need to use the distributed binary from the juno packages repository.
- Stop your node
- Reset
junod unsafe-reset-all
- Remove genesis
rm .juno/config/genesis.json
- Remove gentxs
rm -r .juno/config/gentx/
- If you are using cosmovisor, remove symlink:
rm .juno/cosmovisor/current
- Remove & recreate upgrades dir:
rm -r .juno/cosmovisor/upgrades/ && mkdir -p .juno/cosmovisor/upgrades
- Check genesis bin is
v2.1.0
:$DAEMON_HOME/cosmovisor/genesis/bin/junod version
- Remove
seeds
andpersistent_peers
entries inconfig.toml
- people will post their peer on discord before genesis - Follow generate gentx as normal below
Once you have deleted the old stuff, your cosmovisor should look like:
.juno/cosmovisor/
├── genesis
│ └── bin
│ └── junod
└── upgrades
Genesis File
curl -s https://raw.githubusercontent.com/CosmosContracts/testnets/main/uni-1/genesis.json > ~/.juno/config/genesis.json
Genesis sha256
sha256sum ~/.juno/config/genesis.json
# 5276db519e92dc627b5586571721e621382dbbe07425bb75072dcaea23bfccd5
junod version
$ junod version --long
name: juno
server_name: junod
version: v2.1.0
commit: e6b8c212b178cf575035065b78309aed547b1335
build_tags: netgo muslc, # THIS BIT IS KEY
Seed nodes
98daa8308d2eb807e9419b98286191ab14509152@juno-uni.seed.rhinostake.com:26656
Persistent Peers
TBC
Prerequisites: Make sure to have Golang >=1.17.
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
Note, if you're reusing a box from uni
you likely already have the correct binary. If you're using cosmovisor, you can simply follow the steps at the top of this page.
# find out where junod is - will likely be /home/<your-user>/go/bin/junod
which junod
# put new binary there i.e. in path/to/juno
wget https://github.com/CosmosContracts/juno/releases/download/v2.1.0/junod -O /home/<your-user>/go/bin/junod
# if you run this, you should see build_tags: netgo muslc,
# if there is a permissions problem use chmod/chown to make sure it is executable
junod version --long
# confirm it is using the static lib - should return "not a dynamic executable"
ldd $(which junod)
# if you really want to be sure
# this should return:
# ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked,
# Go BuildID=4Ec3fj_EKdvh_u8K3RGJ/JIKOgYFXTJ9LzGROhs8n/uC9gpeaM9MaYurh9DJiN/YcvB8Jc2ivQM2zUSHMhg, stripped
file $(which junod)
Check that you have the right Juno version installed:
$ junod version --long
name: juno
server_name: junod
version: v2.1.0
commit: e6b8c212b178cf575035065b78309aed547b1335
build_tags: netgo muslc, # THE MUSLC TAG IS KEY
- 8-16GB RAM
- 100GB of disk space
- 2 cores
Below are the instructions to generate & submit your genesis transaction
- Initialize the Juno directories and create the local genesis file with the correct chain-id:
junod init <moniker-name> --chain-id=uni-1
- Create a local key pair (skip this step if you already have a key):
> junod keys add <key-name>
- 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
- Create the gentx, use only
9000000000ujunox
:
junod gentx <key-name> 9000000000ujunox --chain-id=uni-1
If all goes well, you will see a message similar to the following:
Genesis transaction written to "/home/user/.juno/config/gentx/gentx-******.json"
- Change minimum gas prices in
app.toml
to0.025ujunox
.
-
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-1/gentx/
> cd testnets > cp ~/.juno/config/gentx/gentx*.json ./uni-1/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.
Note, 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/<user>/.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>
and <CHAIN_ID>
:
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