Skip to content

Commit 289aaec

Browse files
authored
Merge pull request #523 from AztecProtocol/cb/merge-public-v5-next-raw
chore: merge public-v5-next into v5-next (raw, conflict markers) [PR 1/2]
2 parents d5151c0 + fb1690a commit 289aaec

779 files changed

Lines changed: 34734 additions & 16579 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.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Bench Inclusion Point
2+
3+
# Reusable: runs ONE inclusion-sweep TPS point against an ALREADY-DEPLOYED
4+
# network (SKIP_NETWORK_DEPLOY=1). The caller (nightly-bench-inclusion-sweep.yml)
5+
# deploys the network once and calls this for each point (1/5/10 TPS), chaining
6+
# the calls so the points run sequentially on the same network. Deploy / wait /
7+
# teardown are done once by the caller, not here.
8+
9+
on:
10+
workflow_call:
11+
inputs:
12+
tps:
13+
description: "Target TPS for this point"
14+
required: true
15+
type: string
16+
namespace:
17+
description: "k8s namespace of the already-deployed network"
18+
required: true
19+
type: string
20+
network:
21+
description: "Network env name (environments/<network>.env)"
22+
required: false
23+
type: string
24+
default: bench-inclusion-sweep
25+
docker_image:
26+
description: "Full aztec docker image (already deployed)"
27+
required: true
28+
type: string
29+
source_ref:
30+
description: "Git ref to checkout for the bench scripts"
31+
required: true
32+
type: string
33+
sweep_id:
34+
description: "Shared sweep id so the dashboard groups the points"
35+
required: true
36+
type: string
37+
38+
jobs:
39+
bench:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
43+
with:
44+
ref: ${{ inputs.source_ref }}
45+
- name: Run ${{ inputs.tps }} TPS inclusion point
46+
timeout-minutes: 120
47+
env:
48+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
49+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
50+
GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
51+
BUILD_INSTANCE_SSH_KEY: ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
52+
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
53+
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
54+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
55+
RUN_ID: ${{ github.run_id }}
56+
AWS_SHUTDOWN_TIME: 180
57+
NO_SPOT: 1
58+
SKIP_NETWORK_DEPLOY: "1"
59+
TARGET_TPS: ${{ inputs.tps }}
60+
BENCH_SWEEP_ID: ${{ inputs.sweep_id }}
61+
BENCH_SWEEP_LABEL: inclusion-sweep
62+
run: ./.github/ci3.sh network-inclusion-sweep ${{ inputs.network }} ${{ inputs.namespace }} "${{ inputs.docker_image }}"

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
branch="${{ github.ref_name }}"
2525
2626
# 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.
27+
# with -v<N> (e.g. spartan-v5, fairies-v5, spartan-v6) target the
28+
# matching release line (v5-next, v6-next) instead.
2929
base_branch="next"
30-
if [[ "$branch" == *-v5 ]]; then
31-
base_branch="v5-next"
30+
if [[ "$branch" =~ -v([0-9]+)$ ]]; then
31+
base_branch="v${BASH_REMATCH[1]}-next"
3232
fi
3333
3434
# Skip if this is a merge commit (check for multiple parents)
@@ -52,7 +52,7 @@ jobs:
5252
5353
# Create PR with ci-no-squash label
5454
labels="ci-no-squash"
55-
if [[ "$branch" == "merge-train/spartan" || "$branch" == "merge-train/spartan-v5" || "$branch" == "merge-train/ci" ]]; then
55+
if [[ "$branch" == "merge-train/spartan" || "$branch" == "merge-train/spartan-v5" || "$branch" == "merge-train/spartan-v6" || "$branch" == "merge-train/ci" ]]; then
5656
labels="$labels,ci-full-no-test-cache"
5757
fi
5858
# Trains targeting the v5 release line are ports into v5-next.

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- next
77
- v5-next
8+
- v6-next
89

910
jobs:
1011
merge-to-trains:
@@ -27,13 +28,17 @@ jobs:
2728
GH_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
2829
COMMIT_SHA: ${{ github.sha }}
2930
run: |
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.
31+
# The -v<N> trains track the matching release line (v5-next, v6-next);
32+
# every other train tracks next. Sync only the trains fed by the
33+
# branch that was just pushed.
3334
if [[ "${{ github.ref_name }}" == "v5-next" ]]; then
3435
for branch in merge-train/spartan-v5 merge-train/fairies-v5; do
3536
./scripts/merge-train/merge-next.sh "$branch" v5-next || true
3637
done
38+
elif [[ "${{ github.ref_name }}" == "v6-next" ]]; then
39+
for branch in merge-train/spartan-v6; do
40+
./scripts/merge-train/merge-next.sh "$branch" v6-next || true
41+
done
3742
else
3843
for branch in merge-train/avm merge-train/barretenberg merge-train/ci merge-train/docs merge-train/fairies merge-train/spartan; do
3944
./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
@@ -36,6 +36,21 @@ jobs:
3636
BASE_BRANCH: v5-next
3737
run: ./ci3/merge_train_stale_check merge-train/spartan-v5 '#team-alpha'
3838

39+
spartan-v6:
40+
name: Check merge-train/spartan-v6
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: v6-next
52+
run: ./ci3/merge_train_stale_check merge-train/spartan-v6 '#team-alpha'
53+
3954
fairies-v5:
4055
name: Check merge-train/fairies-v5
4156
runs-on: ubuntu-latest
Lines changed: 82 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
name: Nightly Bench 10 TPS
1+
name: Nightly Bench Inclusion Sweep
2+
3+
# Inclusion sweep: deploys ONE network and runs the
4+
# 1/5/10 TPS points SEQUENTIALLY against it, all tagged with a shared sweepId so
5+
# the dashboard groups them. The scraper drains the mempool to zero between
6+
# points. Each point is the reusable bench-inclusion-point.yml workflow
7+
# (SKIP_NETWORK_DEPLOY=1); the next point's call `needs` the previous one so they
8+
# don't overlap. Deploy / wait-for-first-block / teardown happen once.
29

310
on:
411
schedule:
5-
- cron: "30 6 * * *"
12+
- cron: "30 3 * * *"
613
workflow_dispatch:
714
inputs:
815
docker_image:
@@ -19,7 +26,7 @@ on:
1926
type: string
2027

2128
concurrency:
22-
group: nightly-bench-10tps-${{ github.ref }}
29+
group: nightly-bench-inclusion-sweep-${{ github.ref }}
2330
cancel-in-progress: true
2431

2532
jobs:
@@ -29,6 +36,7 @@ jobs:
2936
docker_image: ${{ steps.docker-image.outputs.docker_image }}
3037
image_label: ${{ steps.docker-image.outputs.image_label }}
3138
source_ref: ${{ steps.docker-image.outputs.source_ref }}
39+
sweep_id: ${{ steps.sweep.outputs.sweep_id }}
3240
steps:
3341
- name: Checkout
3442
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
@@ -71,130 +79,132 @@ jobs:
7179
echo "Using source ref: $source_ref"
7280
7381
- name: Verify source git ref
74-
id: verify-source
7582
run: |
7683
set -euo pipefail
7784
source_ref="${{ steps.docker-image.outputs.source_ref }}"
7885
git fetch --depth 1 origin "refs/tags/${source_ref}:refs/tags/${source_ref}"
79-
source_sha=$(git rev-parse "${source_ref}^{}")
80-
echo "Nightly source commit: $source_sha"
86+
git rev-parse "${source_ref}^{}"
8187
8288
- name: Check if Docker image exists
8389
run: |
8490
DOCKER_IMAGE="${{ steps.docker-image.outputs.docker_image }}"
85-
echo "Checking if Docker image exists: $DOCKER_IMAGE"
8691
if docker manifest inspect "$DOCKER_IMAGE" > /dev/null 2>&1; then
8792
echo "Docker image exists: $DOCKER_IMAGE"
8893
else
8994
echo "Docker image does not exist: $DOCKER_IMAGE"
9095
exit 1
9196
fi
9297
93-
deploy-bench-10tps-network:
98+
- name: Compute shared sweep id
99+
id: sweep
100+
run: |
101+
# Shared across all three points so the dashboard groups the sweep.
102+
echo "sweep_id=incl-$(date -u +%Y%m%d)-${{ github.run_id }}" >> "$GITHUB_OUTPUT"
103+
104+
# ---- Deploy the single network the whole sweep runs against ----
105+
deploy:
94106
needs: select-image
95107
uses: ./.github/workflows/deploy-network.yml
96108
with:
97-
network: bench-10tps
98-
namespace: bench-10tps
109+
network: bench-inclusion-sweep
110+
namespace: bench-inclusion-sweep
99111
aztec_docker_image: ${{ needs.select-image.outputs.docker_image }}
100112
ref: ${{ needs.select-image.outputs.source_ref }}
101113
notify_on_failure: false
102114
secrets: inherit
103115

104-
wait-for-first-l2-block:
105-
needs:
106-
- select-image
107-
- deploy-bench-10tps-network
116+
wait:
117+
needs: [select-image, deploy]
108118
runs-on: ubuntu-latest
109119
timeout-minutes: 120
110120
steps:
111-
- name: Checkout
112-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
121+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
113122
with:
114123
ref: ${{ needs.select-image.outputs.source_ref }}
115-
116-
- name: Authenticate to Google Cloud
117-
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
124+
- uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
118125
with:
119126
credentials_json: ${{ secrets.GCP_SA_KEY }}
120-
121-
- name: Set up Cloud SDK
122-
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
127+
- uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
123128
with:
124129
install_components: gke-gcloud-auth-plugin
125-
126130
- name: Wait for first L2 block
127131
env:
128132
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
129-
run: |
130-
cd spartan
131-
./bootstrap.sh wait_for_l2_block bench-10tps
133+
NAMESPACE: bench-inclusion-sweep
134+
run: cd spartan && ./bootstrap.sh wait_for_l2_block bench-inclusion-sweep
132135

133-
benchmark:
134-
needs:
135-
- select-image
136-
- wait-for-first-l2-block
136+
# ---- Three points, sequential, on the SAME network ----
137+
point-1tps:
138+
needs: [select-image, wait]
139+
uses: ./.github/workflows/bench-inclusion-point.yml
140+
with:
141+
tps: "1"
142+
namespace: bench-inclusion-sweep
143+
docker_image: ${{ needs.select-image.outputs.docker_image }}
144+
source_ref: ${{ needs.select-image.outputs.source_ref }}
145+
sweep_id: ${{ needs.select-image.outputs.sweep_id }}
146+
secrets: inherit
147+
148+
# 5 TPS runs after 1 TPS finishes — gated on the network being up (wait), not
149+
# on the 1 TPS result, so a failed point drops only itself.
150+
point-5tps:
151+
needs: [select-image, wait, point-1tps]
152+
if: ${{ !cancelled() && needs.wait.result == 'success' }}
153+
uses: ./.github/workflows/bench-inclusion-point.yml
154+
with:
155+
tps: "5"
156+
namespace: bench-inclusion-sweep
157+
docker_image: ${{ needs.select-image.outputs.docker_image }}
158+
source_ref: ${{ needs.select-image.outputs.source_ref }}
159+
sweep_id: ${{ needs.select-image.outputs.sweep_id }}
160+
secrets: inherit
161+
162+
point-10tps:
163+
needs: [select-image, wait, point-5tps]
164+
if: ${{ !cancelled() && needs.wait.result == 'success' }}
165+
uses: ./.github/workflows/bench-inclusion-point.yml
166+
with:
167+
tps: "10"
168+
namespace: bench-inclusion-sweep
169+
docker_image: ${{ needs.select-image.outputs.docker_image }}
170+
source_ref: ${{ needs.select-image.outputs.source_ref }}
171+
sweep_id: ${{ needs.select-image.outputs.sweep_id }}
172+
secrets: inherit
173+
174+
# ---- Tear the network down once, regardless of point outcomes ----
175+
cleanup:
176+
if: always()
177+
needs: [select-image, deploy, wait, point-1tps, point-5tps, point-10tps]
137178
runs-on: ubuntu-latest
138179
steps:
139-
- name: Checkout
140-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
180+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
141181
with:
142182
ref: ${{ needs.select-image.outputs.source_ref }}
143-
144-
- name: Run 10 TPS benchmark
145-
timeout-minutes: 240
183+
- name: Cleanup network resources
146184
env:
147185
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
148186
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
149187
GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
150188
BUILD_INSTANCE_SSH_KEY: ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
151189
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
152190
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
153-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
154-
RUN_ID: ${{ github.run_id }}
155-
AWS_SHUTDOWN_TIME: 240
156191
NO_SPOT: 1
157-
SKIP_NETWORK_DEPLOY: "1"
158-
run: |
159-
./.github/ci3.sh network-bench-10tps bench-10tps bench-10tps "${{ needs.select-image.outputs.docker_image }}"
160-
161-
cleanup:
162-
if: always()
163-
needs:
164-
- select-image
165-
- deploy-bench-10tps-network
166-
- wait-for-first-l2-block
167-
- benchmark
168-
runs-on: ubuntu-latest
169-
steps:
170-
- name: Checkout
171-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
172-
with:
173-
ref: ${{ needs.select-image.outputs.source_ref }}
174-
175-
- name: Cleanup network resources
176-
uses: ./.github/actions/network-teardown
177-
with:
178-
env_file: bench-10tps
179-
namespace: bench-10tps
180-
gcp_sa_key: ${{ secrets.GCP_SA_KEY }}
181-
gcp_project_id: ${{ secrets.GCP_PROJECT_ID }}
192+
run: ./.github/ci3.sh network-teardown bench-inclusion-sweep bench-inclusion-sweep
182193

183194
notify-failure:
184195
if: ${{ always() && failure() && github.event_name != 'workflow_dispatch' }}
185196
needs:
186197
- select-image
187-
- deploy-bench-10tps-network
188-
- wait-for-first-l2-block
189-
- benchmark
190-
- cleanup
198+
- deploy
199+
- wait
200+
- point-1tps
201+
- point-5tps
202+
- point-10tps
191203
runs-on: ubuntu-latest
192204
steps:
193-
- name: Checkout
194-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
205+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
195206
with:
196207
ref: ${{ needs.select-image.outputs.source_ref }}
197-
198208
- name: Notify Slack on failure
199209
env:
200210
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
@@ -203,6 +213,6 @@ jobs:
203213
IMAGE="${{ needs.select-image.outputs.image_label || 'unknown' }}"
204214
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
205215
./ci3/slack_notify_with_claudebox_kickoff "#alerts-next-scenario" \
206-
"Nightly 10 TPS benchmark FAILED (image ${IMAGE}): <${RUN_URL}|View Run> (🤖)" \
207-
"Nightly 10 TPS benchmark failed (image ${IMAGE}). CI run: ${RUN_URL}. Investigate the benchmark failure and identify the root cause." \
216+
"Nightly inclusion sweep FAILED (image ${IMAGE}): <${RUN_URL}|View Run> (🤖)" \
217+
"Nightly inclusion sweep failed (image ${IMAGE}). CI run: ${RUN_URL}. Deploy/wait failures fail the whole sweep; a failed individual point drops only that point." \
208218
--link "$RUN_URL"

.github/workflows/pull-request-title.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
types: |
2929
fix
3030
feat
31+
perf
3132
chore
3233
refactor
3334
docs

0 commit comments

Comments
 (0)