Skip to content

Commit 41c579a

Browse files
critesjoshEsausklppy88
committed
chore(docs): Reviewing node docs w/ claude
Had claude code review these node docs pages based on the recommendations in docs/CLAUDE.md Co-authored-by: Esau <[email protected]> Co-authored-by: Josh Crites <[email protected]> Co-authored-by: sklppy88 <[email protected]>
1 parent f11d8da commit 41c579a

File tree

14 files changed

+723
-405
lines changed

14 files changed

+723
-405
lines changed

docs/docs/the_aztec_network/guides/run_nodes/how_to_run_prover.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,13 @@ Required environment variables:
161161
- `PROVER_BROKER_HOST`: Broker endpoint for job submission
162162
- `PROVER_ID`: Ethereum address corresponding to `PROVER_PUBLISHER_PRIVATE_KEY`
163163
164+
**Note**: Some variables overlap with the prover node configuration. In this case we use the same value for `PROVER_BROKER_HOST`, so we will not duplicate it in our `.env` file.
165+
164166
Add to your `.env` file:
165167
166168
```sh
167169
PROVER_AGENT_COUNT=10
168170
PROVER_AGENT_POLL_INTERVAL_MS=10000
169-
PROVER_BROKER_HOST=http://prover-broker:8080
170171
PROVER_ID=<the address corresponding to the PROVER_PUBLISHER_PRIVATE_KEY you set on the node>
171172
```
172173
@@ -199,15 +200,14 @@ name: aztec-prover
199200
services:
200201
prover-node:
201202
image: aztecprotocol/aztec:latest
202-
command:
203-
- node
204-
- --no-warnings
205-
- /usr/src/yarn-project/aztec/dest/bin/index.js
206-
- start
207-
- --prover-node
208-
- --archiver
209-
- --network
210-
- testnet
203+
entrypoint: >-
204+
node
205+
--no-warnings
206+
/usr/src/yarn-project/aztec/dest/bin/index.js
207+
start
208+
--prover-node
209+
--archiver
210+
--network testnet
211211
depends_on:
212212
prover-broker:
213213
condition: service_started
@@ -219,6 +219,7 @@ services:
219219
LOG_LEVEL: ${LOG_LEVEL}
220220
PROVER_BROKER_HOST: ${PROVER_BROKER_HOST}
221221
PROVER_PUBLISHER_PRIVATE_KEY: ${PROVER_PUBLISHER_PRIVATE_KEY}
222+
P2P_IP: ${P2P_IP}
222223
P2P_PORT: ${P2P_PORT}
223224
AZTEC_PORT: ${AZTEC_PORT}
224225
ports:
@@ -230,14 +231,13 @@ services:
230231
231232
prover-broker:
232233
image: aztecprotocol/aztec:latest
233-
command:
234-
- node
235-
- --no-warnings
236-
- /usr/src/yarn-project/aztec/dest/bin/index.js
237-
- start
238-
- --prover-broker
239-
- --network
240-
- testnet
234+
entrypoint: >-
235+
node
236+
--no-warnings
237+
/usr/src/yarn-project/aztec/dest/bin/index.js
238+
start
239+
--prover-broker
240+
--network testnet
241241
environment:
242242
DATA_DIRECTORY: /var/lib/data
243243
ETHEREUM_HOSTS: ${ETHEREUM_HOSTS}
@@ -248,14 +248,13 @@ services:
248248
249249
prover-agent:
250250
image: aztecprotocol/aztec:latest
251-
command:
252-
- node
253-
- --no-warnings
254-
- /usr/src/yarn-project/aztec/dest/bin/index.js
255-
- start
256-
- --prover-agent
257-
- --network
258-
- testnet
251+
entrypoint: >-
252+
node
253+
--no-warnings
254+
/usr/src/yarn-project/aztec/dest/bin/index.js
255+
start
256+
--prover-agent
257+
--network testnet
259258
environment:
260259
PROVER_AGENT_COUNT: ${PROVER_AGENT_COUNT}
261260
PROVER_AGENT_POLL_INTERVAL_MS: ${PROVER_AGENT_POLL_INTERVAL_MS}

docs/docs/the_aztec_network/guides/run_nodes/how_to_run_sequencer.md

Lines changed: 124 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ tags:
2424

2525
## Background
2626

27-
This guide covers the steps required to run a sequencer node on Aztec. It will also provide context to ensure users are comfortable with the steps they are taking.
27+
This guide covers the steps required to run a sequencer node on the Aztec network.
2828

2929
The Aztec sequencer node is critical infrastructure responsible for ordering transactions and producing blocks.
3030

31-
The sequencer node takes part in three key actions:
31+
The sequencer node performs three key actions:
3232

33-
1. Assemble unprocessed transactions and propose the next block
34-
2. Attest to correct execution of txs in the proposed block (if part of the sequencer committee)
35-
3. Submit the successfully attested block to L1
33+
1. Assembles unprocessed transactions and proposes the next block
34+
2. Attests to correct execution of transactions in proposed blocks (when part of the sequencer committee)
35+
3. Submits successfully attested blocks to L1
3636

37-
When transactions are sent to the Aztec network, sequencer nodes bundle them into blocks, checking various constraints such as gas limits, block size, and transaction validity. Before a block can be published, it must be validated by a committee of other sequencer nodes who re-execute public transactions and verify private function proofs so they can attest to correct execution. These sequencers attest to the block's validity by signing the block header, and once enough attestations are collected (two-thirds of the committee plus one), the sequencer can submit the block to L1.
37+
Sequencer nodes bundle transactions into blocks while checking constraints like gas limits, block size, and validity. Before publication, blocks must be validated by a committee of sequencer nodes who re-execute public transactions and verify private function proofs. Committee members attest to validity by signing the block header. Once sufficient attestations are collected (two-thirds of the committee plus one), the block can be submitted to L1.
3838

3939
The archiver component complements this process by maintaining historical chain data. It continuously monitors L1 for new blocks, processes them, and maintains a synchronized view of the chain state. This includes managing contract data, transaction logs, and L1-to-L2 messages, making it essential for network synchronization and data availability.
4040

@@ -49,33 +49,38 @@ Minimum hardware requirements:
4949

5050
Please note that these requirements are subject to change as the network throughput increases.
5151

52-
This guide expects you to be using a "standard" Linux distribution like Debian / Ubuntu when following along with the steps.
52+
This guide assumes you are using a standard Linux distribution (Debian or Ubuntu).
5353

54-
It also is assumed that you have installed Docker and the aztec toolchain via aztec-up as described in the [getting started section](../../index.md).
54+
### Required Software
5555

56-
Furthermore, as this guide uses Docker compose, you will need to install it. Please follow [this](https://docs.docker.com/compose/install/) guide to do so.
56+
- Docker and the Aztec toolchain installed via aztec-up (see the [getting started section](../../index.md))
57+
- Docker Compose ([installation guide](https://docs.docker.com/compose/install/))
58+
- Access to L1 node endpoints (execution and consensus clients). See [Eth Docker's guide](https://ethdocker.com/Usage/QuickStart) if you need to set these up.
5759

58-
Finally, this guide requires you to have endpoints of an L1 node stack of an execution and consensus client. If you do not have one set up, you can see a good guide on how to do that [here at Eth Docker](https://ethdocker.com/Usage/QuickStart).
60+
## Configure the Sequencer
5961

62+
Setting up a sequencer involves configuring keys, environment variables, and Docker Compose.
6063

61-
## Configure the sequencer
64+
### Setup Steps
6265

63-
There are a few important things to note when setting up a sequencer. This guide will guide you in setting up and running a sequencer with a standard setup using Docker compose with a .env file.
66+
1. Define private keys and accounts for sequencer duties
67+
2. Configure node settings via environment variables
68+
3. Enable auto-update and auto-restart functionality
69+
4. Deploy with Docker Compose
6470

65-
The setup of the sequencer has four important steps.
71+
First, create the directory structure for sequencer data storage:
6672

67-
1. Define private keys / accounts used for sequencer duties
68-
2. Set required node configuration
69-
3. Ensure auto-update / auto-restart is enabled
70-
4. Apply your Docker compose file
71-
72-
Let's start by creating a new directory called `aztec-sequencer`, with two subdirectories, `keys`, and `data`. This is where all the information used by the sequencer will be stored. Please also create an empty `.env` file in `aztec-sequencer` to define your settings before moving on to the next step.
73+
```sh
74+
mkdir -p aztec-sequencer/keys aztec-sequencer/data
75+
cd aztec-sequencer
76+
touch .env
77+
```
7378

74-
### Define private keys / accounts
79+
### Define Private Keys and Accounts
7580

76-
A sequencer must hold and use private keys identifying it as a valid proposer or attester. This is done by defining a keystore file.
81+
Sequencers require private keys to identify themselves as valid proposers or attesters. Configure these through a keystore file.
7782

78-
An example keystore file is below. Copy this file and save it as `keystore.json` into your `aztec-sequencer/keys` folder.
83+
Create a `keystore.json` file in your `aztec-sequencer/keys` folder:
7984

8085
```json
8186
{
@@ -91,20 +96,18 @@ An example keystore file is below. Copy this file and save it as `keystore.json`
9196
}
9297
```
9398

94-
The keystore defines a few important keys and addresses for sequencer operation. They include but are not limited to:
99+
The keystore defines keys and addresses for sequencer operation:
95100

96-
- `attester`: the private key of the sequencer, used for signing block proposals and attestations on block proposals produced by other sequencers. The corresponding Ethereum address of the private key is the identity of the sequencer.
97-
- `publisher`: the private key of the Ethereum EOA used for sending the block proposal to L1. This defaults to the attester private key if not set.
98-
- `coinbase`: the Ethereum address set in a block proposal. L1 rewards and fees are sent to this address. This falls back to the address derived by the attester private key if not set.
99-
- `feeRecipient`: the Aztec Address of the fee recipient address when proposing blocks. The unburnt portion of the tx fees in a given block are sent to this address.
101+
- `attester`: Private key for signing block proposals and attestations. The corresponding Ethereum address identifies the sequencer.
102+
- `publisher`: Private key for sending block proposals to L1. Defaults to attester key if not set.
103+
- `coinbase`: Ethereum address receiving L1 rewards and fees. Defaults to attester address if not set.
104+
- `feeRecipient`: Aztec address receiving unburnt transaction fees from blocks.
100105

101-
Please set these values with the ones you want and save `keystore.json`.
106+
Replace the placeholder values with your actual keys and addresses.
102107

103-
### Node configuration
108+
### Node Configuration
104109

105-
Next you will need to define some environment variables that set important configuration for your node.
106-
107-
These include:
110+
Required environment variables:
108111

109112
- `DATA_DIRECTORY`: the folder where the data of the sequencer is stored
110113
- `KEY_STORE_DIRECTORY`: can be a path to the file or directory where keystores are located. In our case it is the path to the folder containing the `keystore.json` file created above
@@ -115,7 +118,7 @@ These include:
115118
- `P2P_PORT`: The port that P2P communication happens on
116119
- `AZTEC_PORT`: The port that the sequencer node API is exposed on
117120

118-
Please paste this sample `.env` file into the empty one currently residing in your `aztec-sequencer` folder. Please note that we are assuming you are using the default ports of 8080 for the sequencer itself, and 40400 for p2p connectivity. If this is not the case, please overwrite the defaults below.
121+
Add the following to your `.env` file (using default ports 8080 and 40400):
119122

120123
```sh
121124
DATA_DIRECTORY=./data
@@ -129,27 +132,23 @@ AZTEC_PORT=8080
129132
```
130133
131134
:::tip
132-
Forward your ports. Your router must send UDP and TCP traffic on the port specified by `P2P_PORT` to your IP address on your local network.
135+
You MUST forward ports for P2P connectivity. Configure your router to forward both UDP and TCP traffic on the port specified by `P2P_PORT` to your local IP address.
133136
134-
Running the command `curl ipv4.icanhazip.com` can retrieve your public IP address for you.
137+
To find your public IP address, run: `curl ipv4.icanhazip.com`
135138
:::
136139
137-
### Enable auto-update / auto-restart
138-
139-
It is imperative that the built in auto-updating functionality of the sequencer is not disabled. The update-checker is a background module in the Aztec node that enables global coordination of updates. It allows the protocol team to:
140+
### Enable Auto-Update and Auto-Restart
140141
141-
- Push configuration changes to all nodes
142-
- Trigger shutdowns so that nodes can pull the latest image version
143-
- Apply hot-fixes quickly
144-
- Coordinate node resets after a governance upgrade, especially when a new canonical rollup is published to the Registry
142+
The sequencer's auto-update functionality is critical for network coordination. This background module enables:
145143
146-
This module ensures that upgrades and fixes propagate smoothly without requiring manual intervention from every node operator.
144+
- Configuration updates across all nodes
145+
- Automated image updates via controlled shutdowns
146+
- Rapid hot-fix deployment
147+
- Coordinated resets after governance upgrades
147148
148-
Please ensure environment variables:
149+
**Important**: Do NOT set `AUTO_UPDATE_URL` or `AUTO_UPDATE` environment variables. These must use their default values for proper operation.
149150
150-
`AUTO_UPDATE_URL` and `AUTO_UPDATE` remain unset, as to take their default values (which are the s3 bucket being used to host the update information, and `config-and-version` respectively).
151-
152-
Because docker-compose does not respect pull policies on container restarts, to handle updates properly, add Watchtower to your stack by running:
151+
Since Docker Compose doesn't respect pull policies on container restarts, install Watchtower for automatic updates:
153152
154153
```sh
155154
docker run -d \
@@ -158,9 +157,9 @@ docker run -d \
158157
containrrr/watchtower
159158
```
160159
161-
### Applying your Docker compose file
160+
### Deploy with Docker Compose
162161
163-
Now that you have done all the setup, create a Docker compose file named `compose.yml` in your `aztec-sequencer` directory and paste the below code into it.
162+
Create a `docker-compose.yml` file in your `aztec-sequencer` directory:
164163
165164
```yaml
166165
services:
@@ -175,21 +174,23 @@ services:
175174
- ${DATA_DIRECTORY}:/var/lib/data
176175
- ${KEY_STORE_DIRECTORY}:/var/lib/keystore
177176
environment:
178-
KEY_STORE_DIRECTORY: /var/lib/keystore
179-
DATA_DIRECTORY: /var/lib/data
180-
LOG_LEVEL: ${LOG_LEVEL}
181-
ETHEREUM_HOSTS: ${ETHEREUM_HOSTS}
182-
L1_CONSENSUS_HOST_URLS: ${L1_CONSENSUS_HOST_URLS}
183-
P2P_IP: ${P2P_IP}
184-
P2P_PORT: ${P2P_PORT}
185-
AZTEC_PORT: ${AZTEC_PORT}
186-
entrypoint: node /usr/src/yarn-project/aztec/dest/bin/index.js
187-
command: >-
177+
KEY_STORE_DIRECTORY: /var/lib/keystore
178+
DATA_DIRECTORY: /var/lib/data
179+
LOG_LEVEL: ${LOG_LEVEL}
180+
ETHEREUM_HOSTS: ${ETHEREUM_HOSTS}
181+
L1_CONSENSUS_HOST_URLS: ${L1_CONSENSUS_HOST_URLS}
182+
P2P_IP: ${P2P_IP}
183+
P2P_PORT: ${P2P_PORT}
184+
AZTEC_PORT: ${AZTEC_PORT}
185+
entrypoint: >-
186+
node
187+
--no-warnings
188+
/usr/src/yarn-project/aztec/dest/bin/index.js
188189
start
189-
--network testnet
190190
--node
191191
--archiver
192192
--sequencer
193+
--network testnet
193194
networks:
194195
- aztec
195196
restart: always
@@ -199,20 +200,77 @@ networks:
199200
name: aztec
200201
```
201202
202-
Please note that we are setting only the necessary configuration for running this sequencer. The full list of settings and flags can be explored here at the [cli reference](../../reference/cli_reference.md). A lot of these options are preset to defaults by the `--network` flag above. This downloads defaults for the specified network and applies them to the node.
203+
**Note**: This configuration includes only essential settings. The `--network testnet` flag applies network-specific defaults. See the [CLI reference](../../reference/cli_reference.md) for all available options.
203204
204-
Now, you can run `docker compose up` inside your `aztec-sequencer` folder to start the sequencer!
205+
Start the sequencer:
205206
206-
To check if your sequencer is currently synced, which may take a few minutes, run this command and compare its output to any of the Aztec block explorers. (See [Aztec Scan](https://aztecscan.xyz/) or [Aztec Explorer](https://aztecexplorer.xyz/))
207+
```sh
208+
docker compose up -d
209+
```
210+
211+
## Verification
212+
213+
To verify your sequencer is running correctly:
214+
215+
1. Check the current sync status (this may take a few minutes):
207216
208217
```sh
209218
curl -s -X POST -H 'Content-Type: application/json' \
210219
-d '{"jsonrpc":"2.0","method":"node_getL2Tips","params":[],"id":67}' \
211220
http://localhost:8080 | jq -r ".result.proven.number"
212221
```
213222
214-
## Add yourself to the testnet sequencer set
223+
Compare the output with block explorers like [Aztec Scan](https://aztecscan.xyz/) or [Aztec Explorer](https://aztecexplorer.xyz/).
224+
225+
2. View sequencer logs:
226+
227+
```sh
228+
docker compose logs -f aztec-sequencer
229+
```
230+
231+
3. Check node status:
232+
233+
```sh
234+
curl http://localhost:8080/status
235+
```
236+
237+
## Troubleshooting
238+
239+
### Common Issues
240+
241+
**Port forwarding not working:**
242+
243+
- Verify your external IP address matches the `P2P_IP` setting
244+
- Check firewall rules on your router and local machine
245+
- Test connectivity using: `nc -zv <your-ip> <p2p-port>`
246+
247+
**Sequencer not syncing:**
248+
249+
- Check L1 endpoint connectivity
250+
- Verify both execution and consensus clients are fully synced
251+
- Review logs for specific error messages
252+
253+
**Keystore issues:**
254+
255+
- Ensure keystore.json is properly formatted
256+
- Verify private keys are valid Ethereum private keys
257+
- Check file permissions on the keys directory
258+
259+
**Docker issues:**
260+
261+
- Ensure Docker and Docker Compose are up to date
262+
- Check disk space availability
263+
- Verify container has sufficient resources
264+
265+
## Join the Sequencer Set
266+
267+
After setting up your node, you must request to be added to the sequencer set.
268+
269+
Complete the onboarding process at [testnet.aztec.network](https://testnet.aztec.network) using zkPassport.
215270
216-
After setting up your node you must explicitly request to be added to the sequencer set.
271+
## Next Steps
217272
218-
To complete this final step you can now head to [testnet.aztec.network](https://testnet.aztec.network) and complete the onboarding flow there utilizing zkPassport!
273+
- Monitor your sequencer's performance and attestation rate
274+
- Join the [Aztec Discord](https://discord.gg/aztec) for operator support
275+
- Review [Reacting to Upgrades](../../reference/reacting_to_upgrades.md) guide
276+
- Consider implementing monitoring and alerting for production deployments

docs/docs/the_aztec_network/guides/run_nodes/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ description: Learn how to participate in the Aztec Network by running different
1313
<h3>Run Aztec Sequencer Nodes</h3>
1414
</CardHeader>
1515
<CardBody>
16-
Participate in the Aztec protocol as a sequencer that orders transactions in a block and proposed them to the L1. Runs on consumer hardware.
16+
Participate in the Aztec protocol as a sequencer that orders transactions in blocks and proposes them to L1. Runs on consumer hardware.
1717
</CardBody>
1818
</Card>
1919
<Card link='./run_nodes/how_to_run_prover'>
2020
<CardHeader>
2121
<h3>Run Aztec Prover Nodes</h3>
2222
</CardHeader>
2323
<CardBody>
24-
Participate in the Aztec protocol as a prover, proving the rollup integrity that is pivotal to the protocol. Runs on hardware fit for data centers.
24+
Participate in the Aztec protocol as a prover, generating proofs that ensure rollup integrity. Requires high-performance hardware suitable for data centers.
2525
</CardBody>
2626
</Card>
2727
</div>

0 commit comments

Comments
 (0)