πŸ”ŒInstallation

πŸ’» Hardware Requirements

ComponentsMinimum Requirements

CPU

4

RAM

8+ 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.21.3"
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

sudo wget -O hedged https://github.com/hedgeblock/testnets/releases/download/v0.1.0/hedged_linux_amd64_v0.1.0
chmod +x hedged
mkdir -p $HOME/go/bin
sudo mv hedged $HOME/go/bin
rm -rf /usr/lib/libwasmvm.x86_64.so
set -eux; \
  wget -O /lib/libwasmvm.x86_64.so https://github.com/CosmWasm/wasmvm/releases/download/v1.3.0/libwasmvm.x86_64.so

➑️ Initialize the node

hedged config chain-id berberis-1
hedged config keyring-backend test
hedged init "" --chain-id berberis-1

➑️ Genesis addrbook

sudo wget -O $HOME/.hedge/config/genesis.json "https://rpc-hedge-testnet.trusted-point.com/genesis.json"
sudo wget -O $HOME/.hedge/config/addrbook.json "https://rpc-hedge-testnet.trusted-point.com/addrbook.json"

➑️ Gas Settings

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.025uhedge\"/;" ~/.hedge/config/app.toml

➑️ Peers and Seeds

SEEDS="b52d56d1d6b653be8e5215b85846fe65ee55af19@testnet-seeds.genznodes.dev:2656"
sed -i.bak -e "s/^seeds =.*/seeds = \"$SEEDS\"/" $HOME/.hedge/config/config.toml
PEERS="456e1905d54e91069fad178738bffdd77f6c4c61@95.217.230.235:11856,78f06f08f53204c06cb9f977564178a6524c4919@65.109.83.40:26856,24e2ba947d2692dead86f5c03b4741d69db08c1b@65.109.93.124:26856,3f4bc2cef7a8817eb2e66dcb292e57f9c4162c17@84.247.189.94:11856,37009116ccd9c207afe4de6dcc69adfd9c9bee2b@142.132.161.179:26656,5cbd9c8f1d6a989caf0e20854e8f871014b6da34@159.69.36.113:26656,ea67e3171934755c36a591fced601956c9e9b741@77.237.243.100:26656,b52d56d1d6b653be8e5215b85846fe65ee55af19@89.58.36.209:2656,e17e1afbd58c6262c6d6a8c991b4a1e570d6c1c4@84.247.128.239:26656,02b883a7ab541c37949fd72ad51fd40809f03123@46.101.149.208:26656,2129f6296413e134d94c5a0b98905cc4108860f8@194.5.157.3:26656,a6d4b9dabb8428e0eaefe61619258f3a97001824@213.199.61.251:26656,02b58ec274d0eb9d7d9a4e6b6dfdcd310a0046cb@217.196.49.36:26656,268da5b10276ea13c4d839fe387249428b407f3d@148.113.8.196:24056,bc64e8794465dd46399bf6f49a564098e09b0843@164.92.96.212:26656,b2a0bfb93d98e62802ec21eac60eaf11f17354d8@89.117.145.86:11856,289626099b5ee210bbb5b4141697c98f726b2293@207.180.196.56:26656,f5d973568fec14272c8b3ced0cb74277ff5866fa@62.171.131.124:26656,153f0d20405f7343b7b0c93cbed8c3957379416f@57.128.63.126:26656,2c6ae886df41b08b6361de953ad44c6f574afb05@51.178.92.69:12656,70f7dc74d3b6afa12b988d61707229e8e191d9a2@213.246.45.16:55656,0c9fa03479edf7093241305be1f6b5a361039c28@45.85.147.82:11856,1a6b131e0cfb2055dcf69a4dff13ecd1ba139ff5@118.70.184.87:12656,880ba25ffe4410ef8606562106d871fae996311a@94.72.100.234:34656,60bc3ebe21a75cf5c189944f5185b0585698e929@81.17.98.161:26656,b5d5226ac957b8b384644e0aa2736be4b40f806c@46.38.232.86:14656,1967e0c2e99401c49fbed2c7f1aa224a675e09a2@142.132.156.99:31056,eb4a3c7cd6baa8d249d8f8300004f9eb85bb13c7@158.220.108.184:12656,7879005ab63c009743f4d8d220abd05b64cfee3d@54.92.167.150:26656,d8651a9562d693baa0eb9190df2982e7096fac63@5.189.157.127:26656,6710c70956dd763160a2cacb932fb135dcb1de86@152.53.46.144:12656,688f0b64793e675c15a59d7d7ac3eb649f86e978@173.249.57.190:26656,d6875c002ff3dacacbb1c971169f1e2c1193119b@65.109.139.2:26656,0b7dbbbf7ae007daafe3c49c142fce5dcc9a1c55@94.72.125.122:26656,54f0c004ee99ee82c6c2c54595ee4f2aa7572b53@116.203.18.135:26656,2e6c06a968b25454940903945003aac08ab0632e@135.181.105.5:26656,c363b364f61ff8d4a2e063e0223bdfcb8c4d0831@213.199.48.49:27656,7292af244f9c87937a01d8e5bcd090449d4404f0@62.171.176.118:11856,93165d63303c5632b060a8dcfc8a440fd001c0c8@103.156.0.148:26656,0bb66c6dcbf5122bde07b3a6b7301b48b9b350e1@194.163.190.35:11856,1d27fbe4d26e60a67d1b4b9062089894d127503b@149.102.159.7:26656,bb866adfd1c6330da67da1ae2abed9a8b859dfe2@75.119.137.169:26656,2b7036066115632bcb6f775bab516266fb0b4234@103.37.60.202:26656,e611f55f2b2e76a95ffee427cc8375737c2f4073@158.220.103.29:26656,d7a743ecacaadf9be29d3da733d5c90cff7cf3f5@154.12.227.137:26656,820a9d47ccfbab46b0fe71a86a4ad048ed8894da@184.174.38.118:11856,797b8b0dbb9ae4b5c5f07d10a254ab0160c90a4b@23.88.53.64:26656,eab329a812987efda7b6b015b06554390194634f@109.205.178.231:27656,35b4dc6f1f4d4da6f293cd79b34fd0e21367a08f@37.60.227.6:11856,78ee8c630e42c5699a5e30a5c285252cb2ba29e1@37.27.36.74:26656,11f718501c4b90881e867a7d3a10c381a361df51@195.26.240.132:26656,1b4ccd39bfaf92b03c8fa9ef333cb74552d43a9c@65.109.39.80:11856,c18568e8ca345d5617153afc54b32af500282bd9@77.237.240.208:26556,c7c80f0f5b6dfe4837abd6a7eab4c8342e5c2a95@65.109.115.56:11856,e634bbdc8a1fee53b9c2abc779c653c21adb7496@168.119.10.134:26995,9878d322ad5f18696a92a620b3451426134f46e6@62.169.25.68:11856,8372a1ebdf8a82fb238ca0213a83f656918e9612@171.252.20.45:26656,d8691cfda61f947f18b2f5a040905292291aa060@27.79.182.194:26650,e79199d42b86cf5a231d7a0efa5f22b28e7b7026@165.22.84.5:26656,f87f88dd82f5a7166845c379384e4c7a7fb45995@27.79.160.157:12656,da60b9e1d8f8618307de3ef0d9a61eac6bf7d634@45.144.29.157:26656,a695d84fb638b78eecfe3fd3a05c3d94dad2b901@173.212.203.50:11656,903a6a6275d3bfcbc9e1890a20ca7346b83c8dc8@195.26.246.50:44456"
sed -i -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.hedge/config/config.toml

➑️ Peers Settings

sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 40/g' $HOME/.hedge/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 10/g' $HOME/.hedge/config/config.toml

➑️ Pruning

pruning="custom" && \
pruning_keep_recent="100" && \
pruning_interval="10" && \
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.hedge/config/app.toml && \
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.hedge/config/app.toml && \
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.hedge/config/app.toml

➑️ Indexer

sed -i "s/^indexer *=.*/indexer = \"null\"/" $HOME/.hedge/config/config.toml

➑️ Create a service

sudo tee /etc/systemd/system/hedged.service > /dev/null <<EOF
[Unit]
Description=Hedged Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which hedged) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable hedged

➑️ Snap

hedged tendermint unsafe-reset-all --home $HOME/.hedge
if curl -s --head curl https://rpc-hedge-testnet.trusted-point.com/latest_snapshot.tar.lz4  | head -n 1 | grep "200" > /dev/null; then
  curl https://rpc-hedge-testnet.trusted-point.com/latest_snapshot.tar.lz4  | lz4 -dc - | tar -xf - -C $HOME/.hedge
    else
  echo no have snap
fi

➑️ Port

You can replace 118 with anything you want.

CUSTOM_PORT=118
sed -i.bak -e "s%tcp://0.0.0.0:1317%tcp://0.0.0.0:${CUSTOM_PORT}17%g;
s%:8080%:${CUSTOM_PORT}80%g;
s%localhost:9090%0.0.0.0:${CUSTOM_PORT}90%g;
s%0.0.0.0:9091%0.0.0.0:${CUSTOM_PORT}91%g;
s%:8545%:${CUSTOM_PORT}45%g;
s%:8546%:${CUSTOM_PORT}46%g;
s%:6065%:${CUSTOM_PORT}65%g" /root/.hedge/config/app.toml
sed -i.bak -e "s%tcp://127.0.0.1:26658%tcp://127.0.0.1:${CUSTOM_PORT}58%g;
s%tcp://127.0.0.1:26657%tcp://127.0.0.1:${CUSTOM_PORT}57%g;
s%localhost:6060%localhost:${CUSTOM_PORT}60%g;
s%tcp://0.0.0.0:26656%tcp://0.0.0.0:${CUSTOM_PORT}56%g;
s%:26660%:${CUSTOM_PORT}66%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${CUSTOM_PORT}56\"%;
s%:6060%:${CUSTOM_PORT}60%g" /root/.hedge/config/config.toml

➑️ Let's get started

sudo systemctl restart hedged

➑️ Create wallet

hedged keys add 

don't forget to backup the wallet words!

➑️ Faucet

➑️ Create Validator

Reminder: You can't create a validator without Sync. You must have to catch the latest block.

cd $HOME
hedged tx staking create-validator \
--amount 1000000uhedge \
--pubkey $(hedged tendermint show-validator) \
--chain-id berberis-1 \
--min-self-delegation 1 \
--commission-max-change-rate 0.01 \
--commission-max-rate 0.2 \
--commission-rate 0.05 \
--moniker "" \
--identity "" \
--details "" \
--website "" \
--security-contact "" \
--from " " \
--node http://localhost:57 \
--fees 5000uhedge \
-y

➑️ Edit Validator

hedged tx staking edit-validator \
--chain-id berberis-1 \
--commission-rate 0.05 \
--new-moniker "" \
--identity "" \
--details "" \
--website "" \
--security-contact "" \
--from "" \
--node http://localhost:57 \
--fees 5000uhedge \
-y

➑️ Delegation

hedged tx staking delegate $(hedged keys show  --bech val -a) 000000uhedge --from  --chain-id berberis-1 --gas-prices=0.025uhedge --gas-adjustment=1.5 --gas=auto --node http://localhost:57 -y

➑️ Complete deletion

cd $HOME
sudo systemctl stop hedged
sudo systemctl disable hedged
sudo rm -rf /etc/systemd/system/hedged.service
sudo systemctl daemon-reload
sudo rm -f /usr/local/bin/hedged
sudo rm -f $(which hedge)
sudo rm -rf $HOME/.hedge
sed -i "/HEDGE_/d" $HOME/.bash_profile

➑️ Block check

local_height=$(curl -s localhost:57/status | jq -r .result.sync_info.latest_block_height); network_height=$(curl -s https://hedge-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.

Last updated