Node Installation
Hardware requirements The following requirements are recommended for running HEDGE:
4 or more physical CPU cores
At least 1TB of SSD disk storage
At least 8GB of memory (RAM)
At least 100mbps network bandwidth
Manual Installation
# Update & install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install clang pkg-config libssl-dev curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
# Install Go
cd $HOME
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.21.4.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
go version
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export HEDGE_CHAIN_ID="berberis-1"" >> $HOME/.bash_profile
echo "export HEDGE_PORT="34"" >> $HOME/.bash_profile
source $HOME/.bash_profile
# Download 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
mv $HOME/hedged $HOME/go/bin
# Config and Init App
hedged config node tcp://localhost:${HEDGE_PORT}657
hedged config keyring-backend test
hedged config chain-id $HEDGE_CHAIN_ID
hedged init $MONIKER --chain-id $HEDGE_CHAIN_ID
# Add Genesis File and Addrbook
wget -O $HOME/.hedge/config/genesis.json https://testnet-files.syanodes.my.id/hedge-genesis.json
wget -O $HOME/.hedge/config/addrbook.json https://testnet-files.syanodes.my.id/hedge-addrbook.json
#Configure Seeds and Peers
SEEDS=""
PEERS="[email protected]:26656,[email protected]:38656,[email protected]:26656,[email protected]:11656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:33656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:46656,[email protected]:38656,[email protected]:26656,[email protected]:26656,[email protected]:64656,[email protected]:14256,[email protected]:26656,[email protected]:14256,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26856,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:24056,[email protected]:11856,[email protected]:26656,[email protected]:5656,[email protected]:26656,[email protected]:11856,[email protected]:26656,[email protected]:12656,[email protected]:11856,[email protected]:24056,[email protected]:26656,[email protected]:26656,[email protected]:11856,[email protected]:26656,[email protected]:11856,[email protected]:12656,[email protected]:29656,[email protected]:26656,[email protected]:34656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:12656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:11856,[email protected]:11856,[email protected]:26656,[email protected]:24056,[email protected]:11856,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:14656,[email protected]:11856,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:16656,[email protected]:26656,[email protected]:26656,[email protected]:24056,[email protected]:27656,[email protected]:26656,[email protected]:26656,[email protected]:24056,[email protected]:24056,[email protected]:26656,[email protected]:11856,[email protected]:36656,[email protected]:27656,[email protected]:26556,[email protected]:36656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26556,[email protected]:26656,[email protected]:11856,[email protected]:26656,[email protected]:21656,[email protected]:11856,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26556,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:12656,[email protected]:26656,[email protected]:26656,[email protected]:11856,[email protected]:27656,[email protected]:12656,[email protected]:26556,[email protected]:11456,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:12656,[email protected]:26656,[email protected]:11856,[email protected]:26656,[email protected]:26656,[email protected]:27656,[email protected]:2656,[email protected]:26656,[email protected]:35656,[email protected]:26556,[email protected]:11856,[email protected]:26650,[email protected]:26656,[email protected]:26556"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.hedge/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uhedge\"/" $HOME/.hedge/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.hedge/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.hedge/config/config.toml
# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
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
# Set Custom Port
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
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
# Set Service File
sudo tee /etc/systemd/system/hedged.service > /dev/null <<EOF
[Unit]
Description=hedge-testnet
After=network-online.target
[Service]
User=$USER
ExecStart=$(which hedged) start --home $HOME/.hedge
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable hedged
sudo systemctl start hedged
sudo journalctl -fu hedged -o cat
Last updated