forked from cerc-io/laconicd-deprecated
docs: add docs for testnet
This commit is contained in:
parent
24e0a75673
commit
dd114a939f
7
testnet/README.md
Normal file
7
testnet/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Testnet
|
||||
|
||||
## Setup local chibaclonk multi node testnet in local enviorment
|
||||
|
||||
```shell
|
||||
$ bash multinode_testnet.sh
|
||||
```
|
201
testnet/full_node.md
Normal file
201
testnet/full_node.md
Normal file
@ -0,0 +1,201 @@
|
||||
# Instructions to Run Full Node
|
||||
|
||||
Hardware
|
||||
---
|
||||
|
||||
#### Supported
|
||||
|
||||
- **Operating System (OS):** Ubuntu 20.04
|
||||
- **CPU:** 1 core
|
||||
- **RAM:** 2GB
|
||||
- **Storage:** 25GB SSD
|
||||
|
||||
#### Recommended
|
||||
|
||||
- **Operating System (OS):** Ubuntu 20.04
|
||||
- **CPU:** 2 core
|
||||
- **RAM:** 4GB
|
||||
- **Storage:** 50GB SSD
|
||||
|
||||
# A) Setup
|
||||
|
||||
## 1) Install Golang (go)
|
||||
|
||||
1.1) Remove any existing installation of `go`
|
||||
|
||||
```
|
||||
sudo rm -rf /usr/local/go
|
||||
```
|
||||
|
||||
1.2) Install latest/required Go version (installing `go1.17.2`)
|
||||
|
||||
```
|
||||
curl https://golang.org/dl/go1.17.2.linux-amd64.tar.gz
|
||||
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz
|
||||
```
|
||||
|
||||
1.3) Update env variables to include `go`
|
||||
|
||||
```
|
||||
cat <<'EOF' >>$HOME/.profile
|
||||
export GOROOT=/usr/local/go
|
||||
export GOPATH=$HOME/go
|
||||
export GO111MODULE=on
|
||||
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
|
||||
EOF
|
||||
|
||||
source $HOME/.profile
|
||||
```
|
||||
|
||||
1.4) Check the version of go installed
|
||||
|
||||
```
|
||||
go version
|
||||
```
|
||||
|
||||
### 2) Install required software packages
|
||||
|
||||
```
|
||||
sudo apt-get install git curl build-essential make jq -y
|
||||
```
|
||||
|
||||
### 3) Install `chibaclonkd`
|
||||
|
||||
```
|
||||
git clone https://github.com/vulcanize/chiba-clonk.git
|
||||
cd chiba-clonk
|
||||
git fetch --all
|
||||
git checkout main
|
||||
make install
|
||||
```
|
||||
|
||||
### 4) Verify your installation
|
||||
|
||||
```
|
||||
chibaclonkd version --long
|
||||
```
|
||||
|
||||
On running the above command, you should see a similar response like this. Make sure that the *version* and *commit
|
||||
hash* are accurate
|
||||
|
||||
```
|
||||
name: chibaclonkd
|
||||
server_name: chibaclonkd
|
||||
```
|
||||
|
||||
### 5) Initialize Node
|
||||
|
||||
**Not required if you have already initialized before**
|
||||
|
||||
```
|
||||
chibaclonkd init <your-node-moniker> --chain-id chibaclonk_81337-1
|
||||
```
|
||||
|
||||
On running the above command, node will be initialized with default configuration. (config files will be saved in node's
|
||||
default home directory (~/.chibaclonkd/config)
|
||||
|
||||
NOTE: Backup node and validator keys . You will need to use these keys at a later point in time.
|
||||
|
||||
---
|
||||
|
||||
# B) Starting Node
|
||||
|
||||
## 1) Download Final Genesis
|
||||
|
||||
Use `curl` to download the genesis file
|
||||
**Replace your **genesis** file with published genesis file**
|
||||
|
||||
```shell
|
||||
curl http://167.172.173.94:26657/genesis | jq .result.genesis > ~/.chibaclonkd/config/genesis.json
|
||||
```
|
||||
|
||||
Verify sha256 hash of genesis file with the below command
|
||||
|
||||
```
|
||||
jq -S -c -M '' ~/.chibaclonkd/config/genesis.json | shasum -a 256
|
||||
```
|
||||
|
||||
genesis sha256 hash should be
|
||||
|
||||
```
|
||||
4e5b68b5652a608c44c33e669c84ac179d9c0e301f958b5448f037a53c5cbb4e
|
||||
```
|
||||
|
||||
## 2) Update Peers & Seeds in config.toml
|
||||
|
||||
```
|
||||
peers="5ad2e6c35f2c84ff3ee31d89a95b34d92cb6afb1@157.230.101.237:26656,defc95b08547b6ef254723ad9621967a7e819020@161.35.223.44:26656"
|
||||
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.chibaclonkd/config/config.toml
|
||||
```
|
||||
|
||||
## 3) Start the Full Node
|
||||
|
||||
#### 3.1) Start node as `systemctl` service
|
||||
|
||||
3.1.1) Create the service file
|
||||
|
||||
```
|
||||
sudo tee /etc/systemd/system/chibaclonkd.service > /dev/null <<EOF
|
||||
[Unit]
|
||||
Description=chibaclonkd Daemon
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
User=$USER
|
||||
ExecStart=$(which chibaclonkd) start --gql-playground --gql-server
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
LimitNOFILE=65535
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
```
|
||||
|
||||
3.1.2) Load service and start
|
||||
|
||||
```
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable chibaclonkd
|
||||
sudo systemctl start chibaclonkd
|
||||
|
||||
```
|
||||
|
||||
3.1.3) Check status of service
|
||||
```
|
||||
|
||||
sudo systemctl status chibaclonkd
|
||||
|
||||
```
|
||||
|
||||
`NOTE:`
|
||||
A helpful command here is `journalctl` that can be used to:
|
||||
|
||||
a) check logs
|
||||
```
|
||||
|
||||
journalctl -u chibaclonkd
|
||||
|
||||
```
|
||||
|
||||
b) most recent logs
|
||||
```
|
||||
|
||||
journalctl -xeu chibaclonkd
|
||||
|
||||
```
|
||||
|
||||
c) logs from previous day
|
||||
```
|
||||
|
||||
journalctl --since "1 day ago" -u chibaclonkd
|
||||
|
||||
```
|
||||
|
||||
d) Check logs with follow flag
|
||||
```
|
||||
|
||||
journalctl -f -u chibaclonkd
|
||||
|
||||
```
|
231
testnet/genesis-validators.md
Normal file
231
testnet/genesis-validators.md
Normal file
@ -0,0 +1,231 @@
|
||||
# Setting up a Genesis Validator for Vulcanize chibaclonk Testnet (chibaclonk_9000-1)
|
||||
|
||||
Hardware
|
||||
---
|
||||
|
||||
#### Supported
|
||||
|
||||
- **Operating System (OS):** Ubuntu 20.04
|
||||
- **CPU:** 1 core
|
||||
- **RAM:** 2GB
|
||||
- **Storage:** 25GB SSD
|
||||
|
||||
#### Recommended
|
||||
|
||||
- **Operating System (OS):** Ubuntu 20.04
|
||||
- **CPU:** 2 core
|
||||
- **RAM:** 4GB
|
||||
- **Storage:** 50GB SSD
|
||||
|
||||
# A) Setup
|
||||
|
||||
## 1) Install Golang (go)
|
||||
|
||||
1.1) Remove any existing installation of `go`
|
||||
|
||||
```
|
||||
sudo rm -rf /usr/local/go
|
||||
```
|
||||
|
||||
1.2) Install latest/required Go version (installing `go1.17.2`)
|
||||
|
||||
```
|
||||
curl -O https://golang.org/dl/go1.17.2.linux-amd64.tar.gz
|
||||
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz
|
||||
```
|
||||
|
||||
1.3) Update env variables to include `go`
|
||||
|
||||
```
|
||||
cat <<'EOF' >>$HOME/.profile
|
||||
export GOROOT=/usr/local/go
|
||||
export GOPATH=$HOME/go
|
||||
export GO111MODULE=on
|
||||
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
|
||||
EOF
|
||||
|
||||
source $HOME/.profile
|
||||
```
|
||||
|
||||
1.4) Check the version of go installed
|
||||
|
||||
```
|
||||
go version
|
||||
```
|
||||
|
||||
### 2) Install required software packages
|
||||
|
||||
```
|
||||
sudo apt-get update && sudo apt-get install git curl build-essential make jq -y
|
||||
```
|
||||
|
||||
### 3) Install `chibaclonk`
|
||||
|
||||
```
|
||||
git clone https://github.com/vulcanize/chiba-clonk.git
|
||||
cd chiba-clonk
|
||||
git fetch --all
|
||||
git checkout main
|
||||
make install
|
||||
```
|
||||
|
||||
### 4) Verify your installation
|
||||
|
||||
```
|
||||
chibaclonkd version --long
|
||||
```
|
||||
|
||||
On running the above command, you should see a similar response like this. Make sure that the *version* and *commit
|
||||
hash* are accurate
|
||||
|
||||
```
|
||||
name: chibaclonk
|
||||
server_name: chibaclonkd
|
||||
```
|
||||
|
||||
### 5) Initialize Node
|
||||
|
||||
**Not required if you have already initialized before**
|
||||
|
||||
```
|
||||
chibaclonkd init <your-node-moniker> --chain-id chibaclonk_81337-1
|
||||
```
|
||||
|
||||
On running the above command, node will be initialized with default configuration. (config files will be saved in node's
|
||||
default home directory (~/.chibaclonkd/config)
|
||||
|
||||
NOTE: Backup node and validator keys. You will need to use these keys at a later point in time.
|
||||
|
||||
---
|
||||
|
||||
## 6) Create Account keys
|
||||
|
||||
if you have participated in previous testnet and have mnemonic phrase, use below command to recover your account
|
||||
|
||||
```
|
||||
chibaclonkd keys add <key-name> --recover
|
||||
```
|
||||
|
||||
to create new account
|
||||
|
||||
```
|
||||
chibaclonkd keys add <key-name>
|
||||
```
|
||||
|
||||
NOTE: Save `mnemonic` and related account details (public key). You will need to use the need mnemonic/private key to
|
||||
recover accounts at a later point in time.
|
||||
|
||||
## 7) Add Genesis Account
|
||||
|
||||
```
|
||||
chibaclonkd add-genesis-account <key-name> 4500000000000000agnt --keyring-backend os
|
||||
```
|
||||
|
||||
## 8) Create Your `gentx`
|
||||
|
||||
```
|
||||
chibaclonkd gentx <key-name> 4500000000000000agnt \
|
||||
--pubkey=$(chibaclonkd tendermint show-validator) \
|
||||
--chain-id="chibaclonk_81337-1" \
|
||||
--moniker="my-moniker" \
|
||||
--website="https://yourweb.site" \
|
||||
--details="description of my validator" \
|
||||
--commission-rate="0.10" \
|
||||
--commission-max-rate="0.20" \
|
||||
--commission-max-change-rate="0.01" \
|
||||
--min-self-delegation="1"
|
||||
```
|
||||
|
||||
Note:
|
||||
|
||||
- `<key-name>` and `chain-id` are required. other flags are optional
|
||||
- Don't change amount value while creating your gentx
|
||||
- Genesis transaction file will be saved in `~/.chibaclonkd/config/gentx` folder
|
||||
|
||||
## 9) Submit Your gentx
|
||||
|
||||
Submit your `gentx` file to the [testnets]() in the format of
|
||||
`<validator-moniker>-gentx.json`
|
||||
|
||||
NOTE: (Do NOT use space in the file name)
|
||||
|
||||
To submit the gentx file, follow the below process:
|
||||
|
||||
- Fork the [testnets]() repository
|
||||
- Upload your gentx file in `chibaclonk_81337-1/config/gentxs` folder
|
||||
- Submit Pull Request to [testnets]() with name `ADD <your-moniker> gentx`
|
||||
|
||||
---
|
||||
|
||||
**Execute below instructions only after publishing of final genesis file**
|
||||
|
||||
genesis file will be published to [testnets/chibaclonk_9000-1]()
|
||||
|
||||
# B) Starting the validator
|
||||
|
||||
TBU
|
||||
|
||||
## 3) Start the Node
|
||||
|
||||
#### 3.1) Start node as `systemctl` service
|
||||
|
||||
3.1.1) Create the service file Note: this step is not required if you did setup before
|
||||
|
||||
```
|
||||
sudo tee /etc/systemd/system/chibaclonkd.service > /dev/null <<EOF
|
||||
[Unit]
|
||||
Description=chibaclonkd Daemon
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
User=$USER
|
||||
ExecStart=$(which chibaclonkd) start
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
LimitNOFILE=65535
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
```
|
||||
|
||||
3.1.2) Load service and start
|
||||
|
||||
```
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable chibaclonkd
|
||||
sudo systemctl start chibaclonkd
|
||||
```
|
||||
|
||||
3.1.3) Check status of service
|
||||
|
||||
```
|
||||
sudo systemctl status chibaclonkd
|
||||
```
|
||||
|
||||
`NOTE:`
|
||||
A helpful command here is `journalctl` that can be used to:
|
||||
|
||||
a) check logs
|
||||
|
||||
```
|
||||
journalctl -u chibaclonkd
|
||||
```
|
||||
|
||||
b) most recent logs
|
||||
|
||||
```
|
||||
journalctl -xeu chibaclonkd
|
||||
```
|
||||
|
||||
c) logs from previous day
|
||||
|
||||
```
|
||||
journalctl --since "1 day ago" -u chibaclonkd
|
||||
```
|
||||
|
||||
d) Check logs with follow flag
|
||||
|
||||
```
|
||||
journalctl -f -u chibaclonkd
|
||||
```
|
232
testnet/multinode_testnet.sh
Normal file
232
testnet/multinode_testnet.sh
Normal file
@ -0,0 +1,232 @@
|
||||
#/bin/sh
|
||||
|
||||
# clean the existed chain
|
||||
rm -rf ~/.testchibaclonk*
|
||||
|
||||
echo "Installing the require tools "
|
||||
sudo apt-get install git curl build-essential make nohup jq -y
|
||||
echo "Done Installing the tools"
|
||||
|
||||
command_exists() {
|
||||
type "$1" &>/dev/null
|
||||
}
|
||||
|
||||
if command_exists go; then
|
||||
echo "Golang is already installed"
|
||||
else
|
||||
echo "Installing golang dependencies"
|
||||
wget https://golang.org/dl/go1.17.2.linux-amd64.tar.gz
|
||||
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz
|
||||
|
||||
echo "Updating the profile"
|
||||
export GOPATH=$HOME/go
|
||||
export GOROOT=/usr/local/go
|
||||
export GOBIN=$GOPATH/bin
|
||||
export PATH=$PATH:/usr/local/go/bin:$GOBIN
|
||||
|
||||
echo "" >>~/.profile
|
||||
echo 'export GOPATH=$HOME/go' >>~/.profile
|
||||
echo 'export GOROOT=/usr/local/go' >>~/.profile
|
||||
echo 'export GOBIN=$GOPATH/bin' >>~/.profile
|
||||
echo 'export PATH=$PATH:/usr/local/go/bin:$GOBIN' >>~/.profile
|
||||
|
||||
source ~/.profile
|
||||
mkdir -p "$GOBIN"
|
||||
mkdir -p $GOPATH/src/github.com
|
||||
go version
|
||||
fi
|
||||
|
||||
# chain env variables
|
||||
export DAEMON_HOME=~/.testchibaclonk
|
||||
export CHAINID=chibaclonk_9000-1
|
||||
export DENOM=agnt
|
||||
export GH_URL=https://github.com/vulcanize/chiba-clonk.git
|
||||
export CHAIN_VERSION=main
|
||||
export DAEMON=chibaclonkd
|
||||
|
||||
display_usage() {
|
||||
printf "** Please check the exported values:: **\n Daemon : $DAEMON\n Denom : $DENOM\n ChainID : $CHAINID\n DaemonHome : $DAEMON_HOME\n \n Github URL : $GH_URL\n Chain Version : $CHAIN_VERSION\n"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -z $DAEMON ] || [ -z $DENOM ] || [ -z $CHAINID ] || [ -z $DAEMON_HOME ] || [ -z $GH_URL ] || [ -z $CHAIN_VERSION ]; then
|
||||
display_usage
|
||||
fi
|
||||
|
||||
echo "--------- Install $DAEMON ---------"
|
||||
git clone -b $CHAIN_VERSION --single-branch $GH_URL && cd $(basename $_ .git)
|
||||
git fetch && git checkout $CHAIN_VERSION
|
||||
make install
|
||||
|
||||
cd $HOME
|
||||
|
||||
# check version
|
||||
$DAEMON version --long
|
||||
|
||||
#echo "----------Create test keys-----------"
|
||||
|
||||
export DAEMON_HOME_1=$DAEMON_HOME-1
|
||||
export DAEMON_HOME_2=$DAEMON_HOME-2
|
||||
export DAEMON_HOME_3=$DAEMON_HOME-3
|
||||
export DAEMON_HOME_4=$DAEMON_HOME-4
|
||||
|
||||
printf "DAEMON_HOME_1=$DAEMON_HOME_1\nDAEMON_HOME_2=$DAEMON_HOME_2\nDAEMON_HOME_3=$DAEMON_HOME_3\nDAEMON_HOME_4=$DAEMON_HOME_4\n"
|
||||
|
||||
rm -rf $DAEMON_HOME*
|
||||
|
||||
echo "-----Create daemon home directories if not exist------"
|
||||
|
||||
mkdir -p "$DAEMON_HOME_1"
|
||||
mkdir -p "$DAEMON_HOME_2"
|
||||
mkdir -p "$DAEMON_HOME_3"
|
||||
mkdir -p "$DAEMON_HOME_4"
|
||||
|
||||
echo "--------Start initializing the chain ($CHAINID)---------"
|
||||
|
||||
$DAEMON init --chain-id $CHAINID $DAEMON_HOME_1 --home $DAEMON_HOME_1 --keyring-backend test
|
||||
$DAEMON init --chain-id $CHAINID $DAEMON_HOME_2 --home $DAEMON_HOME_2 --keyring-backend test
|
||||
$DAEMON init --chain-id $CHAINID $DAEMON_HOME_3 --home $DAEMON_HOME_3 --keyring-backend test
|
||||
$DAEMON init --chain-id $CHAINID $DAEMON_HOME_4 --home $DAEMON_HOME_4 --keyring-backend test
|
||||
|
||||
echo "---------Creating four keys-------------"
|
||||
|
||||
$DAEMON keys add validator1 --home $DAEMON_HOME_1 --keyring-backend test
|
||||
$DAEMON keys add validator2 --home $DAEMON_HOME_2 --keyring-backend test
|
||||
$DAEMON keys add validator3 --home $DAEMON_HOME_3 --keyring-backend test
|
||||
$DAEMON keys add validator4 --home $DAEMON_HOME_4 --keyring-backend test
|
||||
|
||||
echo "----------Genesis creation---------"
|
||||
|
||||
$DAEMON --home $DAEMON_HOME_1 add-genesis-account validator1 1000000000000$DENOM --keyring-backend test
|
||||
$DAEMON --home $DAEMON_HOME_2 add-genesis-account validator2 1000000000000$DENOM --keyring-backend test
|
||||
$DAEMON --home $DAEMON_HOME_3 add-genesis-account validator3 1000000000000$DENOM --keyring-backend test
|
||||
$DAEMON --home $DAEMON_HOME_4 add-genesis-account validator4 1000000000000$DENOM --keyring-backend test
|
||||
$DAEMON --home $DAEMON_HOME_1 add-genesis-account $($DAEMON keys show validator2 -a --home $DAEMON_HOME_2 --keyring-backend test) 1000000000000$DENOM
|
||||
$DAEMON --home $DAEMON_HOME_1 add-genesis-account $($DAEMON keys show validator3 -a --home $DAEMON_HOME_3 --keyring-backend test) 1000000000000$DENOM
|
||||
$DAEMON --home $DAEMON_HOME_1 add-genesis-account $($DAEMON keys show validator4 -a --home $DAEMON_HOME_4 --keyring-backend test) 1000000000000$DENOM
|
||||
|
||||
echo "--------Gentx--------"
|
||||
|
||||
$DAEMON gentx validator1 90000000000$DENOM --chain-id $CHAINID --keyring-backend test --home $DAEMON_HOME_1
|
||||
$DAEMON gentx validator2 90000000000$DENOM --chain-id $CHAINID --keyring-backend test --home $DAEMON_HOME_2
|
||||
$DAEMON gentx validator3 90000000000$DENOM --chain-id $CHAINID --keyring-backend test --home $DAEMON_HOME_3
|
||||
$DAEMON gentx validator4 90000000000$DENOM --chain-id $CHAINID --keyring-backend test --home $DAEMON_HOME_4
|
||||
|
||||
echo "---------Copy all the genesis to $DAEMON_HOME_1----------"
|
||||
|
||||
cp $DAEMON_HOME_2/config/gentx/*.json $DAEMON_HOME_1/config/gentx/
|
||||
cp $DAEMON_HOME_3/config/gentx/*.json $DAEMON_HOME_1/config/gentx/
|
||||
cp $DAEMON_HOME_4/config/gentx/*.json $DAEMON_HOME_1/config/gentx/
|
||||
|
||||
echo "----------collect-gentxs------------"
|
||||
|
||||
$DAEMON collect-gentxs --home $DAEMON_HOME_1
|
||||
|
||||
echo "---------Updating $DAEMON_HOME_1 genesis.json ------------"
|
||||
|
||||
sed -i "s/172800000000000/600000000000/g" $DAEMON_HOME_1/config/genesis.json
|
||||
sed -i "s/172800s/600s/g" $DAEMON_HOME_1/config/genesis.json
|
||||
sed -i "s/stake/$DENOM/g" $DAEMON_HOME_1/config/genesis.json
|
||||
|
||||
echo "---------Distribute genesis.json of $DAEMON_HOME_1 to remaining nodes-------"
|
||||
|
||||
cp $DAEMON_HOME_1/config/genesis.json $DAEMON_HOME_2/config/
|
||||
cp $DAEMON_HOME_1/config/genesis.json $DAEMON_HOME_3/config/
|
||||
cp $DAEMON_HOME_1/config/genesis.json $DAEMON_HOME_4/config/
|
||||
|
||||
echo "---------Getting public IP address-----------"
|
||||
|
||||
IP="127.0.0.1"
|
||||
echo "Public IP address: ${IP}"
|
||||
|
||||
echo "----------Update node-id of $DAEMON_HOME_1 in remaining nodes---------"
|
||||
nodeID=$("${DAEMON}" tendermint show-node-id --home $DAEMON_HOME_1)
|
||||
echo $nodeID
|
||||
PERSISTENT_PEERS="$nodeID@$IP:16656"
|
||||
echo "PERSISTENT_PEERS : $PERSISTENT_PEERS"
|
||||
|
||||
echo "----------Updating $DAEMON_HOME_1 chain config-----------"
|
||||
|
||||
sed -i 's#tcp://127.0.0.1:26657#tcp://0.0.0.0:16657#g' $DAEMON_HOME_1/config/config.toml
|
||||
sed -i 's#tcp://0.0.0.0:26656#tcp://0.0.0.0:16656#g' $DAEMON_HOME_1/config/config.toml
|
||||
sed -i '/persistent_peers =/c\persistent_peers = "'""'"' $DAEMON_HOME_1/config/config.toml
|
||||
sed -i '/max_num_inbound_peers =/c\max_num_inbound_peers = 140' $DAEMON_HOME_1/config/config.toml
|
||||
sed -i '/max_num_outbound_peers =/c\max_num_outbound_peers = 110' $DAEMON_HOME_1/config/config.toml
|
||||
sed -i '/pprof_laddr =/c\# pprof_laddr = "localhost:6060"' $DAEMON_HOME_1/config/config.toml
|
||||
sed -i '/allow_duplicate_ip =/c\allow_duplicate_ip = true' $DAEMON_HOME_1/config/config.toml
|
||||
|
||||
sed -i 's#0.0.0.0:9090#0.0.0.0:1090#g' $DAEMON_HOME_1/config/app.toml
|
||||
sed -i 's#0.0.0.0:9091#0.0.0.0:1091#g' $DAEMON_HOME_1/config/app.toml
|
||||
|
||||
sed -i 's#0.0.0.0:8545#0.0.0.0:1545#g' $DAEMON_HOME_1/config/app.toml
|
||||
sed -i 's#0.0.0.0:8546#0.0.0.0:1546#g' $DAEMON_HOME_1/config/app.toml
|
||||
|
||||
echo "----------Updating $DAEMON_HOME_2 chain config-----------"
|
||||
|
||||
sed -i 's#tcp://127.0.0.1:26657#tcp://0.0.0.0:26657#g' $DAEMON_HOME_2/config/config.toml
|
||||
sed -i 's#tcp://0.0.0.0:26656#tcp://0.0.0.0:26656#g' $DAEMON_HOME_2/config/config.toml
|
||||
sed -i '/persistent_peers =/c\persistent_peers = "'"$PERSISTENT_PEERS"'"' $DAEMON_HOME_2/config/config.toml
|
||||
sed -i '/max_num_inbound_peers =/c\max_num_inbound_peers = 140' $DAEMON_HOME_2/config/config.toml
|
||||
sed -i '/max_num_outbound_peers =/c\max_num_outbound_peers = 110' $DAEMON_HOME_2/config/config.toml
|
||||
sed -i '/pprof_laddr =/c\# pprof_laddr = "localhost:6060"' $DAEMON_HOME_2/config/config.toml
|
||||
sed -i '/allow_duplicate_ip =/c\allow_duplicate_ip = true' $DAEMON_HOME_2/config/config.toml
|
||||
|
||||
sed -i 's#0.0.0.0:9090#0.0.0.0:2090#g' $DAEMON_HOME_2/config/app.toml
|
||||
sed -i 's#0.0.0.0:9091#0.0.0.0:2091#g' $DAEMON_HOME_2/config/app.toml
|
||||
|
||||
sed -i 's#0.0.0.0:8545#0.0.0.0:2545#g' $DAEMON_HOME_2/config/app.toml
|
||||
sed -i 's#0.0.0.0:8546#0.0.0.0:2546#g' $DAEMON_HOME_2/config/app.toml
|
||||
|
||||
echo "----------Updating $DAEMON_HOME_3 chain config------------"
|
||||
|
||||
sed -i 's#tcp://127.0.0.1:26657#tcp://0.0.0.0:36657#g' $DAEMON_HOME_3/config/config.toml
|
||||
sed -i 's#tcp://0.0.0.0:26656#tcp://0.0.0.0:36656#g' $DAEMON_HOME_3/config/config.toml
|
||||
sed -i '/persistent_peers =/c\persistent_peers = "'"$PERSISTENT_PEERS"'"' $DAEMON_HOME_3/config/config.toml
|
||||
sed -i '/max_num_inbound_peers =/c\max_num_inbound_peers = 140' $DAEMON_HOME_3/config/config.toml
|
||||
sed -i '/max_num_outbound_peers =/c\max_num_outbound_peers = 110' $DAEMON_HOME_3/config/config.toml
|
||||
sed -i '/pprof_laddr =/c\# pprof_laddr = "localhost:6060"' $DAEMON_HOME_3/config/config.toml
|
||||
sed -i '/allow_duplicate_ip =/c\allow_duplicate_ip = true' $DAEMON_HOME_3/config/config.toml
|
||||
|
||||
sed -i 's#0.0.0.0:9090#0.0.0.0:3090#g' $DAEMON_HOME_3/config/app.toml
|
||||
sed -i 's#0.0.0.0:9091#0.0.0.0:3091#g' $DAEMON_HOME_3/config/app.toml
|
||||
|
||||
sed -i 's#0.0.0.0:8545#0.0.0.0:3545#g' $DAEMON_HOME_3/config/app.toml
|
||||
sed -i 's#0.0.0.0:8546#0.0.0.0:3546#g' $DAEMON_HOME_3/config/app.toml
|
||||
|
||||
echo "----------Updating $DAEMON_HOME_4 chain config------------"
|
||||
|
||||
sed -i 's#tcp://127.0.0.1:26657#tcp://0.0.0.0:46657#g' $DAEMON_HOME_4/config/config.toml
|
||||
sed -i 's#tcp://0.0.0.0:26656#tcp://0.0.0.0:46656#g' $DAEMON_HOME_4/config/config.toml
|
||||
sed -i '/persistent_peers =/c\persistent_peers = "'"$PERSISTENT_PEERS"'"' $DAEMON_HOME_4/config/config.toml
|
||||
sed -i '/max_num_inbound_peers =/c\max_num_inbound_peers = 140' $DAEMON_HOME_4/config/config.toml
|
||||
sed -i '/max_num_outbound_peers =/c\max_num_outbound_peers = 110' $DAEMON_HOME_4/config/config.toml
|
||||
sed -i '/pprof_laddr =/c\# pprof_laddr = "localhost:6060"' $DAEMON_HOME_4/config/config.toml
|
||||
sed -i '/allow_duplicate_ip =/c\allow_duplicate_ip = true' $DAEMON_HOME_4/config/config.toml
|
||||
|
||||
sed -i 's#0.0.0.0:9090#0.0.0.0:4090#g' $DAEMON_HOME_4/config/app.toml
|
||||
sed -i 's#0.0.0.0:9091#0.0.0.0:4091#g' $DAEMON_HOME_4/config/app.toml
|
||||
|
||||
sed -i 's#0.0.0.0:8545#0.0.0.0:4545#g' $DAEMON_HOME_4/config/app.toml
|
||||
sed -i 's#0.0.0.0:8546#0.0.0.0:4546#g' $DAEMON_HOME_4/config/app.toml
|
||||
|
||||
echo "starting the chains"
|
||||
|
||||
nohup $(which $DAEMON) start --gql-playground --gql-server --home $DAEMON_HOME_1 >$DAEMON_HOME_1.log &
|
||||
sleep 5s
|
||||
echo "Checking $DAEMON_HOME_1 chain status"
|
||||
$DAEMON status --node tcp://localhost:16657
|
||||
|
||||
nohup $(which $DAEMON) start --gql-playground --gql-server --home $DAEMON_HOME_2 >$DAEMON_HOME_2.log &
|
||||
sleep 5s
|
||||
echo "Checking $DAEMON_HOME_2 chain status"
|
||||
$DAEMON status --node tcp://localhost:26657
|
||||
|
||||
nohup $(which $DAEMON) start --gql-playground --gql-server --home $DAEMON_HOME_3 >$DAEMON_HOME_3.log &
|
||||
sleep 5s
|
||||
echo "Checking $DAEMON_HOME_3 chain status"
|
||||
$DAEMON status --node tcp://localhost:36657
|
||||
|
||||
nohup $(which $DAEMON) start --gql-playground --gql-server --home $DAEMON_HOME_4 >$DAEMON_HOME_4.log &
|
||||
sleep 5s
|
||||
echo "Checking $DAEMON_HOME_4 chain status"
|
||||
$DAEMON status --node tcp://localhost:46657
|
56
testnet/validator_node.md
Normal file
56
testnet/validator_node.md
Normal file
@ -0,0 +1,56 @@
|
||||
### Create Validator Post Genesis
|
||||
|
||||
1. Run Full Node
|
||||
2. Create Account and Get test tokens
|
||||
3. Create Validator
|
||||
|
||||
### 1.Run Full Node
|
||||
|
||||
- Check "[Run Full Node](full-node.md)" section to Run a Full Node
|
||||
|
||||
### 2. Create Account & Get test tokens
|
||||
|
||||
```
|
||||
chibaclonkd keys add <key-name> --keyring-backend test
|
||||
```
|
||||
|
||||
NOTE: Save `mnemonic` and related account details (public key). You will need to use the need mnemonic/private key to
|
||||
recover accounts at a later point in time.
|
||||
|
||||
##### Get Test tokens from faucet
|
||||
|
||||
- Open this link : http://167.172.173.94:1314/ and paste your account
|
||||
- 1 gnt = 10^18 agnt
|
||||
- Each Transaction you will get 500gnt
|
||||
- Total Tokens 5000gnt for account
|
||||
|
||||
### 3.Create Validator
|
||||
|
||||
- ##### Check full node sync status
|
||||
|
||||
`chibaclonkd status 2>&1 | jq -r ".SyncInfo"`
|
||||
|
||||
`catching_up: false` means node is completely synced
|
||||
- ##### Create validator
|
||||
|
||||
`Note:` Only execute below transaction after complete sync of your full node
|
||||
|
||||
Please replace `key_name` with your key name and `moniker` also
|
||||
|
||||
```
|
||||
chibaclonkd tx staking create-validator \
|
||||
--amount=4500000000000000000000agnt \
|
||||
--pubkey=$(chibaclonkd tendermint show-validator) \
|
||||
--moniker="my-moniker" \
|
||||
--website="https://myweb.site" \
|
||||
--details="description of your validator" \
|
||||
--chain-id="chibaclonk_81337-1" \
|
||||
--commission-rate="0.10" \
|
||||
--commission-max-rate="0.20" \
|
||||
--commission-max-change-rate="0.01" \
|
||||
--min-self-delegation="1" \
|
||||
--gas="auto" \
|
||||
--gas-adjustment="1.2" \
|
||||
--gas-prices="0.025agnt" \
|
||||
--from=<key_name>
|
||||
```
|
Loading…
Reference in New Issue
Block a user