<aside> <img src="https://prod-files-secure.s3.us-west-2.amazonaws.com/6f767d5e-c4ca-4e4e-a39d-7baa69ca6f6c/3851848c-af40-42ea-9b4c-7f6194f4a94b/Screenshot_9.png" alt="https://prod-files-secure.s3.us-west-2.amazonaws.com/6f767d5e-c4ca-4e4e-a39d-7baa69ca6f6c/3851848c-af40-42ea-9b4c-7f6194f4a94b/Screenshot_9.png" width="40px" /> Warden Protocol

https://warden-explorer.paranorm.pro/warden/staking/wardenvaloper13e0e4kx74fq9q0ejlrcr4caq3ld80t8ch0339q

</aside>

Prerequisites

Setup Instructions

1. Update System and Install Dependencies

Open a terminal and run the following commands:

sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y

2. Install Go

Remove any existing Go installation and install Go 1.20.5:

rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl <https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz> | sudo tar -C /usr/local -zxvf -
echo 'export GOROOT=/usr/local/go' >> $HOME/.profile
echo 'export GOPATH=$HOME/go' >> $HOME/.profile
echo 'export GO111MODULE=on' >> $HOME/.profile
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.profile
source $HOME/.profile
go version

3. Clone and Build the Warden Protocol Repository

git clone --depth 1 --branch v0.1.0 <https://github.com/warden-protocol/wardenprotocol/>
cd wardenprotocol/warden/cmd/wardend
go build
sudo mv wardend /usr/local/bin/

4. Initialize the Node

wardend init <custom_moniker>

5. Configure Genesis and Network Settings

Navigate to the configuration directory and download the genesis file:

cd $HOME/.warden/config
rm genesis.json
wget <https://raw.githubusercontent.com/warden-protocol/networks/main/testnet-alfama/genesis.json>

# Set minimum gas price & peers
sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.0025uward"/' app.toml
sed -i 's/persistent_peers = ""/persistent_peers = "peer1@ip1:port1,peer2@ip2:port2"/' config.toml

6. Setup State Sync (Optional but Recommended)

export SNAP_RPC_SERVERS="<https://rpc.sentry-1.alfama.wardenprotocol.org:443>,<https://rpc.sentry-2.alfama.wardenprotocol.org:443>,<https://rpc.sentry-3.alfama.wardenprotocol.org:443>"
export LATEST_HEIGHT=$(curl -s "<https://rpc.alfama.wardenprotocol.org/block>" | jq -r .result.block.header.height)
export BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000))
export TRUST_HASH=$(curl -s "<https://rpc.alfama.wardenprotocol.org/block?height=$BLOCK_HEIGHT>" | jq -r .result.block_id.hash)

# Check the variables
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

# Configure state sync in config.toml
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\\\\1true| ; \\\\
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\\\\1\\\\"$SNAP_RPC_SERVERS\\\\"| ; \\\\
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\\\\1$BLOCK_HEIGHT| ; \\\\
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\\\\1\\\\"$TRUST_HASH\\\\"|" $HOME/.warden/config/config.toml

7. Start the Node