# Aztec测试网节点教程

By [狂神](https://paragraph.com/@kuangshen) · 2025-05-09

---

Aztec网络是以太坊上的 L2 私有 ZK-rollup，使分散式应用程序能够访问隐私和扩展。 融资金额：1.191 亿美元，投资方包括 Paradigm、a16z、ConsenSys、Coinbase Ventures、HashKey Capital 等

我们通过搭建测试网节点获得Discord中的身份以期待未来的空投

### **配置要求**

至少 8 核 CPU、16GB RAM、100GB+ SSD硬盘，网络必须是独立IP，内网不可以，所以vps肯定是最好的选择

### 环境搭建

更新包：

    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
    

安装Docker：

    sudo apt-get install \
       apt-transport-https \
       ca-certificates \
       curl \
       gnupg-agent \
       software-properties-common
    

    curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    

    echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ \
      $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
      sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt-get update
    

    $ sudo apt-get update
    

    $ sudo apt-get install docker-ce docker-ce-cli containerd.io
    

依次运行上述命令

安装Aztec工具：

    bash -i <(curl -s https://install.aztec.network)
    

选择y安装

添加到PATH：

    echo 'export PATH="$HOME/.aztec/bin:$PATH"' >> ~/.bashrc
    source ~/.bashrc
    

更新到alpha测试网：

    aztec-up alpha-testnet
    

使用Alchemy获取Sepolia rpc链接：

[https://dashboard.alchemy.com/](https://dashboard.alchemy.com/)

注册并点击apps，创建一个新的app，点击进去，选择网络

![](https://storage.googleapis.com/papyrus_images/c395f0bc1429df9256d1d02c5e6e38cc770a83037da91bd7dd4500089772646b.png)

找到ETH，选择Sepolia网络，复制下面的rpc链接备用

![](https://storage.googleapis.com/papyrus_images/75d871659e97de4ec8e0e6a773420e68af2348c6e5ca0332564a134cc5ff9d7f.png)

使用Depc获取ETH Beacon RPC链接：

[https://drpc.org?ref=f75b00](https://drpc.org?ref=f75b00)

注册后点击面板，选择创建的key

![](https://storage.googleapis.com/papyrus_images/b2850277ae41e5f35c26d0c2be6facfb5f5eb6d44c468a0e32ebe0ecd181d727.png)

搜索Beacon，选择Sepolia网络，复制RPC备用

![](https://storage.googleapis.com/papyrus_images/7302797fdfa04815c9c49511b243af15a6b2c56533f430bfd992465ec74d345c.png)

准备好你用于运行节点的钱包地址和私钥，以及你的vps外网地址，可以再服务器中运行命令获取IP

    curl ipinfo.io/ip
    

获取一点Sepolia网络的ETH：

[https://www.alchemy.com/faucets/ethereum-sepolia](https://www.alchemy.com/faucets/ethereum-sepolia)

添加环境变量：

    export DATA_DIRECTORY=/root/aztec-data/
    export COINBASE=你的钱包地址
    export LOG_LEVEL=debug
    export P2P_MAX_TX_POOL_SIZE=1000000000
    

安装screen让节点后台运行：

    apt install screen -y
    

打开一个新的screen窗口：

    screen -S aztec
    

启动节点：

    aztec start --node --archiver --sequencer \
      --network alpha-testnet \
      --l1-rpc-urls alchemyRPC \
      --l1-consensus-host-urls eth-beacon-chain-sepoliaRPC \
      --sequencer.validatorPrivateKey 钱包私钥 \
      --sequencer.coinbase 钱包地址 \
      --p2p.p2pIp VPSIP地址
    

将alchemyRPC、eth-beacon-chain-sepoliaRPC、钱包私钥、钱包地址、VPSIP地址都替换为你自己的

运行之后等待同步区块，最新区块信息在这里查看：

[https://aztecscan.xyz/](https://aztecscan.xyz/)

如果不出问题且网络不错，那么估计5-10分钟差不多了，使用ctrl+A+D切出screen到主界面，运行下面的命令：

    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"
    

运行成功会获得一个区块号，记住它，如果啥也没有出现，是因为区块没有同步完，继续等待

![](https://storage.googleapis.com/papyrus_images/c8f0cc4422cb76aa988ff1187061f96c179557bb1f2d57323ca9fd06914071f5.png)

区块有了之后运行下面的命令：

    curl -s -X POST -H 'Content-Type: application/json' \
    -d '{"jsonrpc":"2.0","method":"node_getArchiveSiblingPath","params":[区块","区块"],"id":67}' \
    http://localhost:8080 | jq -r ".result"
    

将两个区块替换为你自己的区块号，两个都是一样的，运行会获得一串数据

![](https://storage.googleapis.com/papyrus_images/f8d58c85678ae8ee2c5c520f8a7f0f6abeebd94cbfe4563301bdf19dac704f26.png)

将数据保存下来，加入Aztec Discord：

[https://discord.gg/aztec](https://discord.gg/aztec)

验证之后点击operators start频道，使用命令/operator,点击operator start，这里会需要三个数据，你的钱包地址，你的区块号，你使用区块号获得的数据，填写正确之后回车发送，验证完成获得学徒身份

![](https://storage.googleapis.com/papyrus_images/d61774addedaedff0e585527c7b3e56e2d29d93b9d92da1d9d219659d982ae24.png)

![](https://storage.googleapis.com/papyrus_images/b1530c35d0e7816907a8b5114fc4ba42553cbbef96e32066271b780e4c0ea2d9.png)

持续运行节点1-2天，回到这个频道，使用命令/checkip，填写你的vpsip地址，回车检查是否通过守护者验证，通过的话可以获得守护者身份，这个比学徒身份珍贵

![](https://storage.googleapis.com/papyrus_images/d22da9315d42c85c101ad9dc43da970ba667fb78332d7d3644a02ae7ec408077.png)

教程结束，撒花！如果你要进入节点运行界面，则输入：

    screen -r aztec
    

退出并保存节点运行则依旧是ctrl+A+D即可

---

*Originally published on [狂神](https://paragraph.com/@kuangshen/aztec)*
