☑️Hedge-Tesnet
Recommended Hardware: 8 Cores, 64GB RAM, 500GB of storage (NVME)
Installation
Install dependencies, if needed
sudo apt update && sudo apt upgrade -y
sudo apt install curl git jq build-essential gcc unzip wget lz4 -y
sudo apt-get install wget liblz4-tool aria2 -y
Install go, if needed
cd $HOME && \
ver="1.22.0" && \
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" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \
source ~/.bash_profile && \
go version
Dowload ibwasmvm.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
Dowload Hedged
mkdir -p $HOME/go/bin
sudo wget -O hedged https://github.com/hedgeblock/testnets/releases/download/v0.1.0/hedged_linux_amd64_v0.1.0
chmod +x hedged
sudo mv hedged $HOME/go/bin
Config Node
hedged config chain-id berberis-1
hedged config keyring-backend test
hedged init "Moniker" --chain-id berberis-1
sudo wget -O $HOME/.hedge/config/genesis.json "https://raw.githubusercontent.com/dongqn/GuideNode/main/Hedge/genesis.json"
sudo wget -O $HOME/.hedge/config/addrbook.json "https://raw.githubusercontent.com/dongqn/GuideNode/main/Hedge/addrbook.json"
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.025uhedge\"/;" ~/.hedge/config/app.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.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.hedge/config/config.toml
seeds="7879005ab63c009743f4d8d220abd05b64cfee3d@54.92.167.150:26656,b52d56d1d6b653be8e5215b85846fe65ee55af19@testnet-seeds.genznodes.dev:2656"
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.hedge/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 50/g' $HOME/.hedge/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 50/g' $HOME/.hedge/config/config.toml
sed -i "s/^indexer *=.*/indexer = \"null\"/" $HOME/.hedge/config/config.toml
Pruning and indexer
pruning="custom" && \
pruning_keep_recent="100" && \
pruning_keep_every="0" && \
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-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.hedge/config/app.toml && \
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.hedge/config/app.toml
Create hedged service for your node to run in the background
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
Start node
sudo systemctl daemon-reload && \
sudo systemctl enable hedged && \
sudo systemctl restart hedged && \
sudo journalctl -u hedged -f -o cat
Check for your syncing progress
hedged status 2>&1 | jq
Create wallet
hedged keys add wallet
# DO NO FORGET TO SAVE THE SEED PHRASE & YOUR PASSPHRASE YOU SET FOR THIS WALLET
# You can add --recover flag to restore existing key instead of creating
Check Balance
hedged q bank balances $(hedged keys show wallet -a)
Create validator
hedged tx staking create-validator \
--amount=1000000uhedge \
--pubkey=$(hedged tendermint show-validator) \
--moniker="Moniker" \
--chain-id=berberis-1 \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.1 \
--min-self-delegation=1 --from=wallet \
--gas-prices=0.025uhedge \
--gas-adjustment=1.5 \
--gas=auto \
-y
Delegate to your self
hedged tx staking delegate $(hedged keys show wallet --bech val -a) 1000000uhedge --from wallet --chain-id berberis-1 --gas-prices=0.025uhedge --gas-adjustment=1.5 --gas=auto -y
Unjail
hedged tx slashing unjail --from wallet --chain-id=berberis-1 --gas-prices=0.025uhedge --gas-adjustment=1.5 --gas=auto -y
Get Validator Info
hedged status 2>&1 | jq -r '.ValidatorInfo // .validator_info'
Node Snapshot Testnet Hedgeblock
Install requirement if don't have:
sudo apt install lz4 -y
Stop node
sudo systemctl stop hedged
Back up priv_validator_state.json
cp $HOME/.hedge/data/priv_validator_state.json $HOME/.hedge/priv_validator_state.json.bak
Reset chain data
hedged tendermint unsafe-reset-all --home $HOME/.hedge --keep-addr-book
Download Snapshot Data
aria2c -x 16 -s 16 https://snapshot-de-1.genznodes.dev/hedgeblock/hedge-testnet-2422536.tar.lz4
lz4 -c -d hedge-testnet-2422536.tar.lz4 | tar -x -C $HOME/.hedge/
Validator node move priv_validator_state.json that was backed up earlier
mv $HOME/.hedge/priv_validator_state.json.bak $HOME/.hedge/data/priv_validator_state.json
Restart node
sudo systemctl restart hedged
journalctl -fu hedged -o cat
Congratulation!!
Now you have completed your node for 0gchain and we will move on to creating your storage node next.
Last updated