Skip to content

Commit a438a66

Browse files
committed
Merge remote-tracking branch 'origin/v5-next' into backport-to-v5-next-staging
2 parents 54e6b36 + b8ac769 commit a438a66

306 files changed

Lines changed: 7891 additions & 8038 deletions

File tree

Some content is hidden

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

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ This skill covers the automation internals of the merge-train system. For contri
1111

1212
The merge-train system is fully automated via GitHub Actions in `.github/workflows/merge-train-*.yml`:
1313

14-
1. **PR Creation** (`merge-train-create-pr.yml`): Triggered on push to `merge-train/*` branches. Creates a PR targeting `next` (or `v5-next` for `merge-train/spartan-v5`) with the `ci-no-squash` label (and `ci-full-no-test-cache` for `merge-train/spartan`, `merge-train/spartan-v5`, and `merge-train/ci`). Skips merge commits and commits already in the base branch.
14+
1. **PR Creation** (`merge-train-create-pr.yml`): Triggered on push to `merge-train/*` branches. Creates a PR targeting `next` (or `v5-next` for `-v5` trains such as `merge-train/spartan-v5` and `merge-train/fairies-v5`) with the `ci-no-squash` label (plus `private-port-next` for any train that targets `v5-next`, and `ci-full-no-test-cache` for `merge-train/spartan`, `merge-train/spartan-v5`, and `merge-train/ci`). Skips merge commits and commits already in the base branch.
1515

1616
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 wraps the commit list in `BEGIN_COMMIT_OVERRIDE` / `END_COMMIT_OVERRIDE` markers. 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

18-
3. **Next Integration** (`merge-train-next-to-branches.yml`): Triggered on push to `next` and `v5-next`. A push to `next` merges `next` into each `next`-based train; a push to `v5-next` merges `v5-next` into `merge-train/spartan-v5`. Both go through `scripts/merge-train/merge-next.sh`, which takes an optional second argument for the source branch (defaults to `next`). Uses `continue-on-error: true` so a conflict in one branch does not block others. Skips branches whose PR already has auto-merge enabled.
18+
3. **Next Integration** (`merge-train-next-to-branches.yml`): Triggered on push to `next` and `v5-next`. A push to `next` merges `next` into each `next`-based train; a push to `v5-next` merges `v5-next` into the `-v5` trains (`merge-train/spartan-v5`, `merge-train/fairies-v5`). Both go through `scripts/merge-train/merge-next.sh`, which takes an optional second argument for the source branch (defaults to `next`). 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

2020
4. **Auto-Merge** (`merge-train-auto-merge.yml`): Runs hourly via cron (`0 * * * *`). Calls `scripts/merge-train/auto-merge.sh` for both merge-train (4-hour inactivity) and backport-train (8-hour inactivity) branches. Uses separate GitHub tokens: `AZTEC_BOT_GITHUB_TOKEN` for API calls and `MERGE_TRAIN_GITHUB_TOKEN` for approvals. Will not auto-merge if the last merge-queue CI run failed or was cancelled.
2121

@@ -73,9 +73,9 @@ When a CI run fails on an EC2 instance, it calls `merge_train_failure_slack_noti
7373

7474
## Creating a New Merge Train
7575

76-
1. Create a branch from the desired base (`next` for most trains; a release line like `v5-next` for a release-specific train) with naming pattern `merge-train/{team}`
77-
2. Add the branch to the loop in `.github/workflows/merge-train-next-to-branches.yml`. If it tracks a base branch other than `next`, also add that base to the workflow's `push` trigger and pass it as the second argument to `merge-next.sh` (see the `merge-train/spartan-v5` → `v5-next` wiring)
78-
3. If the base is not `next`, set the PR base in `.github/workflows/merge-train-create-pr.yml` and pass `BASE_BRANCH` to the stale check in `.github/workflows/merge-train-stale-check.yml`
76+
1. Create a branch from the desired base (`next` for most trains; a release line like `v5-next` for a release-specific train) with naming pattern `merge-train/{team}`. For a v5-release train use the `-v5` suffix (`merge-train/{team}-v5`): `merge-train-create-pr.yml` routes any `*-v5` branch to a `v5-next` base automatically and adds the `private-port-next` label.
77+
2. Add the branch to the loop in `.github/workflows/merge-train-next-to-branches.yml`. If it tracks a base branch other than `next`, also add that base to the workflow's `push` trigger and pass it as the second argument to `merge-next.sh` (see the `v5-next` → `-v5` trains wiring)
78+
3. For a base other than `next` that the `*-v5` convention does not already cover, set the PR base in `.github/workflows/merge-train-create-pr.yml`. Either way, add a stale-check job that passes `BASE_BRANCH` in `.github/workflows/merge-train-stale-check.yml`
7979
4. Add the branch-to-Slack-channel mapping in `ci3/merge_train_failure_slack_notify`
8080
5. Optionally add CI mode overrides in `.github/ci3_labels_to_env.sh` and `bootstrap.sh`
8181
6. Push code to the branch -- automation handles PR creation from there

.claude/skills/merge-trains/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ A merge train is an automated batching system (inspired by [Rust rollups](https:
2020
| `merge-train/fairies` | aztec-nr | `#team-fairies` |
2121
| `merge-train/spartan` | Spartan / infra / yarn-project sequencer and prover orchestration | `#team-alpha` |
2222
| `merge-train/spartan-v5` | Same as `merge-train/spartan` but for the v5 release line (targets `v5-next` instead of `next`) | `#team-alpha` |
23+
| `merge-train/fairies-v5` | Same as `merge-train/fairies` (aztec-nr) but for the v5 release line (targets `v5-next` instead of `next`) | `#team-fairies` |
2324

24-
> Every train targets `next` except `merge-train/spartan-v5`, which targets `v5-next`.
25+
> Trains target `next`, except the `-v5` trains (`merge-train/spartan-v5`, `merge-train/fairies-v5`), which target `v5-next`. Train PRs that target `v5-next` are auto-labeled `private-port-next` in addition to `ci-no-squash`.
2526
2627
## How to Use a Merge Train
2728

.github/workflows/merge-train-create-pr.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ jobs:
2323
run: |
2424
branch="${{ github.ref_name }}"
2525
26-
# Determine base branch. Most trains target next; the spartan-v5
27-
# train targets the v5 release line (v5-next) instead.
26+
# Determine base branch. Most trains target next; trains suffixed
27+
# with -v5 (e.g. spartan-v5, fairies-v5) target the v5 release line
28+
# (v5-next) instead.
2829
base_branch="next"
29-
if [[ "$branch" == "merge-train/spartan-v5" ]]; then
30+
if [[ "$branch" == *-v5 ]]; then
3031
base_branch="v5-next"
3132
fi
3233
@@ -54,6 +55,10 @@ jobs:
5455
if [[ "$branch" == "merge-train/spartan" || "$branch" == "merge-train/spartan-v5" || "$branch" == "merge-train/ci" ]]; then
5556
labels="$labels,ci-full-no-test-cache"
5657
fi
58+
# Trains targeting the v5 release line are ports into v5-next.
59+
if [[ "$base_branch" == "v5-next" ]]; then
60+
labels="$labels,private-port-next"
61+
fi
5762
gh pr create --base "$base_branch" --head "$branch" \
5863
--title "feat: $branch" \
5964
--body "$(echo -e "See [merge-train-readme.md](https://github.com/${{ github.repository }}/blob/next/.github/workflows/merge-train-readme.md).\nThis is a merge-train.")" \

.github/workflows/merge-train-next-to-branches.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ jobs:
2727
GH_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
2828
COMMIT_SHA: ${{ github.sha }}
2929
run: |
30-
# The spartan-v5 train tracks the v5 release line (v5-next); every
31-
# other train tracks next. Sync only the trains fed by the branch
32-
# that was just pushed.
30+
# The -v5 trains track the v5 release line (v5-next); every other
31+
# train tracks next. Sync only the trains fed by the branch that was
32+
# just pushed.
3333
if [[ "${{ github.ref_name }}" == "v5-next" ]]; then
34-
./scripts/merge-train/merge-next.sh merge-train/spartan-v5 v5-next || true
34+
for branch in merge-train/spartan-v5 merge-train/fairies-v5; do
35+
./scripts/merge-train/merge-next.sh "$branch" v5-next || true
36+
done
3537
else
3638
for branch in merge-train/avm merge-train/barretenberg merge-train/ci merge-train/docs merge-train/fairies merge-train/spartan; do
3739
./scripts/merge-train/merge-next.sh "$branch" || true

.github/workflows/merge-train-stale-check.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,18 @@ jobs:
3535
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
3636
BASE_BRANCH: v5-next
3737
run: ./ci3/merge_train_stale_check merge-train/spartan-v5 '#team-alpha'
38+
39+
fairies-v5:
40+
name: Check merge-train/fairies-v5
41+
runs-on: ubuntu-latest
42+
permissions:
43+
contents: read
44+
pull-requests: read
45+
steps:
46+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
47+
- name: Run stale check
48+
env:
49+
GH_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
50+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
51+
BASE_BRANCH: v5-next
52+
run: ./ci3/merge_train_stale_check merge-train/fairies-v5 '#team-fairies'

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ endef
5555

5656
# Fast bootstrap.
5757
fast: release-image barretenberg boxes playground docs aztec-up \
58-
bb-tests l1-contracts-tests yarn-project-tests boxes-tests playground-tests aztec-up-tests docs-tests noir-protocol-circuits-tests release-image-tests spartan claude-tests
58+
bb-tests l1-contracts-tests yarn-project-tests boxes-tests playground-tests aztec-up-tests docs-tests noir-protocol-circuits-tests contract-snapshots-tests release-image-tests spartan claude-tests
5959

6060
# Full bootstrap.
6161
full: fast bb-full-tests bb-cpp-full yarn-project-benches
@@ -308,6 +308,9 @@ noir-projects-txe-tests:
308308
$(call test,$@,noir-projects/aztec-nr)
309309
$(call test,$@,noir-projects/noir-contracts)
310310

311+
contract-snapshots-tests: noir
312+
$(call test,$@,noir-projects/contract-snapshots)
313+
311314
# Noir Projects - Aggregate target (builds all sub-projects)
312315
noir-projects: noir-protocol-circuits mock-protocol-circuits noir-contracts aztec-nr
313316

avm-transpiler/src/transpile.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ fn handle_foreign_call(
563563
"aztec_avm_revert" => handle_revert(avm_instrs, destinations, inputs),
564564
"aztec_avm_storageRead" => handle_storage_read(avm_instrs, destinations, inputs),
565565
"aztec_avm_storageWrite" => handle_storage_write(avm_instrs, destinations, inputs),
566-
"aztec_utl_log" => handle_debug_log(avm_instrs, destinations, inputs),
566+
"aztec_misc_log" => handle_debug_log(avm_instrs, destinations, inputs),
567567
// Getters.
568568
_ if inputs.is_empty() && destinations.len() == 1 => {
569569
handle_getter_instruction(avm_instrs, function, destinations, inputs);
@@ -1341,7 +1341,7 @@ fn handle_debug_log(
13411341
) {
13421342
// We need to handle two flavors here:
13431343
//
1344-
// #[oracle(aztec_utl_log)]
1344+
// #[oracle(aztec_misc_log)]
13451345
// unconstrained fn log_oracle<let M: u32, let N: u32>(
13461346
// log_level: u8,
13471347
// msg: str<M>,
@@ -1351,7 +1351,7 @@ fn handle_debug_log(
13511351
//
13521352
// and
13531353
//
1354-
//#[oracle(aztec_utl_log)]
1354+
//#[oracle(aztec_misc_log)]
13551355
// unconstrained fn log_slice_oracle<let M: u32>(log_level: u8, msg: str<M>, args: [Field]) {}
13561356
//
13571357
// Luckily, these two flavors have both 4 arguments, since noir inserts a length field for slices before the slice.

boxes/boxes/react/src/contracts/src/main.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use aztec::macros::aztec;
44
contract BoxReact {
55
use aztec::{
66
macros::{functions::{external, initializer}, storage::storage},
7-
messages::message_delivery::MessageDelivery,
7+
messages::delivery::MessageDelivery,
88
protocol::address::AztecAddress,
99
state_vars::{Owned, PrivateMutable},
1010
};

boxes/boxes/vite/src/contracts/src/main.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use aztec::macros::aztec;
44
contract BoxReact {
55
use aztec::{
66
macros::{functions::{external, initializer}, storage::storage},
7-
messages::message_delivery::MessageDelivery,
7+
messages::delivery::MessageDelivery,
88
protocol::address::AztecAddress,
99
state_vars::{Owned, PrivateMutable},
1010
};

ci3/merge_train_failure_slack_notify

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ elif [[ "$REF_NAME" == "merge-train/docs" ]]; then
3333
channel="#dev-rels"
3434
elif [[ "$REF_NAME" == "merge-train/fairies" ]]; then
3535
channel="#team-fairies"
36+
elif [[ "$REF_NAME" == "merge-train/fairies-v5" ]]; then
37+
channel="#team-fairies"
3638
elif [[ "$REF_NAME" == "merge-train/spartan" ]]; then
3739
channel="#team-alpha"
3840
elif [[ "$REF_NAME" == "merge-train/spartan-v5" ]]; then

0 commit comments

Comments
 (0)