π Installation
π» Hardware Requirements
Components | Minimum Requirements |
---|---|
CPU | 6 |
RAM | 32 GB |
STORAGE | 400 GB SSD |
1οΈβ£ Installation packages and dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
β‘οΈ Go Installation
cd $HOME
VER="1.23.4"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
2οΈβ£ Install node
echo "export NATIVE_PORT="58"" >> $HOME/.bash_profile
source $HOME/.bash_profile
mkdir -p $HOME/.gonative/cosmovisor/genesis/bin/
rm -rf $HOME/gonative
git clone https://github.com/gonative-cc/gonative && cd gonative
git checkout v0.1.1
make build
mv $HOME/gonative/out/gonative $HOME/.gonative/cosmovisor/genesis/bin/gonatived
sudo ln -s $HOME/.gonative/cosmovisor/genesis $HOME/.gonative/cosmovisor/current -f
sudo ln -s $HOME/.gonative/cosmovisor/current/bin/gonatived /usr/local/bin/gonatived -f
go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]
cd
β‘οΈ Create a service
sudo tee /etc/systemd/system/gonatived.service > /dev/null <<EOF
[Unit]
Description=native node service
After=network-online.target
[Service]
User=root
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=/root/.gonative"
Environment="DAEMON_NAME=gonatived"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/root/.gonative/cosmovisor/current/bin"
[Install]
WantedBy=multi-user.target
EOF
β‘οΈ Letβs activate it
sudo systemctl daemon-reload
sudo systemctl enable gonatived
β‘οΈ Initialize the node
gonatived config set client chain-id native-t1
gonatived config set client keyring-backend test
gonatived config set client node tcp://localhost:${NATIVE_PORT}657
gonatived init Moniker-Name --chain-id native-t1
β‘οΈ Genesis addrbook and others
wget -O $HOME/.gonative/config/genesis.json "https://raw.githubusercontent.com/MictoNode/native-testnet/refs/heads/main/genesis.json"
wget -O $HOME/.gonative/config/addrbook.json "https://raw.githubusercontent.com/MictoNode/native-testnet/refs/heads/main/addrbook.json"
β‘οΈ Port
sed -i.bak -e "s%:26658%:${NATIVE_PORT}658%g;
s%:26657%:${NATIVE_PORT}657%g;
s%:6060%:${NATIVE_PORT}060%g;
s%:26656%:${NATIVE_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${NATIVE_PORT}656\"%;
s%:26660%:${NATIVE_PORT}660%g" $HOME/.gonative/config/config.toml
sed -i.bak -e "s%:1317%:${NATIVE_PORT}317%g;
s%:8080%:${NATIVE_PORT}080%g;
s%:9090%:${NATIVE_PORT}090%g;
s%:9091%:${NATIVE_PORT}091%g;
s%:8545%:${NATIVE_PORT}545%g;
s%:8546%:${NATIVE_PORT}546%g;
s%:6065%:${NATIVE_PORT}065%g" $HOME/.gonative/config/app.toml
β‘οΈ Peers and Seeds
SEEDS="ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@testnet-seeds.polkachu.com:30656"
PEERS="[email protected]:52656,[email protected]:56406,[email protected]:26656,[email protected]:56406,[email protected]:52656,[email protected]:27656,[email protected]:40656,[email protected]:10007,[email protected]:26056,[email protected]:26656,[email protected]:15007,[email protected]:32107,[email protected]:26656,[email protected]:30656,[email protected]:24096,[email protected]:30656,[email protected]:26444,[email protected]:26656,[email protected]:38656,[email protected]:24656,[email protected]:12056,[email protected]:26656,[email protected]:24096,[email protected]:26656,[email protected]:26656,[email protected]:52656,[email protected]:26656,[email protected]:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.gonative/config/config.toml
β‘οΈ Pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.gonative/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.gonative/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"10\"/" $HOME/.gonative/config/app.toml
β‘οΈ Indexer
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.gonative/config/config.toml
β‘οΈ Gas Settings
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.1untiv"|g' $HOME/.gonative/config/app.toml
β‘οΈ Prometheus
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.gonative/config/config.toml
β‘οΈ Data
sed -i -e "s/^app-db-backend *=.*/app-db-backend = \"goleveldb\"/;" $HOME/.gonative/config/app.toml
sed -i -e "s/^db_backend *=.*/db_backend = \"pebbledb\"/" $HOME/.gonative/config/config.toml
β‘οΈ Starter Snap (thx Stavr)
cd $HOME
cp $HOME/.gonative/data/priv_validator_state.json $HOME/.gonative/priv_validator_state.json.backup
rm -rf $HOME/.gonative/data
LATEST_SNAPSHOT=$(curl -s https://server-4.stavr.tech/Testnet/Native/ | grep -oE 'native-snap-[0-9]+\.tar\.lz4' | while read SNAPSHOT; do HEIGHT=$(curl -s "https://server-4.stavr.tech/Testnet/Native/${SNAPSHOT%.tar.lz4}-info.txt" | awk '/Block height:/ {print $3}'); echo "$SNAPSHOT $HEIGHT"; done | sort -k2 -nr | head -n 1 | awk '{print $1}')
curl -o - -L https://server-4.stavr.tech/Testnet/Native/$LATEST_SNAPSHOT | lz4 -c -d - | tar -x -C $HOME/.gonative
mv $HOME/.gonative/priv_validator_state.json.backup $HOME/.gonative/data/priv_validator_state.json
β‘οΈ Letβs get started
sudo systemctl restart gonatived
journalctl -fu gonatived -o cat
β‘οΈ Log Command
sudo journalctl -fu gonatived -o cat
β‘οΈ Create wallet
Warning
Donβt forget to backup the wallet words!
gonatived keys add wallet-name
β‘οΈ Import wallet
gonatived keys add wallet-name --recover
β‘οΈ Create Validator
Reminder
You canβt create a validator without Sync. You must have to catch the latest block.
rm -rf /root/validator.json
cat > ./validator.json << EOF
{
"pubkey": $(gonatived tendermint show-validator),
"amount": "1000000untiv",
"moniker": "<your_node_name>",
"identity": "optional identity signature (ex. UPort or Keybase)",
"website": "validator's (optional) website",
"security": "validator's (optional) security contact email",
"details": "validator's (optional) details",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.2",
"min-self-delegation": "1"
}
EOF
gonatived tx staking create-validator ./validator.json --chain-id=native-t1 --fees 35000untiv --gas 350000 --from=wallet-name -y
β‘οΈ Delegate to Yourself
gonatived tx staking delegate $(gonatived keys show wallet-name --bech val -a) 1000000untiv --from wallet-name --chain-id native-t1 --fees 35000untiv --gas 350000 -y
β‘οΈ Edit Validator
gonatived tx staking edit-validator \
--chain-id native-t1 \
--commission-rate 0.1 \
--new-moniker "validator-name" \
--identity "" \
--details "" \
--website "" \
--security-contact "" \
--from "wallet-name" \
--node http://localhost:${NATIVE_PORT}657 \
--fees 35000untiv \
--gas 350000 \
-y
β‘οΈ Complete deletion
cd $HOME
sudo systemctl stop gonatived
sudo systemctl disable gonatived
sudo rm -rf /etc/systemd/system/gonatived.service
sudo systemctl daemon-reload
sudo rm -f /usr/local/bin/gonatived
sudo rm -f $(which gonatived)
sudo rm -rf $HOME/.gonatived
sed -i "/NATIVE_PORT_/d" $HOME/.bash_profile
β‘οΈ Block check
local_height=$(curl -s localhost:${NATIVE_PORT}657/status | jq -r .result.sync_info.latest_block_height); network_height=$(curl -s https://native-testnet-rpc.mictonode.com/status | jq -r .result.sync_info.latest_block_height); blocks_left=$((network_height - local_height)); echo "Your node height: $local_height"; echo "Network height: $network_height"; echo "Blocks left: $blocks_left"
- Your node height - the current block of your node
- Network height - the last block of the network
- Blocks left - how many blocks your node has left to sync.
On This Page
- π» Hardware Requirements
- 1οΈβ£ Installation packages and dependencies
- β‘οΈ Go Installation
- 2οΈβ£ Install node
- β‘οΈ Create a service
- β‘οΈ Letβs activate it
- β‘οΈ Initialize the node
- β‘οΈ Genesis addrbook and others
- β‘οΈ Port
- β‘οΈ Peers and Seeds
- β‘οΈ Pruning
- β‘οΈ Indexer
- β‘οΈ Gas Settings
- β‘οΈ Prometheus
- β‘οΈ Data
- β‘οΈ Starter Snap (thx Stavr)
- β‘οΈ Letβs get started
- β‘οΈ Log Command
- β‘οΈ Create wallet
- β‘οΈ Import wallet
- β‘οΈ Create Validator
- β‘οΈ Delegate to Yourself
- β‘οΈ Edit Validator
- β‘οΈ Complete deletion
- β‘οΈ Block check