Skip to content

Commit f8c89cf

Browse files
authored
chore: merge v4-next (#22528)
.
2 parents e696cf6 + 9df7ae3 commit f8c89cf

File tree

6,898 files changed

+759293
-1139377
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,898 files changed

+759293
-1139377
lines changed

.claude/skills/release-docs/SKILL.md

Lines changed: 468 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 297 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,297 @@
1+
---
2+
name: release-network-docs
3+
description: Update network/operator documentation for a mainnet or testnet release without touching developer docs
4+
argument-hint: <RPC_URL>
5+
---
6+
7+
# Release Network Docs
8+
9+
Update the Aztec network/operator documentation for a new release. Queries the
10+
network for current info, updates contract addresses, builds the docs, cuts a
11+
versioned snapshot of the operator docs, and prepares changes on `next`.
12+
13+
This is a **lightweight alternative** to the full `/release-docs` skill. Use it
14+
when only the network/operator docs need updating (new contract addresses,
15+
network upgrade, config changes) and the developer docs remain unchanged.
16+
17+
Supports **mainnet** and **testnet** releases only. Network operator docs do not
18+
have devnet or nightly versions. The release type is auto-detected from the
19+
version string returned by the network. If the version string does not
20+
self-identify its release type, ask the user to confirm.
21+
22+
**This skill does NOT:**
23+
24+
- Generate API docs (aztec-nr or TypeScript)
25+
- Generate CLI reference docs
26+
- Update developer version config or cut developer versioned docs
27+
- Update migration notes
28+
- Require aztec CLI, nargo, or yarn-project build
29+
30+
## Usage
31+
32+
```
33+
/release-network-docs https://aztec-mainnet.drpc.org
34+
/release-network-docs https://rpc.testnet.aztec-labs.com
35+
```
36+
37+
## Workflow
38+
39+
### Step 1: Query Network Info and Detect Release Type
40+
41+
Fetch node info from the provided RPC URL:
42+
43+
```bash
44+
curl -s -X POST -H 'Content-Type: application/json' \
45+
-d '{"method":"node_getNodeInfo"}' <RPC_URL> | jq .result
46+
```
47+
48+
Parse the response to extract:
49+
50+
- `nodeVersion` (the version string, e.g. `4.1.2` or `4.1.0-rc.2`)
51+
- L1 contract addresses from `l1ContractAddresses`: registry, rollup, inbox,
52+
outbox, fee juice, staking asset, fee juice portal, fee asset handler, coin
53+
issuer, reward distributor, governance proposer, governance, slash factory
54+
- L2 protocol contract addresses from `protocolContractAddresses`: instance
55+
registry, class registry, multi-call entrypoint, fee juice
56+
- `rollupVersion`
57+
- `l1ChainId`
58+
59+
**Detect release type** from the version string:
60+
61+
- Contains `mainnet` or matches a plain semver like `4.1.2` → release type is `mainnet`
62+
- Contains `testnet` or `rc` → release type is `testnet`
63+
- Contains `devnet`**abort**: network docs do not support devnet. Direct the
64+
user to use `/release-docs` instead.
65+
- If unclear, ask the user to confirm the release type (must be `mainnet` or `testnet`)
66+
67+
Store all values for use in subsequent steps.
68+
69+
### Step 2: Verify Git Tag and Checkout
70+
71+
The version from Step 1 tells us which git tag the docs should be built from.
72+
The operator docs source in `docs/docs-operate/` must reflect the code at the
73+
release tag, not whatever happens to be on `next`.
74+
75+
```bash
76+
git fetch origin
77+
git tag -l "v<nodeVersion>"
78+
```
79+
80+
- If the tag exists and is already checked out, continue.
81+
- If the tag exists but is not checked out: `git checkout v<nodeVersion>`
82+
- **Abort if the tag doesn't exist** — the release hasn't been tagged yet.
83+
84+
### Step 3: Identify and Resolve Missing Contract Addresses
85+
86+
The `networks.md` L1 table includes contracts that are **not** returned by
87+
`node_getNodeInfo`. Resolve these addresses in three tiers:
88+
89+
#### Tier 1: Query on-chain from known contracts
90+
91+
The Rollup and Registry addresses are already known from the RPC response. Use
92+
them to query additional addresses on L1. Determine the L1 RPC from the chain
93+
ID: `1` → Ethereum mainnet, `11155111` → Sepolia.
94+
95+
```bash
96+
# GSE (Governance Staking Escrow) — from Rollup
97+
cast call <ROLLUP_ADDRESS> "getGSE()(address)" --rpc-url <L1_RPC>
98+
99+
# Slasher — from Rollup
100+
cast call <ROLLUP_ADDRESS> "getSlasher()(address)" --rpc-url <L1_RPC>
101+
102+
# Governance — from Registry
103+
cast call <REGISTRY_ADDRESS> "getGovernance()(address)" --rpc-url <L1_RPC>
104+
```
105+
106+
#### Tier 2: From deployment output (if available)
107+
108+
These addresses are stored internally in contracts with no public getter. They
109+
can be obtained from the Forge deployment script output
110+
(`l1-contracts/script/deploy/DeployAztecL1Contracts.s.sol` prints JSON with all
111+
addresses). Ask the user if they have deployment output.
112+
113+
- **Reward Booster** (stored in Rollup's `RewardLib` storage, no getter)
114+
- **Tally Slashing Proposer** (deployed alongside Slasher, no getter)
115+
- **Staking Registry**
116+
117+
#### Tier 3: Manual / confirm unchanged
118+
119+
These periphery contracts have no on-chain getter. Ask the user to provide new
120+
addresses or confirm that the existing values in `networks.md` are still correct.
121+
122+
- **Honk Verifier**
123+
- **Register New Rollup Version Payload**
124+
- **Slash Payload Cloneable**
125+
126+
Present a summary table showing: which addresses came from RPC, which were
127+
queried on-chain, which came from deployment output, and which are unchanged.
128+
Get user confirmation before proceeding.
129+
130+
### Step 4: Update Network Info and Contract Addresses
131+
132+
**File:** `docs/docs/networks.md`
133+
134+
Update the column matching the release type (**Alpha (Mainnet)** or **Testnet**)
135+
in each table:
136+
137+
- **Network Technical Information table**: update the version, rollup version.
138+
Update the RPC endpoint only if the user provides a new one (the argument
139+
RPC URL may be temporary or internal). Keep bootnodes and block explorer
140+
links unless the user requests changes.
141+
142+
- **L1 Contract Addresses table**: update all addresses from the RPC response,
143+
on-chain queries, and any additional addresses provided by the user.
144+
- Mainnet: use `https://etherscan.io/address/0xADDR` link format
145+
- Testnet: use `https://sepolia.etherscan.io/address/0xADDR` link format
146+
- For contracts that are not deployed on this network, use `N/A`
147+
148+
- **L2 Contract Addresses table**: update if any canonical protocol contract
149+
addresses changed (check the `protocolContractAddresses` from the RPC
150+
response). SponsoredFPC is always "Not deployed" on mainnet and testnet.
151+
152+
Also grep for any old addresses that may appear elsewhere in the docs:
153+
154+
```bash
155+
grep -r "<old_address>" docs/
156+
```
157+
158+
### Step 5: Review Operator Docs Content (Optional)
159+
160+
Ask the user if any content changes are needed in `docs/docs-operate/`:
161+
162+
- New or changed configuration options, environment variables, or CLI flags
163+
- Updated setup instructions or prerequisites
164+
- New or modified troubleshooting entries
165+
- Operator changelog updates (if not handled by `/updating-changelog`)
166+
167+
If the user has content changes, apply them to the source files in
168+
`docs/docs-operate/`. If no content changes are needed, skip to Step 6.
169+
170+
### Step 6: Build and Validate
171+
172+
Set the environment variables matching the release type so the build
173+
preprocessor resolves version placeholders correctly in the operator docs:
174+
175+
- **Mainnet**: `MAINNET_TAG=<new_version> RELEASE_TYPE=mainnet`
176+
- **Testnet**: `TESTNET_TAG=<new_version> RELEASE_TYPE=testnet`
177+
178+
**IMPORTANT:** `COMMIT_TAG` must include the `v` prefix (e.g., `v4.1.2`). The
179+
preprocessor uses this for git tag references and GitHub URLs.
180+
181+
```bash
182+
cd docs && <TAG_VAR>=<new_version> RELEASE_TYPE=<release_type> COMMIT_TAG=v<nodeVersion> yarn build
183+
```
184+
185+
Where `<TAG_VAR>` is `MAINNET_TAG` for mainnet or `TESTNET_TAG` for testnet.
186+
187+
Fix any issues reported by the build:
188+
189+
- Broken redirect targets (from `validate_redirect_targets.sh`)
190+
- Broken API reference links (from `validate_api_ref_links.sh`)
191+
- Spellcheck errors
192+
193+
Iterate until the build passes.
194+
195+
### Step 7: Read Old Version and Cut Network Versioned Docs
196+
197+
**Before cutting**, read `docs/network_version_config.json` and record the
198+
current version for this release type. This is the old version that will be
199+
cleaned up in Step 8. Save this value — the config will be overwritten next.
200+
201+
```bash
202+
cat docs/network_version_config.json
203+
```
204+
205+
For example, if the config shows `"mainnet": "v4.1.2"` and you are releasing
206+
`v4.2.0` for mainnet, the old version is `v4.1.2`.
207+
208+
Now create a versioned snapshot of the network/operator docs. The version string
209+
must always be prefixed with `v` (e.g. `v4.1.2`, not `4.1.2`).
210+
211+
```bash
212+
cd docs
213+
<TAG_VAR>=<new_version> RELEASE_TYPE=<release_type> yarn docusaurus docs:version:network v<new_version>
214+
```
215+
216+
Then update the version config and reconcile:
217+
218+
```bash
219+
scripts/update_docs_versions.sh network <release_type> v<new_version>
220+
```
221+
222+
Verify the results:
223+
224+
- `docs/network_version_config.json` has the new version under the correct
225+
release type (the old version is no longer mapped to this release type)
226+
- `docs/network_versioned_docs/version-v<new_version>/` exists with resolved
227+
macros (check that `#release_version` was replaced with the actual version
228+
string and `#release_network` was replaced with `mainnet` or `testnet`)
229+
- `docs/network_versioned_sidebars/version-v<new_version>-sidebars.json` exists
230+
231+
**Note:** At this point `network_versions.json` may still list the old version
232+
as an unmapped extra (its directory still exists). This is cleaned up in Step 8.
233+
234+
### Step 8: Clean Up Old Network Version
235+
236+
Use the old version recorded at the start of Step 7.
237+
238+
**If this is the first release for this release type** (no previous version
239+
existed in the config), skip this step.
240+
241+
**Ask the user for confirmation** before deleting. If approved, remove:
242+
243+
- `docs/network_versioned_docs/version-<old_version>/`
244+
- `docs/network_versioned_sidebars/version-<old_version>-sidebars.json`
245+
246+
Then re-run the reconciliation script so that `network_versions.json` drops the
247+
old version (its directory no longer exists):
248+
249+
```bash
250+
scripts/update_docs_versions.sh network
251+
```
252+
253+
Verify that both `network_version_config.json` and `network_versions.json` no
254+
longer reference the old version.
255+
256+
### Step 9: Move Changes to `next` Branch
257+
258+
```bash
259+
git stash
260+
git checkout next && git pull origin next
261+
git stash pop
262+
```
263+
264+
Check for stash conflicts. Then report to the user:
265+
266+
- `git status` and `git diff --stat` to show what changed
267+
- List all modified/added/deleted files
268+
- Flag any conflicts or unexpected changes
269+
- Let the user know the changes are ready to be committed and a PR can be opened
270+
271+
## Key Points
272+
273+
- **Mainnet and testnet only**: This skill does not support devnet or nightly
274+
releases. Network operator docs only have mainnet and testnet versions. If
275+
devnet is detected, abort and direct the user to `/release-docs`.
276+
- **Tag must be checked out**: The operator docs source in `docs/docs-operate/`
277+
must reflect the release tag, not `next`. Always checkout the tag before
278+
building and cutting versioned docs.
279+
- **Always query the network first**: The RPC response is the source of truth
280+
for version and L1/L2 contract addresses.
281+
- **Some addresses are not in the RPC**: Contracts like Staking Registry,
282+
Reward Booster, Tally Slashing Proposer, and others must be queried on-chain,
283+
obtained from deployment output, or confirmed unchanged by the user.
284+
- **No heavy prerequisites**: This skill does not require aztec CLI, nargo, or
285+
a yarn-project build. Only `yarn` (for the docs build), `curl`/`jq` (for
286+
the RPC query), and `cast` (for on-chain address queries) are needed.
287+
- **Build must pass**: Do not cut versioned docs until `yarn build` succeeds.
288+
- **COMMIT_TAG needs `v` prefix**: The preprocessor uses COMMIT_TAG for GitHub
289+
URLs and git tag references. Omitting the `v` will break links in versioned
290+
docs.
291+
- **User confirmation required**: Ask before deleting old versioned docs and
292+
before making content changes to operator docs.
293+
- **Changes land on `next`**: All changes are stashed and moved to the `next`
294+
branch at the end, ready for a PR.
295+
- **Network version config only**: This skill modifies
296+
`network_version_config.json` and `network_versions.json`. It does not touch
297+
`developer_version_config.json` or `developer_versions.json`.

.github/workflows/ci3.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ jobs:
8181
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
8282
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
8383
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
84+
AZTEC_TOOLCHAIN_DEFAULT_MAJOR_VERSION: ${{ vars.AZTEC_TOOLCHAIN_DEFAULT_MAJOR_VERSION }}
8485
# For automatic documentation updates via Claude Code
8586
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
8687
# Nightly test env vars.

0 commit comments

Comments
 (0)