sudo apt update && \
sudo apt install curl git jq build-essential gcc unzip wget lz4 -y
cd $HOME && \
ver="1.22.0" && \
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
cd $HOME && mkdir $HOME/go/bin/
git clone https://github.com/AltheaFoundation/althea-L1/
git checkout v1.4.0
make install
# Set node configuration
althea config chain-id althea_258432-1
althea config keyring-backend file
althea init $yourMONIKER --chain-id althea_258432-1
wget -O $HOME/.althea/config/genesis.json "https://raw.githubusercontent.com/AltheaFoundation/althea-L1-docs/main/althea-l1-mainnet-genesis.json"
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.004aalthea\"|" $HOME/.althea/config/app.toml
pruning="custom"
pruning_keep_recent="1000"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.althea/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.althea/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.althea/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.althea/config/app.toml
indexer="null" &&
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.althea/config/config.toml
sudo tee /etc/systemd/system/althea.service > /dev/null <<EOF
[Unit]
Description=althea
After=network-online.target
[Service]
User=$USER
ExecStart=$(which althea) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload && \
sudo systemctl enable althea && \
sudo systemctl restart althea && \
sudo journalctl -fu althea -o cat
Create a wallet for your validator
althea keys add yourwallet
althea keys add yourwallet --recover #in order to restore
#Check wallet balance
althea status | jq -r .sync_info