Skip to main content

Aztec (Testnet) - Monitor

๐Ÿ“Š Monitoring Your Aztec Sequencer Nodeโ€‹

After your sequencer is running via Docker Compose, here's how to monitor its health, performance, and network participation.


โœ… Check Container Statusโ€‹

# Check if container is running
docker ps | grep aztec

# Check container health
docker compose ps

# Quick status overview
sudo systemctl status docker

๐Ÿ” View Real-time Logsโ€‹

# Follow logs in real-time
docker compose logs -f aztec-node

# View last 100 lines
docker logs aztec-sequencer --tail 100

# Filter logs by keyword
docker logs aztec-sequencer 2>&1 | grep -i "sync\|block\|error"

๐Ÿ“ˆ Check Synchronization Statusโ€‹

# Get current synced block number
curl -s -X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getL2Tips","params":[],"id":67}' \
http://localhost:8080 | jq -r ".result.proven.number"

# Compare with network latest block
echo "Network latest block: $(curl -s https://api.aztecscan.xyz/latest-block | jq -r '.number')"
echo "Your node block: $(curl -s -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"node_getL2Tips","params":[],"id":67}' http://localhost:8080 | jq -r '.result.proven.number')"

๐Ÿ” Get Node Informationโ€‹

# Get your node's Peer ID
docker logs aztec-sequencer 2>&1 | grep -i "peerId" | grep -o '"peerId":"[^"]*"' | cut -d'"' -f4 | head -n 1

# Check P2P connections
docker logs aztec-sequencer 2>&1 | grep -i "peer\|connection" | tail -10

# Verify node registration
curl -s -X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getNodeInfo","params":[],"id":67}' \
http://localhost:8080 | jq

๐Ÿ”„ Maintenance Operationsโ€‹

๐Ÿš€ Restart Node (Safe Method)โ€‹

# Graceful restart
docker compose restart aztec-node

# Or stop and start
docker compose down
docker compose up -d

# Check logs after restart
docker compose logs -f aztec-node

๐Ÿ“ฆ Update to Latest Versionโ€‹

# Pull latest image
docker compose pull

# Restart with new image
docker compose down
docker compose up -d

# Verify update
docker images | grep aztecprotocol/aztec

๐Ÿงน Clean Up (if node is corrupted)โ€‹

# Stop node
docker compose down

# Remove old data (โš ๏ธ This will resync from scratch)
sudo rm -rf ./data

# Restart node
docker compose up -d

# Monitor sync progress
docker compose logs -f aztec-node

๐Ÿ’พ Backup Node Dataโ€‹

# Create backup directory
mkdir -p ~/aztec-backups/$(date +%Y%m%d)

# Backup configuration
cp .env ~/aztec-backups/$(date +%Y%m%d)/
cp docker-compose.yml ~/aztec-backups/$(date +%Y%m%d)/

# Backup critical data (if needed)
sudo tar -czf ~/aztec-backups/$(date +%Y%m%d)/aztec-data.tar.gz ./data/

๐Ÿ“ฑ Discord Integration & Rolesโ€‹

๐ŸŽฏ Get Apprentice Roleโ€‹

# Wait for full sync, then get proof data
BLOCK_NUMBER=$(curl -s -X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getL2Tips","params":[],"id":67}' \
http://localhost:8080 | jq -r ".result.proven.number")

echo "Your block number: $BLOCK_NUMBER"

# Get proof for Discord verification
curl -s -X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getArchiveSiblingPath","params":["'$BLOCK_NUMBER'","'$BLOCK_NUMBER'"],"id":67}' \
http://localhost:8080 | jq -r ".result"

Discord Steps:

  1. Join Aztec Discord
  2. Go to #operators-start-here channel
  3. Use command: /operator start
  4. Provide: EVM address, block number, and proof string
  5. Receive Apprentice role

๐Ÿ›ก๏ธ Upgrade to Guardian Roleโ€‹

# Get your VPS IP address
curl -s ifconfig.me

# In Discord #upgrade-role channel, use:
# /checkip YOUR_VPS_IP

๐Ÿ“Š Performance Monitoringโ€‹

๐Ÿ–ฅ๏ธ System Resource Usageโ€‹

# Check CPU and memory usage
docker stats aztec-sequencer --no-stream

# Monitor disk usage
df -h

# Check system load
htop

๐ŸŒ Network Monitoringโ€‹

# Check port connectivity
sudo netstat -tulnp | grep -E "(40400|8080)"

# Test external connectivity
nc -zv $(curl -s ifconfig.me) 40400

# Monitor network traffic
iftop -i eth0

๐Ÿ“ˆ Create Monitoring Scriptโ€‹

# Create monitoring script
nano ~/monitor_aztec.sh

Add this content:

#!/bin/bash
# Aztec Node Monitoring Script

LOG_FILE="$HOME/aztec_monitor.log"
DATE=$(date '+%Y-%m-%d %H:%M:%S')

# Check if container is running
if ! docker ps | grep -q aztec-sequencer; then
echo "[$DATE] ERROR: Aztec container not running" >> $LOG_FILE
docker compose -f $HOME/aztec-node/docker-compose.yml up -d
exit 1
fi

# Check sync status
BLOCK_NUMBER=$(curl -s -X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getL2Tips","params":[],"id":67}' \
http://localhost:8080 | jq -r ".result.proven.number" 2>/dev/null)

if [[ "$BLOCK_NUMBER" == "null" ]] || [[ -z "$BLOCK_NUMBER" ]]; then
echo "[$DATE] WARNING: Unable to get block number" >> $LOG_FILE
else
echo "[$DATE] INFO: Current block: $BLOCK_NUMBER" >> $LOG_FILE
fi

# Check disk space
DISK_USAGE=$(df -h ~/aztec-node/data | tail -1 | awk '{print $5}' | sed 's/%//')
if [[ $DISK_USAGE -gt 90 ]]; then
echo "[$DATE] WARNING: Disk usage high: ${DISK_USAGE}%" >> $LOG_FILE
fi

echo "[$DATE] INFO: Health check completed" >> $LOG_FILE
# Make executable and add to cron
chmod +x ~/monitor_aztec.sh

# Add to crontab (runs every 10 minutes)
(crontab -l 2>/dev/null; echo "*/10 * * * * $HOME/monitor_aztec.sh") | crontab -

๐Ÿ”ง Troubleshooting Commandsโ€‹

๐Ÿšจ Common Issues & Quick Fixesโ€‹

# Issue: "ERROR: world-state:block_stream Error processing block stream"
# Solution: Clean restart
docker compose down
sudo rm -rf ./data
docker compose up -d

# Issue: Port binding failed
# Check what's using the ports
sudo lsof -i :40400
sudo lsof -i :8080

# Issue: RPC connection failed
# Test RPC endpoints
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
$ETHEREUM_RPC_URL

# Issue: High memory usage
# Restart container to clear memory
docker compose restart aztec-node

๐Ÿ“‹ Daily Maintenance Checklistโ€‹

# 1. Check container status
docker ps | grep aztec

# 2. Verify sync status
curl -s -X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"node_getL2Tips","params":[],"id":67}' \
http://localhost:8080 | jq -r ".result.proven.number"

# 3. Check recent logs for errors
docker logs aztec-sequencer --since 1h | grep -i error

# 4. Monitor disk space
df -h ~/aztec-node/data

# 5. Verify external connectivity
nc -zv $(curl -s ifconfig.me) 40400

๐ŸŒ Network Participationโ€‹

๐Ÿ” Check Your Node on Explorerโ€‹

๐Ÿ“Š Performance Metricsโ€‹

  • Uptime: Aim for 99%+ uptime
  • Sync Status: Stay within 1-2 blocks of network tip
  • Memory Usage: Monitor and restart if memory leaks occur
  • Disk Growth: Plan for increasing storage requirements

๐ŸŽ‰ Success Indicatorsโ€‹

โœ… Container running smoothly
โœ… Synced to latest block
โœ… No error messages in logs
โœ… External ports accessible
โœ… Discord role obtained
โœ… Node visible on explorer


๐Ÿง  Pro Tips:

  • Keep your node updated with latest releases
  • Monitor logs regularly for network announcements
  • Join Aztec Discord for community support and updates
  • Maintain good uptime for potential future incentives

Keep building the future of privacy! ๐Ÿ”ฎ๐Ÿš€

ยฉ 2025 TokioStack. All rights reserved.
DMCA.com Protection Status