Welcome to validator AlxVoy ⚡ ANODE.TEAM



OKP4

Links

Mainnet service

Explorers

Sync

RPC & API

Peers and seeds

Genesis and addrbook

Wasm

Service script (Install, State-Sync, Snapshot, Delete)

wget -O OKP4.sh https://anode.team/OKP4/main/OKP4.sh && chmod u+x OKP4.sh && ./OKP4.sh

Installation

Hardware Requirements

  • Memory 32GB
  • CPUs 4 Cores (modern CPU's)
  • Disk 1TB of storage (SSD or NVME)

Software Requirements

  • Prerequisite: go1.18.5+ required. ref
  • Prerequisite: git. ref

Install last binary

git clone $GIT$
cd $FOLDER_GIT$
git checkout $VERSION$
make install

Init the config files

$BIN$ init <moniker> --chain-id $CHAIN$
$BIN$ config chain-id $CHAIN$

Create a wallet

$BIN$ keys add <wallet_name>

Download genesis and addrbook

curl https://anode.team/OKP4/main/genesis.json > ~/.$FOLDER_CONF$/config/genesis.json
curl https://anode.team/OKP4/main/addrbook.json > ~/.$FOLDER_CONF$/config/addrbook.json

Add peers, seed

SEEDS="$SEEDS$"
PEERS="$PEERS$"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.$FOLDER_CONF$/config/config.toml

Add min gas

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"$MIN_GAS$\"/" $HOME/.$FOLDER_CONF$/config/app.toml

Create the service file

sudo tee /etc/systemd/system/$BIN$.service > /dev/null <<EOF
[Unit]
Description=OKP4
After=network-online.target

[Service]
User=$USER
ExecStart=$(which $BIN$) start
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

Load service and start

sudo systemctl daemon-reload && sudo systemctl enable $BIN$
sudo systemctl restart $BIN$ && journalctl -fu $BIN$ -o cat

Create Validator

$BIN$ tx staking create-validator \
  --amount=1000000$TOKEN$ \
  --pubkey=$($BIN$ tendermint show-validator) \
  --moniker="<moniker>" \
  --identity="<identity>" \
  --website="<website>" \
  --details="<details>" \
  --security-contact="<contact>" \
  --chain-id="$CHAIN$" \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="1" \
  --fees="$FEES$" \
  --from=<wallet_name>

State-Sync

SNAP_RPC=https://okp4.rpc.m.anode.team:443 && \
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - $RPC_N$)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) && \
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
wget https://anode.team/unsafe-reset-all.sh && chmod u+x unsafe-reset-all.sh && ./unsafe-reset-all.sh $BIN$ $FOLDER_CONF$
peers="$PEER$"
sed -i.bak -e  "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.$FOLDER_CONF$/config/config.toml
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.$FOLDER_CONF$/config/config.toml
curl -o - -L https://anode.team/OKP4/main/anode.team_okp4_wasm.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.$FOLDER_WASM$/
sudo systemctl restart $BIN$ && journalctl -fu $BIN$ -o cat

SnapShot (2 times a day)

sudo systemctl stop $BIN$ && \
cp $HOME/.$FOLDER_CONF$/data/priv_validator_state.json $HOME/.$FOLDER_CONF$/priv_validator_state.json.backup && \
rm -rf $HOME/.$FOLDER_CONF$/data/
curl -o - -L https://anode.team/OKP4/main/anode.team_okp4.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.$FOLDER_CONF$
curl -o - -L https://anode.team/OKP4/main/anode.team_okp4_wasm.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.$FOLDER_WASM$/
mv $HOME/.$FOLDER_CONF$/priv_validator_state.json.backup $HOME/.$FOLDER_CONF$/data/priv_validator_state.json && \
sudo systemctl restart $BIN$ && journalctl -fu $BIN$ -o cat

Testnet service

Explorers

Sync

RPC & API

Peers and seeds

Genesis and addrbook

Wasm

Service script (Install, State-Sync, Snapshot, Delete)

wget -O OKP4.sh https://anode.team/OKP4/test/OKP4.sh && chmod u+x OKP4.sh && ./OKP4.sh

Installation

Software Requirements

  • Prerequisite: go1.18.5+ required. ref
  • Prerequisite: git. ref

Install last binary

git clone https://github.com/okp4/okp4d.git
cd okp4d
git checkout v5.0.0
make install

Init the config files

okp4d init <moniker> --chain-id okp4-nemeton-1
okp4d config chain-id okp4-nemeton-1

Create a wallet

okp4d keys add <wallet_name>

Download genesis and addrbook

curl https://anode.team/OKP4/test/genesis.json > ~/.okp4d/config/genesis.json
curl https://anode.team/OKP4/test/addrbook.json > ~/.okp4d/config/addrbook.json

Add peers, seed

SEEDS=""
PEERS="f595a1386d5ca2e0d2cd81d3c6372c3bf84bbd16@65.109.31.114:2280,a49302f8999e5a953ebae431c4dde93479e17155@162.19.71.91:26656,dc14197ed45e84ca3afb5428eb04ea3097894d69@88.99.143.105:26656,79d179ea2e1fbdcc0c59a95ab7f1a0c48438a693@65.108.106.131:26706,501ad80236a5ac0d37aafa934c6ec69554ce7205@89.149.218.20:26656,5fbddca54548bf125ee96bb388610fe1206f087f@51.159.66.123:26656,769f74d3bb149216d0ab771d7767bd39585bc027@185.196.21.99:26656,024a57c0bb6d868186b6f627773bf427ec441ab5@65.108.2.41:36656,fff0a8c202befd9459ff93783a0e7756da305fe3@38.242.150.63:16656,2bfd405e8f0f176428e2127f98b5ec53164ae1f0@142.132.149.118:26656,bf5802cfd8688e84ac9a8358a090e99b5b769047@135.181.176.109:53656,dc9a10f2589dd9cb37918ba561e6280a3ba81b76@54.244.24.231:26656,085cf43f463fe477e6198da0108b0ab08c70c8ab@65.108.75.237:6040,803422dc38606dd62017d433e4cbbd65edd6089d@51.15.143.254:26656,b8330b2cb0b6d6d8751341753386afce9472bac7@89.163.208.12:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.okp4d/config/config.toml

Add min gas

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uknow\"/" $HOME/.okp4d/config/app.toml

Create the service file

sudo tee /etc/systemd/system/okp4d.service > /dev/null <<EOF
[Unit]
Description=OKP4
After=network-online.target

[Service]
User=$USER
ExecStart=$(which okp4d) start
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

Load service and start

sudo systemctl daemon-reload && sudo systemctl enable okp4d
sudo systemctl restart okp4d && journalctl -fu okp4d -o cat

Create Validator

okp4d tx staking create-validator \
  --amount=1000000uknow \
  --pubkey=$(okp4d tendermint show-validator) \
  --moniker="<moniker>" \
  --identity="<identity>" \
  --website="<website>" \
  --details="<details>" \
  --security-contact="<contact>" \
  --chain-id="okp4-nemeton-1" \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="1" \
  --fees="0uknow" \
  --from=<wallet_name>

State-Sync

SNAP_RPC=https://okp4.rpc.t.anode.team:443 && \
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 100)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) && \
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
wget https://anode.team/unsafe-reset-all.sh && chmod u+x unsafe-reset-all.sh && ./unsafe-reset-all.sh okp4d okp4d
peers="ee4c5d9a8ac7401f996ef9c4d79b8abda9505400@144.76.97.251:12656"
sed -i.bak -e  "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.okp4d/config/config.toml
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.okp4d/config/config.toml
curl -o - -L https://anode.team/OKP4/test/anode.team_okp4_wasm.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.okp4d/
sudo systemctl restart okp4d && journalctl -fu okp4d -o cat

SnapShot (every 6 hours)

sudo systemctl stop okp4d && \
cp $HOME/.okp4d/data/priv_validator_state.json $HOME/.okp4d/priv_validator_state.json.backup && \
rm -rf $HOME/.okp4d/data/
curl -o - -L https://anode.team/OKP4/test/anode.team_okp4.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.okp4d
curl -o - -L https://anode.team/OKP4/test/anode.team_okp4_wasm.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.okp4d/
mv $HOME/.okp4d/priv_validator_state.json.backup $HOME/.okp4d/data/priv_validator_state.json && \
sudo systemctl restart okp4d && journalctl -fu okp4d -o cat