Appearance
Aztec Sequencer Node Setup Guide
Aztec is an L2 protocol on Ethereum that provides privacy and enables private transactions on-chain. This guide will help you set up a Sequencer Node on the Aztec Testnet, earn the Apprentice Role on Discord, and produce blocks on the network.
What does the Sequencer Node do on the Testnet?
Sequencer Nodes propose blocks, validate blocks from others, and vote on upgrades.
Roles Information
- Sequencer Node: Proposes blocks, validates other blocks, and votes on upgrades.
Hardware Requirements
- CPU: Minimum 8 cores
- RAM: 16 GB
- Storage: 100 GB+ SSD (Baremetal servers are recommended as most VPS might return error 132)
Setting Up on Windows
- For Windows 10+ users, open
cmd
and typewsl.exe
. This will take you to your Windows Subsystem where you can run the necessary commands. - Alternatively, you can download Ubuntu if you do not have WSL.
Step-by-Step Setup
1. Install Dependencies
Run the following commands to install necessary dependencies:
bash
sudo apt-get update && sudo apt-get upgrade -y
sudo apt install curl iptables build-essential git wget lz4 jq make gcc nano automake autoconf tmux htop nvme-cli libgbm1 pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -y
2. Install Docker
Run the following commands to install Docker:
bash
sudo apt-get update -y && sudo apt-get upgrade -y
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update -y && sudo apt upgrade -y
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Test Docker
bash
sudo docker run hello-world
sudo systemctl enable docker
sudo systemctl restart docker
3. Install Aztec Tools
Run the following to install Aztec tools:
bash
bash -i <(curl -s https://install.aztec.network)
After this, restart your terminal and check if the installation was successful by running:
bash
aztec
4. Update Aztec to the Latest Version
Run the following to update Aztec:
bash
aztec-up 0.85.0-alpha-testnet.5
5. Obtain RPC URLs
L1 Execution Client (EL) RPC URL:
Sign up or log in at Alchemy.
Create a new app by selecting "Ethereum" as the chain, and "Sepolia" as the network.
Give your app a name (e.g., "Aztec Sequencer").
Once your app is created, click on "View Key".
Copy the HTTPS URL, which should look like:https://eth-sepolia.g.alchemy.com/v2/YOUR_API_KEY
L1 Consensus Client (CL) RPC URL:
Sign up or log in at DRPC.
Create an API key by going to the "API Keys" section and clicking "Create API Key".
Give your key a name (e.g., "Aztec Sequencer").
Select "Sepolia" network.
Once your key is created, copy the HTTPS URL, which should look like:https://lb.drpc.org/ogrpc?network=sepolia&dkey=YOUR_API_KEY
6. Generate Ethereum Keys
- Use MetaMask to create a new wallet and note down the private and public keys.
7. Get Sepolia ETH
- Fund your Ethereum Wallet with Sepolia ETH, available via Alchemy Sepolia Faucet.
8. Find Your IP
bash
curl ipv4.icanhazip.com
Note this IP for later use.
9. Enable Firewall & Open Ports
Allow necessary ports:
bash
ufw allow 22
ufw allow ssh
ufw enable
ufw allow 40400
ufw allow 40500
ufw allow 8080
10. Start Sequencer Node
To start the node:
bash
screen -S aztec
bash
aztec start --node --archiver --sequencer \
--network alpha-testnet \
--l1-rpc-urls RPC_URL \
--l1-consensus-host-urls BEACON_URL \
--sequencer.validatorPrivateKey 0xYourPrivateKey \
--sequencer.coinbase 0xYourAddress \
--p2p.p2pIp IP
Replace the following variables before you Run Node:
bash
RPC_URL & BEACON_URL : Step 5
0xYourPrivateKey: Your EVM wallet private key
0xYourAddress: Your EVM wallet public address
IP: Your server IP (step 8)
11. Sync Node
It may take a few hours for your node to sync to the tip of the block, depending on your hardware.
12. Get Apprentice Role on Aztec Discord
- Join the Aztec Discord.
- Use the following commands to register:
- Get the latest block number:
bash
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"
- Generate your sync proof:
bash
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"
- Type the following command in this Discord server: /operator start
After typing the command, Discord will display option fields that look like this:
address: Your validator address (Ethereum Address)
block-number: Block number for verification (Block number from Step 1)
proof: Your sync proof (base64 string from Step 2)
Once you paste the proof, ensure your cursor is out of the proof details before you click on send to avoid the send button adding a gap to the details which will invlidate your proof
13. Register Validator Once Synced
To register the validator:
bash
aztec add-l1-validator \
--l1-rpc-urls RPC_URL \
--private-key your-private-key \
--attester your-validator-address \
--proposer-eoa your-validator-address \
--staking-asset-handler 0xF739D03e98e23A7B65940848aBA8921fF3bAc4b2 \
--l1-chain-id 11155111
Replace RPC_URL, your-validator-address & 2x your-validator-address, then proceed
You will get this:
bash
Adding validator (xxxxxx83d3442508ad63f3afa7f4e874xxxx, xxxxxd3442508ad63f3afa7f4e874b78269xxxx [forwarder: 0x871e7294B54dA07cFd71A95b6e2E66d86BcE41f8]) to rollup 0x8D1cc702453fa889f137DBD5734CDb7Ee96B6Ba0
[06:34:36.706] INFO: cli Adding validator (xxxx3d3442508ad63f3afa7f4e874b7826xxxxx, xxxx3d3442508ad63f3afa7f4e874b782xxxx [forwarder: 0x871e7294B54dA07cFd71A95b6e2E66d86BcE41f8]) to rollup 0x8D1cc702453fa889f137DBD5734CDb7Ee96B6Ba0
Transaction hash: xxx066cfd1d3a0ec29adfe3fe4ac0b11fb91bfbe049f268179eb9xxxxx
[06:34:37.864] INFO: cli Transaction hash: xxxx66cfd1d3a0ec29adfe3fe4ac0b11fb91bfbe049f268179eb9ee9def27xxx
Troubleshooting
- world_state error: Remove the world_state folder to resolve this.
- Error registering validator: Ensure the chain is synced to the current tip.
- Invalid block number: Ensure the public consensus address (Beacon address) is correct.
Updating and Restarting the Node
To update the node:
bash
aztec-up <new node version>
To restart the node: Re-run the node using start command. Start the Node
bash
aztec start --node --archiver --sequencer \
--network alpha-testnet \
--l1-rpc-urls RPC_URL \
--l1-consensus-host-urls BEACON_URL \
--sequencer.validatorPrivateKey 0xYourPrivateKey \
--sequencer.coinbase 0xYourAddress \
--p2p.p2pIp IP
To delete the node data:
bash
rm -r /root/.aztec
Checking Node Status After installation, you can check the status of your node:
bash
docker-compose logs -f