Installation

  • 6 or more physical CPU cores

  • At least 1TB of SSD disk storage

  • At least 16GB of memory (RAM)

  • At least 500mbps network bandwidth

# 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
VER="1.22.2"
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"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ALLORA_CHAIN_ID="testnet"" >> $HOME/.bash_profile
echo "export ALLORA_PORT="40"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf allora
git clone https://github.com/allora-network/allora-chain allora
cd allora
git checkout v0.0.10
make install


# Config and Init App
allorad init $MONIKER --chain-id $ALLORA_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.allorad/config/genesis.json https://testnet-files.syanodes.my.id/allora-genesis.json
wget -O $HOME/.allorad/config/addrbook.json https://testnet-files.syanodes.my.id/allora-addrbook.json


#Configure Seeds and Peers
seed=""
peers="[email protected]:26756,[email protected]:26656,[email protected]:26662,[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]:32001,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:21656,[email protected]:26500,[email protected]:29656,[email protected]:26656,[email protected]:32010,[email protected]:56286,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:46656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:32011,[email protected]:26656,[email protected]:46656,[email protected]:26656,[email protected]:27656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:32012,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26664,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26654,[email protected]:26656,[email protected]:26656,[email protected]:32002,[email protected]:26656,[email protected]:26656,[email protected]:26643,[email protected]:26670,[email protected]:26656,[email protected]:26656,[email protected]:56286"
sed -i.bak -e "s/^seed *=.*/seed = \"$seed\"/" ~/.allorad/config/config.toml
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.allorad/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0uallo\"/" $HOME/.allorad/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.allorad/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.allorad/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/.allorad/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.allorad/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.allorad/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.allorad/config/app.toml


# Set Custom Port
sed -i.bak -e "s%:1317%:${ALLORA_PORT}317%g;
s%:8080%:${ALLORA_PORT}080%g;
s%:9090%:${ALLORA_PORT}090%g;
s%:9091%:${ALLORA_PORT}091%g;
s%:8545%:${ALLORA_PORT}545%g;
s%:8546%:${ALLORA_PORT}546%g;
s%:6065%:${ALLORA_PORT}065%g" $HOME/.allorad/config/app.toml
sed -i.bak -e "s%:26658%:${ALLORA_PORT}658%g;
s%:26657%:${ALLORA_PORT}657%g;
s%:6060%:${ALLORA_PORT}060%g;
s%:26656%:${ALLORA_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${ALLORA_PORT}656\"%;
s%:26660%:${ALLORA_PORT}660%g" $HOME/.allorad/config/config.toml
sed -i \
  -e 's|^chain-id *=.*|chain-id = "testnet"|' \
  -e 's|^keyring-backend *=.*|keyring-backend = "test"|' \
  -e 's|^node *=.*|node = "tcp://localhost:40657"|' \
  $HOME/.allorad/config/client.toml


# Set Service File
sudo tee /etc/systemd/system/allorad.service > /dev/null <<EOF
[Unit]
Description=allora-testnet
After=network-online.target

[Service]
User=$USER
ExecStart=$(which allorad) start --home $HOME/.allorad
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable allorad
sudo systemctl start allorad 
sudo journalctl -fu allorad -o cat

Last updated