> For the complete documentation index, see [llms.txt](https://docs.validator247.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validator247.com/testnet/hedge.md).

# Hedge

**Public Endpoints**

> API [https://hedge-api.validator247.com](https://hedge-api.validator247.com/)
>
> RPC [https://hedge-rpc.validator247.com](https://hedge-rpc.validator247.com/)

Explorer&#x20;

> <https://explorer.validator247.com/Hedge-Testnet/staking>

## Install validator

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'
```

## Create wallet & Validator

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"
```

## Upgrade reset Chain

[    https://genznodes.dev/resources/snapshot/testnet-hedgeblock](<    https://genznodes.dev/resources/snapshot/testnet-hedgeblock>)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.validator247.com/testnet/hedge.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
