Aleo Node Setup With Monitoring
This guide will help you setup your node, whether you want to run it as prover, client or validator.
This guide is based on open source information available and no private testnet information is being shared
Recommended Hardware for validator
CPU | 32 cores |
Memory | 128GB |
Disk | 2TB NVMe |
Network | 10 G |
OS | Ubuntu 22.04 LTS |
Port required
Port | Protocol | Purpose | Notes |
5000 | TCP | Validator communications | Required |
4133 | TCP | SnarkOS peers | Required |
3033 | TCP | SnarkOS REST API | Optional. Open to allow external access to the REST API, if enabled. |
9000 | TCP | Metrics |
Prerequisites
System Depedencies
sudo apt update
sudo apt dist-upgrade -y
sudo apt install \
build-essential \
curl \
clang \
gcc \
libssl-dev \
llvm \
make \
pkg-config \
tmux \
xz-utils
Go
cd $HOME
GO_VERSION=$(curl -s https://go.dev/dl/?mode=json | jq -r '.[0].version')
echo $GO_VERSION
# First remove any existing old Go installation
sudo rm -rf /usr/local/go
# Install correct Go version
curl https://dl.google.com/go/${GO_VERSION}.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
# Update environment variables to include go
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
echo "-------------------------------------------------------------"
go version
echo "-------------------------------------------------------------"
# go version go1.20.2 linux/amd64
Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source ${HOME}/.cargo/env
cargo --version
rustc --version
Build the binaries
git clone https://github.com/AleoHQ/snarkOS.git
cd $HOME/snarkOS
cargo build --release
cp $HOME/snarkOS/target/release/snarkos /usr/bin/
Create an Account
snarkos account new
Setup Variables
MODE=client # validator, prover
BINARY_NAME=snarkos
Create Service
sudo tee <<EOF >/dev/null /etc/systemd/system/$BINARY_NAME.service
[Unit]
Description=$BINARY_NAME Aleo daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which $BINARY_NAME) start --nodisplay --metrics --logfile /dev/null --verbosity 4 --$MODE
Restart=always
RestartSec=3
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
EOF
cat /etc/systemd/system/$BINARY_NAME.service
sudo systemctl enable $BINARY_NAME
sudo systemctl daemon-reload
sudo systemctl restart $BINARY_NAME
journalctl -u $BINARY_NAME.service -n 100 -f -o cat
Monitoring
There is a really good exporter written by DSRV labs to monitor a Aleo node:
git clone https://github.com/dsrvlabs/aleo_exporter.git
cd aleo_exporter
go mod tidy
go build ./cmd/aleo_exporter
sudo mv aleo_exporter /usr/bin/
BINARY_NAME=aleo_exporter
NODE=http://aleo-testnet-validator.kingsuper.services:3033
sudo tee <<EOF >/dev/null /etc/systemd/system/$BINARY_NAME.service
[Unit]
Description=$BINARY_NAME Aleo daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which $BINARY_NAME) -rpcURI=$NODE
Restart=always
RestartSec=3
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
EOF
cat /etc/systemd/system/$BINARY_NAME.service
sudo systemctl enable $BINARY_NAME
sudo systemctl daemon-reload
sudo systemctl restart $BINARY_NAME
journalctl -u $BINARY_NAME.service -n 100 -f -o cat
Grafana
Now you can plot charts and monitor your node
More Blog Posts
Aleo Node Setup With Monitoring
Aleo Node Setup With Monitoring
Informative
How to Stake Celestia TIA ?
How to Stake Celestia TIA ?
Guide
How Aleo executes Decentralized Private Computation
How Aleo executes Decentralized Private Computation
Informative
Delegating zk-SNARKs Proofs with Privacy for Performance
Delegating zk-SNARKs Proofs with Privacy for Performance
Informative
How decentralized is Aptos Really ?
How decentralized is Aptos Really ?
Analysis
Aleo Record Model
Aleo Record Model
Informative
What are Zk Snarks ?
What are Zk Snarks ?
Informative
Governance Bot Improvements
Governance Bot Improvements
InformativeServices
ZEXE: How Aleo Achives private computation ?
ZEXE: How Aleo Achives private computation ?
Informative
Celestia Testnet Log Analysis
Celestia Testnet Log Analysis
TestnetAnalysis
How to Stake Agoric BLD ?
How to Stake Agoric BLD ?
Guide