Skip to content

thanhtrungzaz/aztec-network

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 

Repository files navigation

aztec-network

A step by step guide on How to Run Sequencer Node on Aztec Network Testnet & Earn Apprentice Role.

  • What types of nodes can participate in the testnet?
    • Sequencer: proposes blocks, validates blocks from others, and votes on upgrades.
    • Prover: generates ZK proofs that attest to roll-up integrity.

Roles Info

Find this message about roles in channel: operators| start-here

image

Hardware Requirements

  • Sequencer Node: 8 cores CPU, 16GB RAM, 100GB+ SSD
  • Prover Node: Requiring ~40x machines with 16 cores and 128GB RAM
  • I do NOT run Prover sicne it's for data-center computing systems, not me.

Windows Users: must install Ubuntu on Windows using this guide, then continue further steps.

VPS Users: can get started via a VPS with 4 cores CPU, 8GB RAM! Purchase here


1. Install Dependecies

  • Update packages:
sudo apt-get update && sudo apt-get upgrade -y
  • Install Packages:
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
  • Install Docker:
sudo apt update -y && sudo apt 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
sudo docker run hello-world

sudo systemctl enable docker
sudo systemctl restart docker

2. Install Aztec Tools

bash -i <(curl -s https://install.aztec.network)
  • Restart your Terminal now to apply changes.
  • Check if you installed successfully:
aztec

3. Update Aztec

aztec-up alpha-testnet

4. Obtain RPC URLs

Find a 3rd party that supports Sepolia RPC URL & Sepolia BEACON URL APIs.

Paid:

For example: Ankr is supporting RPC URL & Beacon URL. You can Register, Fund it with a little USDT via your wallet, Create a project, get your normal sepolia rpc and beacon sepolia rpc. ( I used this method )

image

image

Free:

  • RPC URL: Create a Sepolia Ethereum HTTP API in Alchemy
  • BEACON RPC: Use this https://rpc.drpc.org/eth/sepolia/beacon or https://lodestar-sepolia.chainsafe.io/. (You can run your own prysm, lighthouse nodes to get your own BEACON RPC or find other 3rd party solutions)

5. Generate Ethereum Keys

Get an EVM Wallet with Private Key and Public Address saved.

6. Get Sepolia ETH

Fund your Ethereum Wallet with ETH Sepolia

7. Find IP

curl ipv4.icanhazip.com
  • Save it

8. Enable Firewall & Open Ports

# Firewall
ufw allow 22
ufw allow ssh
ufw enable

# Sequencer
ufw allow 40400
ufw allow 8080

9. Sequencer Node

  • Open screen
screen -S aztec
  • Run Node
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:

  • RPC_URL & BEACON_URL: Step 4
  • 0xYourPrivateKey: Your EVM wallet private key
  • 0xYourAddress: Your EVM wallet public address
  • IP: Your server IP (Step 7)

10. Sync Node

After entering the command, your node starts running, It takes a few minutes for your node to get synced

11. Get Role

Go to the discord channel :operators| start-here and follow the prompts, You can continue the guide with my commands if you need help.

image

Step 1: Get the latest proven 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"
  • Save this block number for the next steps
  • Example output: 20905

Step 2: Generate your sync proof

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"
  • Replace 2x BLOCK_NUMBER with your number

Step 3: Register with Discord

  • 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)

Then you'll get your Apprentice Role

image

12. Register Validator

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


Error: ERROR: world-state:block_stream Error processing block stream: Error: Obtained L1 to L2 messages failed to be hashed to the block inHash

No strong solution for this yet, but you can do the following things

image

  • Stop node with Ctrl+C.
  • Delete node data:
rm -r /root/.aztec/alpha-testnet
  • Re-run the node using run command.

About

A step by step guide on How to Install Aztec Network Sequencer on Testnet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published