Hedge Block
Run the node usung docker or systemd
Chain ID: berberis-1
Recommended Hardware Requirements
SPEC | Recommend | Minimum |
---|---|---|
CPU | 8 Cores | 4 Cores |
RAM | 32 GB | 16 GB |
SSD | 200 GB | 200 GB |
NETWORK | 100 Mbps | 100 Mbps |
OS | Ubuntu 22.04 | |
Port | 10256 |
- 🖼️ Docker
- 🖼️ Cosmovisor (Recommend)
- 🖼️ Command
Update and install packages for compiling
cd $HOME && source <(curl -s https://raw.githubusercontent.com/vnbnode/binaries/main/docker-install.sh)
Build binary
cd $HOME
mkdir hedge
curl -Ls https://raw.githubusercontent.com/vnbnode/binaries/main/Projects/Hedge/.env > $HOME/hedge/.env
Setup Node
docker run -d -p 24090:24090 -p 207:207 -p 206:206 -p 24017:24017 -v $HOME/hedge:/root/hedge --env-file $HOME/hedge/.env --name hedge hedgeblock/berberis:v0.1
Configure
docker stop hedge
sed -i -e "s|^seeds *=.*|seeds = \"86c1be378070c100aa614e47c6abe4978d91f4d7@rpc-t.hedge.nodestake.org:666\"|" $HOME/hedge/berberis-1/config/config.toml
sed -i -e 's|^persistent_peers *=.*|persistent_peers ="[email protected]:11856,[email protected]:14656,[email protected]:55656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:11856,[email protected]:26656,[email protected]:26656"|' $HOME/hedge/berberis-1/config/config.toml
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.025uhedge\"|" $HOME/hedge/berberis-1/config/app.toml
Pruning Setting
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
$HOME/hedge/berberis-1/config/app.toml
Custom Port
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://0.0.0.0:26658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:26657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:24060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:26656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":24066\"%" $HOME/hedge/berberis-1/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:24017\"%; s%^address = \":8080\"%address = \":24080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:24090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:24091\"%; s%:8545%:24045%; s%:8546%:24046%; s%:6065%:24065%" $HOME/hedge/berberis-1/config/app.toml
Snapshot
cp $HOME/hedge/berberis-1/data/priv_validator_state.json $HOME/hedge/priv_validator_state.json.backup
rm -rf $HOME/hedge/berberis-1/data
curl -L https://snap.nodex.one/hedge-testnet/hedge-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/hedge/berberis-1
mv $HOME/hedge/priv_validator_state.json.backup $HOME/hedge/berberis-1/data/priv_validator_state.json
Start Node
docker restart hedge
docker logs -f hedge
Backup Node
mkdir -p $HOME/backup/hedge
cp $HOME/hedge/berberis-1/config/priv_validator_key.json $HOME/backup/hedge
Remove Node
docker stop hedge
docker rm hedge
rm -rf $HOME/hedge
Update and install packages for compiling
cd $HOME && source <(curl -s https://raw.githubusercontent.com/vnbnode/binaries/main/update-binary.sh)
Build binary
cd $HOME
wget -O hedged https://github.com/hedgeblock/testnets/releases/download/v0.1.0/hedged_linux_amd64_v0.1.0
sudo chmod +x hedged
sudo wget -O /usr/lib/libwasmvm.x86_64.so https://github.com/CosmWasm/wasmvm/releases/download/v1.3.0/libwasmvm.x86_64.so
mkdir -p $HOME/.hedge/cosmovisor/genesis/bin
cp hedged $HOME/.hedge/cosmovisor/genesis/bin/
sudo ln -s $HOME/.hedge/cosmovisor/genesis $HOME/.hedge/cosmovisor/current -f
sudo ln -s $HOME/.hedge/cosmovisor/current/bin/hedged /usr/local/bin/hedged -f
Cosmovisor Setup
go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]
sudo tee /etc/systemd/system/hedge.service > /dev/null << EOF
[Unit]
Description=hedge node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.hedge"
Environment="DAEMON_NAME=hedged"
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:$HOME/.hedge/cosmovisor/current/bin"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable hedge
Initialize Node
Replace Name
with your own moniker
MONIKER="Name-VNBnode"
hedged config chain-id berberis-1
hedged config keyring-backend test
hedged init $MONIKER --chain-id berberis-1
Download Genesis & Addrbook
curl -Ls https://snap.nodex.one/hedge-testnet/genesis.json > $HOME/.hedge/config/genesis.json
curl -Ls https://snap.nodex.one/hedge-testnet/addrbook.json > $HOME/.hedge/config/addrbook.json
Configure
sed -i -e "s|^seeds *=.*|seeds = \"[email protected]:24010\"|" $HOME/.hedge/config/config.toml
peers=$(curl -s https://raw.githubusercontent.com/vnbnode/binaries/main/Projects/Hedge/peers.txt)
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.hedge/config//config.toml
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.025uhedge\"|" $HOME/.hedge/config/app.toml
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
$HOME/.hedge/config/app.toml
Custom Port
echo 'export hedge="102"' >> ~/.bash_profile
source $HOME/.bash_profile
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://0.0.0.0:${hedge}58\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:${hedge}57\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${hedge}60\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${hedge}56\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${hedge}60\"%" $HOME/.hedge/config/config.toml
sed -i -e "s%^address = \"tcp://localhost:1317\"%address = \"tcp://0.0.0.0:${hedge}17\"%; s%^address = \":8080\"%address = \":${hedge}80\"%; s%^address = \"localhost:9090\"%address = \"0.0.0.0:${hedge}90\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${hedge}91\"%; s%:8545%:${hedge}45%; s%:8546%:${hedge}46%; s%:6065%:${hedge}65%" $HOME/.hedge/config/config.toml
hedged config node tcp://localhost:${hedge}57
Snapshot
cp $HOME/.hedge/data/priv_validator_state.json $HOME/.hedge/priv_validator_state.json.backup
rm -rf $HOME/.hedge/data
curl -L https://snap.nodex.one/hedge-testnet/hedge-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.hedge
mv $HOME/.hedge/priv_validator_state.json.backup $HOME/.hedge/data/priv_validator_state.json
Start Node
sudo systemctl start hedge
journalctl -u hedge -f
Backup Node
mkdir -p $HOME/backup/hedge
cp $HOME/.hedge/config/priv_validator_key.json $HOME/backup/hedge
Remove Node
cd $HOME
sudo systemctl stop hedge
sudo systemctl disable hedge
sudo rm /etc/systemd/system/hedge.service
sudo systemctl daemon-reload
sudo rm -f $(which hedge)
sudo rm -rf $HOME/.hedge
Managing keys
Generate new key
hedged keys add wallet
Recover key
hedged keys add wallet --recover
List all key
hedged keys list
Query wallet balances
hedged q bank balances $(hedged keys show wallet -a)
Managing validators
Create validator
hedged tx staking create-validator \
--amount=1000000uhedge \
--commission-max-change-rate 0.01 \
--commission-max-rate 0.1 \
--commission-rate 0.1 \
--from wallet \
--min-self-delegation 1 \
--moniker $MONIKER \
--security-contact "" \
--identity "06F5F34BD54AA6C7" \
--website "https://vnbnode.com" \
--details "VNBnode is a group of professional validators / researchers in blockchain" \
--pubkey $(hedged tendermint show-validator) \
--chain-id=berberis-1 \
--gas-prices="0.025uhedge" \
-y
Edit validator
hedged tx staking edit-validator \
--new-moniker "NewName-VNBnode" \
--identity "06F5F34BD54AA6C7" \
--website "https://vnbnode.com" \
--details "VNBnode is a group of professional validators / researchers in blockchain" \
--security-contact "" \
--commission-rate 0.05 \
--from wallet \
--gas-adjustment 1.4 \
--chain-id=berberis-1 \
--gas-prices 0.025uhedge \
-y
Unjail
hedged tx slashing unjail --from wallet --gas-prices 0.025uhedge --chain-id=berberis-1 -y
View validator details
hedged keys show wallet --bech val -a
Query active validators
hedged q staking validators -o json --limit=1000 \
| jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' \
| jq -r '.tokens + " - " + .description.moniker' \
| sort -gr | nl
Query inactive validators
hedged q staking validators -o json --limit=1000 \
| jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' \
| jq -r '.tokens + " - " + .description.moniker' \
| sort -gr | nl
Managing Tokens
Delegate tokens to your validator
hedged tx staking delegate $(hedged keys show wallet --bech val -a) 1000000stake --from wallet --gas-prices 0.025uhedge --chain-id=berberis-1 -y
Send token
hedged tx bank send <WALLET> <TO_WALLET> <AMOUNT>uhedge --gas-prices 0.025uhedge --chain-id=berberis-1 -y
Withdraw reward from all validator
hedged tx distribution withdraw-all-rewards --from wallet --gas-prices 0.025uhedge --chain-id=berberis-1 -y
Withdraw reward and commission
hedged tx distribution withdraw-rewards $(hedged keys show wallet --bech val -a) --commission --from wallet --gas-prices 0.025uhedge --chain-id=berberis-1 -y
Redelegate to another validator
hedged tx staking redelegate $(hedged keys show wallet --bech val -a) <to-valoper-address> 1000000stake --from wallet --gas-prices 0.025uhedge --chain-id=berberis-1 -y
Governance
Query list proposal
hedged query gov proposals
View proposal by ID
hedged query gov proposal 1
Vote yes
hedged tx gov vote 1 yes --from wallet --gas-prices 0.025uhedge -y
Vote No
hedged tx gov vote 1 no --from wallet --gas-prices 0.025uhedge -y
Vote option asbtain
hedged tx gov vote 1 abstain --from wallet --gas-prices 0.025uhedge -y
Vote option NoWithVeto
hedged tx gov vote 1 NoWithVeto --from wallet --gas-prices 0.025uhedge -y
Maintenance
Check sync
hedged status 2>&1 | jq .SyncInfo
Node status
hedged status | jq
Get validator information
hedged status 2>&1 | jq .ValidatorInfo
Get your p2p peer address
echo $(hedged tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.hedge/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Get peers live
curl -sS http://localhost:${hedge}57/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'