Guide
Here is a node installation guide (Simplified and manual)
Preparing the server for installation
sudo apt update && sudo apt upgrade -y && \
sudo apt install curl tar wget clang pkg-config libssl-dev libleveldb-dev jq build-essential bsdmainutils git make ncdu htop screen unzip bc fail2ban htop -y
Installing the latest version of Go
ver="1.22.0" && \
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 && \
go version
Build
cd $HOME
git clone https://github.com/althea-net/althea-chain
cd althea-chain || return
git checkout v0.5.5
make install
althea version # v0.5.5
Init your node
althea config chain-id althea_417834-3
althea init "<YOUR_MONIKER>" --chain-id althea_417834-3
Create or recover your WALLET_NAME
#NEW WALLET
althea keys add <WALLET_NAME>
#RECOVER OLD WALLET
althea keys add <WALLET_NAME> --recover
Download Genesis
curl -s https://raw.githubusercontent.com/althea-net/althea-L1-docs/main/testnet-4-genesis-collected.json > $HOME/.althea/config/genesis.json
Set up the minimum gas price and Peers/Seeds/Filter peers/MaxPeers
SEEDS=""
PEERS="bc47f3e8f9134a812462e793d8767ef7334c0119@chainripper-2.althea.net:23296"
sed -i 's|^seeds *=.*|seeds = "'$SEEDS'"|; s|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.althea/config/config.toml
sed -i 's|^pruning *=.*|pruning = "custom"|g' $HOME/.althea/config/app.toml
sed -i 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|g' $HOME/.althea/config/app.toml
sed -i 's|^pruning-interval *=.*|pruning-interval = "10"|g' $HOME/.althea/config/app.toml
sed -i 's|^snapshot-interval *=.*|snapshot-interval = 0|g' $HOME/.althea/config/app.toml
sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.0001aalthea"|g' $HOME/.althea/config/app.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.althea/config/config.toml
Download addrbook
wget -O $HOME/.althea/config/addrbook.json "https://raw.githubusercontent.com/nodersteam/cosmos-adrbook/main/althea/addrbook.json"
Create a service file
sudo tee /etc/systemd/system/althead.service > /dev/null << EOF
[Unit]
Description=Althea Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which althea) start
Restart=on-failure
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target
EOF
Use our StateSync
sudo systemctl stop althead
SNAP_RPC=http://althea.rpc.nodersteam.com:19657
cp $HOME/.althea/data/priv_validator_state.json $HOME/.althea/priv_validator_state.json.backup
sed -i -e "/seeds =/ s/= .*/= \"$SEEDS\"/" $HOME/.althea/config/config.toml
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 100)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.althea/config/config.toml
Start your node
sudo systemctl daemon-reload
sudo systemctl enable althead
sudo systemctl start althead
sudo journalctl -u althead -f --no-hostname -o cat
You can get tokens for running the validator in the project's discord
Wait for full synchronization and create a validator
althea tx staking create-validator \
--amount=1000000ualthea \
--pubkey=$(althea tendermint show-validator) \
--moniker="<YOUR_MONIKER>" \
--chain-id=althea_417834-3 \
--commission-rate=0.1 \
--commission-max-rate=0.2 \
--commission-max-change-rate=0.05 \
--min-self-delegation=1 \
--fees=2000ualthea \
--from=<WALLET_NAME> \
-y
If you want to delete a node
sudo systemctl stop althead
sudo systemctl disable althead
rm /etc/systemd/system/althead.service
sudo systemctl daemon-reload
cd $HOME
rm -rf althea
rm -rf .althea
rm -rf $(which althead)
Last updated