Skip to content

Commit 2401c02

Browse files
committed
merge next into merge-train/avm
2 parents 5f61921 + e7eab21 commit 2401c02

File tree

4,895 files changed

+501169
-164543
lines changed

Some content is hidden

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

4,895 files changed

+501169
-164543
lines changed

.claude/skills/merge-train-infra/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The merge-train system is fully automated via GitHub Actions in `.github/workflo
1313

1414
1. **PR Creation** (`merge-train-create-pr.yml`): Triggered on push to `merge-train/*` branches. Creates a PR targeting `next` with the `ci-no-squash` label (and `ci-full-no-test-cache` for spartan). Skips merge commits and commits already in `next`.
1515

16-
2. **Body Updates** (`merge-train-update-pr-body.yml`): Triggered on push to `merge-train/**`. Updates the PR body with meaningful commits (those containing PR references like `(#1234)`). The body uses `BEGIN_COMMIT_OVERRIDE` / `END_COMMIT_OVERRIDE` markers for release-please.
16+
2. **Body Updates** (`merge-train-update-pr-body.yml`): Triggered on push to `merge-train/**` and `backport-to-*-staging` branches. Updates the PR body with meaningful commits (those containing PR references like `(#1234)`). The body uses `BEGIN_COMMIT_OVERRIDE` / `END_COMMIT_OVERRIDE` markers for release-please. Backport staging PRs also call `update-pr-body.sh` inline from `scripts/backport_to_staging.sh` to handle the first-push case (where the PR doesn't exist yet when the workflow fires).
1717

1818
3. **Next Integration** (`merge-train-next-to-branches.yml`): Triggered on push to `next`. Merges `next` into each active merge-train branch via `scripts/merge-train/merge-next.sh`. Uses `continue-on-error: true` so a conflict in one branch does not block others. Skips branches whose PR already has auto-merge enabled.
1919

@@ -90,7 +90,7 @@ When a CI run fails on an EC2 instance, it calls `merge_train_failure_slack_noti
9090
| `.github/workflows/merge-train-auto-merge.yml` | Hourly cron to auto-merge inactive trains |
9191
| `.github/workflows/merge-train-next-to-branches.yml` | Syncs `next` into all train branches; defines active branches |
9292
| `.github/workflows/merge-train-recreate.yml` | Recreates branch after merge |
93-
| `.github/workflows/merge-train-update-pr-body.yml` | Updates PR body with commit list |
93+
| `.github/workflows/merge-train-update-pr-body.yml` | Updates PR body with commit list (merge-train and backport branches) |
9494
| `.github/workflows/merge-queue-dequeue-notify.yml` | Slack notification on merge-queue dequeue |
9595
| `.github/workflows/squashed-pr-check.yml` | Squash enforcement (skipped for `ci-no-squash`) |
9696

@@ -103,6 +103,7 @@ When a CI run fails on an EC2 instance, it calls `merge_train_failure_slack_noti
103103
| `scripts/merge-train/update-pr-body.sh` | Updates PR body with meaningful commits |
104104
| `scripts/merge-train/squash-pr.sh` | Squashes PR commits (used by `ci-squash-and-merge` label) |
105105
| `scripts/merge-train/wakeup-prs.sh` | Adds `ci-wakeup-pr-after-merge` label to qualifying PRs after branch recreation |
106+
| `scripts/backport_to_staging.sh` | Cherry-picks a merged PR to a backport staging branch; creates/updates the backport PR |
106107

107108
### CI Configuration
108109

.claude/skills/updating-changelog/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Read `.release-please-manifest.json` to get the version (e.g., `{"." : "4.0.0"}`
1414
**Target files:**
1515

1616
- Aztec contract developers: `docs/docs-developers/docs/resources/migration_notes.md`
17-
- Node operators and Ethereum contract developers: `docs/docs-network/reference/changelog/v{major}.md`
17+
- Node operators and Ethereum contract developers: `docs/docs-operate/operators/reference/changelog/v{major}.md`
1818

1919
### 2. Analyze Branch Changes
2020

@@ -60,7 +60,7 @@ Explanation of what changed.
6060

6161
## Node Operator Changelog Format
6262

63-
**File:** `docs/docs-network/reference/changelog/v{major}.md`
63+
**File:** `docs/docs-operate/operators/reference/changelog/v{major}.md`
6464

6565
**Breaking changes:**
6666
````markdown

.github/ci3_labels_to_env.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,19 @@ function main {
8686
echo "SHOULD_UPLOAD_BENCHMARKS=1" >> $GITHUB_ENV
8787
fi
8888

89+
# Determine the branch label for benchmark publishing.
90+
# Only merge-queue runs targeting "next" publish under "next" since those represent code about to land.
91+
# Everything else (ci-full PRs, merge queues for other branches) publishes under "prs"
92+
# to avoid polluting the main benchmark graphs.
93+
local bench_branch
94+
if [[ ("$ci_mode" == "merge-queue" || "$ci_mode" == "merge-queue-heavy") && "$target_branch" == "next" ]]; then
95+
bench_branch="$target_branch"
96+
else
97+
bench_branch="prs"
98+
fi
99+
echo "BENCH_BRANCH=$bench_branch" >> $GITHUB_ENV
100+
echo "Bench branch: $bench_branch"
101+
89102
# Handle no-cache label
90103
if has_label "no-cache"; then
91104
echo "NO_CACHE=1" >> $GITHUB_ENV

.github/release-please-v4.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"release-type": "simple",
4+
"bump-minor-pre-major": true,
5+
"bump-patch-for-minor-pre-major": true,
6+
"group-pull-request-title-pattern": "chore(v4): Release ${version}",
7+
"pull-request-header": "Pending Aztec Packages v4 release",
8+
"versioning": "always-bump-patch",
9+
"include-component-in-tag": false,
10+
"release-search-depth": 50,
11+
"commit-search-depth": 150,
12+
"sequential-calls": true,
13+
"changelog-sections": [
14+
{ "type": "feat", "section": "Features", "hidden": false },
15+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
16+
{ "type": "chore", "section": "Miscellaneous", "hidden": false },
17+
{ "type": "test", "section": "Miscellaneous", "hidden": false },
18+
{ "type": "refactor", "section": "Miscellaneous", "hidden": false },
19+
{ "type": "docs", "section": "Documentation", "hidden": false }
20+
],
21+
"packages": {
22+
".": {
23+
"release-type": "simple"
24+
}
25+
}
26+
}

.github/workflows/backport.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ jobs:
7171
run: |
7272
TARGET_BRANCH="${{ steps.extract-branch.outputs.target_branch }}"
7373
STAGING_BRANCH="backport-to-${TARGET_BRANCH}-staging"
74-
COMMIT_COUNT=$(gh pr view "${{ github.event.pull_request.number }}" --json commits --jq '.commits | length')
74+
STAGING_PR=$(gh pr list --base "$TARGET_BRANCH" --head "$STAGING_BRANCH" --json number,url --jq '.[0]')
75+
STAGING_PR_NUMBER=$(echo "$STAGING_PR" | jq -r '.number')
76+
STAGING_PR_URL=$(echo "$STAGING_PR" | jq -r '.url')
7577
7678
gh pr comment "${{ github.event.pull_request.number }}" --body \
77-
"✅ Successfully cherry-picked $COMMIT_COUNT commit(s) to backport staging branch \`$STAGING_BRANCH\`."
79+
"✅ Successfully backported to [$STAGING_BRANCH #$STAGING_PR_NUMBER]($STAGING_PR_URL)."
7880
7981
- name: Comment on original PR (failure)
8082
if: steps.backport.outcome == 'failure'
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Nightly Debug Build
2+
3+
on:
4+
schedule:
5+
- cron: "0 5 * * *"
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: nightly-debug-build-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
debug-build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
18+
with:
19+
ref: next
20+
21+
- name: Run debug build
22+
timeout-minutes: 120
23+
env:
24+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
25+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
26+
GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
27+
BUILD_INSTANCE_SSH_KEY: ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
28+
RUN_ID: ${{ github.run_id }}
29+
run: |
30+
./.github/ci3.sh barretenberg-debug
31+
32+
- name: Notify Slack on failure
33+
if: failure() && github.event_name != 'workflow_dispatch'
34+
env:
35+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
36+
run: |
37+
if [ -n "${SLACK_BOT_TOKEN}" ]; then
38+
read -r -d '' data <<EOF || true
39+
{
40+
"channel": "#honk-team",
41+
"text": "Nightly debug build FAILED: <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run>"
42+
}
43+
EOF
44+
curl -X POST https://slack.com/api/chat.postMessage \
45+
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
46+
-H "Content-type: application/json" \
47+
--data "$data"
48+
fi

.github/workflows/ci3.yml

Lines changed: 105 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
8080
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
8181
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
82+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
8283
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
8384
# For automatic documentation updates via Claude Code
8485
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
@@ -94,6 +95,7 @@ jobs:
9495
PR_COMMITS: ${{ github.event.pull_request.commits }}
9596
PR_NUMBER: ${{ github.event.pull_request.number }}
9697
GITHUB_REF_NAME: ${{ github.ref_name }}
98+
GITHUB_ACTOR: ${{ github.actor }}
9799
# NOTE: $CI_MODE is set in the Determine CI Mode step.
98100
run: ./.github/ci3.sh $CI_MODE
99101

@@ -115,7 +117,7 @@ jobs:
115117
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
116118
with: &ci_benchmark_args
117119
name: Aztec Benchmarks
118-
benchmark-data-dir-path: "bench/${{ env.TARGET_BRANCH }}"
120+
benchmark-data-dir-path: "bench/${{ env.BENCH_BRANCH }}"
119121
tool: "customSmallerIsBetter"
120122
output-file-path: ./bench-out/bench.json
121123
gh-repository: github.com/AztecProtocol/benchmark-page-data
@@ -137,9 +139,10 @@ jobs:
137139
fail-fast: false
138140
matrix:
139141
test_set: ["1", "2"]
140-
# We run after a spartan release (from merge-train/spartan), or when the ci-network-scenario label is present in a PR.
142+
# We either run after a release (tag starting with v), or when the ci-network-scenario label is present in a PR.
143+
# We exclude ci-release-pr test tags (v0.0.1-commit.*) which are only for testing the release process.
141144
needs: ci
142-
if: github.event.pull_request.head.repo.fork != true && github.event.pull_request.draft == false && ((startsWith(github.ref, 'refs/tags/v') && contains(github.ref_name, '-spartan.')) || contains(github.event.pull_request.labels.*.name, 'ci-network-scenario'))
145+
if: github.event.pull_request.head.repo.fork != true && github.event.pull_request.draft == false && ((startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, '-commit.')) || contains(github.event.pull_request.labels.*.name, 'ci-network-scenario'))
143146
steps:
144147
- name: Remove label (one-time use)
145148
if: github.event.pull_request && contains(github.event.pull_request.labels.*.name, 'ci-network-scenario')
@@ -186,8 +189,8 @@ jobs:
186189
./.github/ci3.sh network-scenarios next-scenario "$namespace" "$docker_image" "${{ matrix.test_set }}"
187190
188191
- name: Cleanup network resources
189-
# Clean up if this is a CI label or spartan.
190-
if: always() && (!startsWith(github.ref, 'refs/tags/v') || contains(github.ref_name, '-spartan.'))
192+
# Clean up if this is a CI label or nightly.
193+
if: always() && (!startsWith(github.ref, 'refs/tags/v') || contains(github.ref_name, '-nightly.'))
191194
env:
192195
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
193196
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -235,6 +238,103 @@ jobs:
235238
--data "$data"
236239
fi
237240
241+
# Spartan network benchmarks triggered on-demand from a PR label.
242+
# Runs TPS and proving benchmarks in parallel, uploads results to a PR-specific
243+
# path on the benchmark dashboard so nightly (bench/next) is never affected.
244+
# One-time use: label is removed after the job runs.
245+
ci-network-bench:
246+
name: ${{ matrix.bench_type }}
247+
runs-on: ubuntu-latest
248+
strategy:
249+
fail-fast: false
250+
matrix:
251+
include:
252+
- bench_type: benchmark
253+
ci3_cmd: network-bench
254+
scenario: tps-scenario
255+
namespace_suffix: bench
256+
download_cmd: gh-spartan-bench
257+
timeout: 300
258+
- bench_type: proving-benchmark
259+
ci3_cmd: network-proving-bench
260+
scenario: prove-n-tps-fake
261+
namespace_suffix: proving-bench
262+
download_cmd: gh-spartan-proving-bench
263+
timeout: 240
264+
needs: ci
265+
if: github.event.pull_request.head.repo.fork != true && github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'ci-network-bench') && (needs.ci.result == 'success' || needs.ci.result == 'skipped')
266+
steps:
267+
- name: Remove label (one-time use)
268+
env:
269+
GH_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
270+
run: gh pr edit ${{ github.event.pull_request.number }} --remove-label ci-network-bench --repo ${{ github.repository }} || true
271+
272+
- name: Checkout
273+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
274+
with:
275+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
276+
277+
- name: Run Network Benchmarks
278+
timeout-minutes: ${{ matrix.timeout }}
279+
env:
280+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
281+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
282+
GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
283+
BUILD_INSTANCE_SSH_KEY: ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
284+
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
285+
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
286+
# For pushing docker images built from the PR
287+
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
288+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
289+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
290+
RUN_ID: ${{ github.run_id }}
291+
AWS_SHUTDOWN_TIME: ${{ matrix.timeout }}
292+
NO_SPOT: 1
293+
run: |
294+
namespace=pr-${{ github.event.pull_request.number }}-${{ matrix.namespace_suffix }}
295+
echo "NAMESPACE=$namespace" >> $GITHUB_ENV
296+
set -x
297+
./.github/ci3.sh ${{ matrix.ci3_cmd }} ${{ matrix.scenario }} "$namespace"
298+
299+
- name: Cleanup network resources
300+
if: always()
301+
env:
302+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
303+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
304+
GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
305+
BUILD_INSTANCE_SSH_KEY: ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
306+
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
307+
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
308+
NO_SPOT: 1
309+
run: ./.github/ci3.sh network-teardown ${{ matrix.scenario }} "${NAMESPACE}" || true
310+
311+
- name: Download benchmarks
312+
if: always()
313+
env:
314+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
315+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
316+
run: |
317+
if ./ci.sh ${{ matrix.download_cmd }}; then
318+
echo "ENABLE_DEPLOY_BENCH=1" >> $GITHUB_ENV
319+
fi
320+
321+
- name: Upload benchmarks
322+
if: always() && env.ENABLE_DEPLOY_BENCH == '1'
323+
uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29
324+
with:
325+
name: Spartan
326+
benchmark-data-dir-path: "bench/pr-${{ github.event.pull_request.number }}"
327+
tool: "customSmallerIsBetter"
328+
output-file-path: ./bench-out/bench.json
329+
gh-repository: github.com/AztecProtocol/benchmark-page-data
330+
github-token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
331+
auto-push: true
332+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
333+
alert-threshold: "120%"
334+
comment-on-alert: false
335+
fail-on-alert: false
336+
max-items-in-chart: 100
337+
238338
# KIND-based e2e tests that run on a local Kubernetes cluster.
239339
# One-time use: label is removed after the job runs.
240340
ci-network-kind:

.github/workflows/deploy-network.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ jobs:
149149
NAMESPACE: ${{ inputs.namespace }}
150150
AZTEC_DOCKER_IMAGE: "aztecprotocol/aztec:${{ inputs.docker_image_tag || inputs.semver }}"
151151
CREATE_ROLLUP_CONTRACTS: ${{ inputs.deploy_contracts == true && 'true' || '' }}
152-
USE_NETWORK_CONFIG: ${{ inputs.deploy_contracts == true && 'false' || '' }}
153152
PROVER_AGENT_DOCKER_IMAGE: "aztecprotocol/aztec-prover-agent:${{ inputs.docker_image_tag || inputs.semver }}"
154153
run: |
155154
echo "Deploying network: ${{ inputs.network }}"

.github/workflows/deploy-next-net.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Deploy next-net environment from merge-train/spartan
1+
# Deploy next-net environment
22
# This workflow deploys the next-net environment with a specified version
3-
# Runs nightly with the latest spartan nightly tag, or can be manually triggered with any image
3+
# Runs nightly with the latest nightly tag, or can be manually triggered with any image
44
name: Deploy Next Net
55

66
on:
@@ -10,7 +10,7 @@ on:
1010
workflow_dispatch:
1111
inputs:
1212
image_tag:
13-
description: 'Docker image tag (e.g., 2.3.4, 3.0.0-spartan.20251004-amd64, or leave empty for latest spartan nightly)'
13+
description: 'Docker image tag (e.g., 2.3.4, 3.0.0-nightly.20251004-amd64, or leave empty for latest nightly)'
1414
required: false
1515
type: string
1616

@@ -27,8 +27,6 @@ jobs:
2727

2828
steps:
2929
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
30-
with:
31-
ref: merge-train/spartan
3230

3331
- name: Determine image tag
3432
id: determine_tag
@@ -38,22 +36,22 @@ jobs:
3836
TAG="${{ inputs.image_tag }}"
3937
echo "Using manually specified tag: $TAG"
4038
41-
# Extract semver (remove -amd64 suffix if present, remove -spartan.YYYYMMDD if present)
42-
SEMVER=$(echo "$TAG" | sed 's/-amd64$//' | sed 's/-spartan\.[0-9]\{8\}//')
39+
# Extract semver (remove -amd64 suffix if present, remove -nightly.YYYYMMDD if present)
40+
SEMVER=$(echo "$TAG" | sed 's/-amd64$//' | sed 's/-nightly\.[0-9]\{8\}//')
4341
else
44-
# Scheduled nightly run - get latest spartan nightly tag
42+
# Scheduled nightly run - get latest nightly tag
4543
current_version=$(jq -r '."."' .release-please-manifest.json)
4644
echo "Current version: $current_version"
4745
48-
# Format the tag as: <current_version>-spartan.<YYYYMMDD>-amd64
49-
nightly_tag="${current_version}-spartan.$(date -u +%Y%m%d)-amd64"
46+
# Format the tag as: <current_version>-nightly.<YYYYMMDD>-amd64
47+
nightly_tag="${current_version}-nightly.$(date -u +%Y%m%d)-amd64"
5048
5149
# Check if the tag exists on docker hub
5250
TAGS=$(curl -s https://registry.hub.docker.com/v2/repositories/aztecprotocol/aztec/tags/$nightly_tag)
5351
if [[ "$TAGS" != *"not found"* ]]; then
5452
TAG="$nightly_tag"
5553
SEMVER="$current_version"
56-
echo "Using spartan nightly tag: $TAG"
54+
echo "Using nightly tag: $TAG"
5755
else
5856
echo "Error: Tag $nightly_tag not published to docker hub"
5957
exit 1
@@ -70,5 +68,5 @@ jobs:
7068
network: next-net
7169
semver: ${{ needs.get-image-tag.outputs.semver }}
7270
docker_image_tag: ${{ needs.get-image-tag.outputs.tag }}
73-
ref: merge-train/spartan
71+
ref: ${{ github.ref }}
7472
secrets: inherit

0 commit comments

Comments
 (0)