Hedge
Hedge is a pioneering blockchain network built with state-of-the-art M-sig transaction protocols to make your on-chain transactions faster and more reliable.
Last updated
Hedge is a pioneering blockchain network built with state-of-the-art M-sig transaction protocols to make your on-chain transactions faster and more reliable.
Last updated
Public Endpoints
API
RPC
Explorer
Update && Upgrade:
sudo apt update && sudo apt upgrade -y
Install package
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make lz4 unzip ncdu -y
Install Go
ver="1.21.5"
cd $HOME
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" >> $HOME/.bash_profile
source $HOME/.bash_profile
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 /go/bin
set -eux; \wget -O /lib/libwasmvm.x86_64.so https://github.com/CosmWasm/wasmvm/releases/download/v1.3.0/libwasmvm.x86_64.so
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 "wget https://raw.githubusercontent.com/Validator247/Hedge-install/main/genesis.json"
sudo wget -O $HOME/.hedge/config/addrbook.json "wget https://raw.githubusercontent.com/Validator247/Hedge-install/main/addrbook.json"
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.025uhedge\"/;" ~/.hedge/config/app.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.hedge/config/config.toml
peers=""
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.hedge/config/config.toml
seeds="7879005ab63c009743f4d8d220abd05b64cfee3d@54.92.167.150:26656"
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
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
Port
HEDGE_PORT="11"
# set custom ports in app.toml
sed -i.bak -e "s%:1317%:${HEDGE_PORT}317%g;
s%:8080%:${HEDGE_PORT}080%g;
s%:9090%:${HEDGE_PORT}090%g;
s%:9091%:${HEDGE_PORT}091%g;
s%:8545%:${HEDGE_PORT}545%g;
s%:8546%:${HEDGE_PORT}546%g;
s%:6065%:${HEDGE_PORT}065%g" $HOME/.hedge/config/app.toml
# set custom ports in config.toml file
sed -i.bak -e "s%:26658%:${HEDGE_PORT}658%g;
s%:26657%:${HEDGE_PORT}657%g;
s%:6060%:${HEDGE_PORT}060%g;
s%:26656%:${HEDGE_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${HEDGE_PORT}656\"%;
s%:26660%:${HEDGE_PORT}660%g" $HOME/.hedge/config/config.toml
Create 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
Check Logs
sudo systemctl start hedged && journalctl -u hedged -f -o cat
Check Syn
hedged status 2>&1 | jq -r '.SyncInfo.catching_up // .sync_info.catching_up'
Add New Key
hedged keys add wallet
Recover Existing Key
hedged keys add wallet --recover
Create Validator
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 "Your_Nodename" \
--identity "Your_Keybase" \
--details "Your_Details" \
--website "Your_Website" \
--security-contact "Your_Email" \
--gas-prices="0.025uhedge" \
--gas="auto" \
--gas-adjustment="1.5" \
--from "wallet"