Skip to content

Commit 9039fa2

Browse files
authored
Merge pull request #446 from AztecProtocol/cb/private-port-next-4
chore(port): combined private-port-next forward-port stack (all pending v5 blocks) → next
2 parents d0352a1 + 7882a61 commit 9039fa2

986 files changed

Lines changed: 45847 additions & 24755 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 }}"
Lines changed: 88 additions & 92 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,17 +26,20 @@ 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:
2633
select-image:
34+
# Scheduled runs only fire on the public repo; on the private mirror this is a no-op
35+
# (matches the guard the prior nightly-bench-10tps.yml workflow carried on this line).
2736
if: ${{ github.event_name != 'schedule' || github.repository == 'AztecProtocol/aztec-packages' }}
2837
runs-on: ubuntu-latest
2938
outputs:
3039
docker_image: ${{ steps.docker-image.outputs.docker_image }}
3140
image_label: ${{ steps.docker-image.outputs.image_label }}
3241
source_ref: ${{ steps.docker-image.outputs.source_ref }}
42+
sweep_id: ${{ steps.sweep.outputs.sweep_id }}
3343
steps:
3444
- name: Checkout
3545
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
@@ -72,154 +82,140 @@ jobs:
7282
echo "Using source ref: $source_ref"
7383
7484
- name: Verify source git ref
75-
id: verify-source
7685
run: |
7786
set -euo pipefail
7887
source_ref="${{ steps.docker-image.outputs.source_ref }}"
7988
git fetch --depth 1 origin "refs/tags/${source_ref}:refs/tags/${source_ref}"
80-
source_sha=$(git rev-parse "${source_ref}^{}")
81-
echo "Nightly source commit: $source_sha"
89+
git rev-parse "${source_ref}^{}"
8290
8391
- name: Check if Docker image exists
8492
run: |
8593
DOCKER_IMAGE="${{ steps.docker-image.outputs.docker_image }}"
86-
echo "Checking if Docker image exists: $DOCKER_IMAGE"
8794
if docker manifest inspect "$DOCKER_IMAGE" > /dev/null 2>&1; then
8895
echo "Docker image exists: $DOCKER_IMAGE"
8996
else
9097
echo "Docker image does not exist: $DOCKER_IMAGE"
9198
exit 1
9299
fi
93100
94-
deploy-bench-10tps-network:
101+
- name: Compute shared sweep id
102+
id: sweep
103+
run: |
104+
# Shared across all three points so the dashboard groups the sweep.
105+
echo "sweep_id=incl-$(date -u +%Y%m%d)-${{ github.run_id }}" >> "$GITHUB_OUTPUT"
106+
107+
# ---- Deploy the single network the whole sweep runs against ----
108+
deploy:
95109
needs: select-image
96-
if: ${{ github.event_name != 'schedule' || github.repository == 'AztecProtocol/aztec-packages' }}
97110
uses: ./.github/workflows/deploy-network.yml
98111
with:
99-
network: bench-10tps
100-
namespace: bench-10tps
112+
network: bench-inclusion-sweep
113+
namespace: bench-inclusion-sweep
101114
aztec_docker_image: ${{ needs.select-image.outputs.docker_image }}
102115
ref: ${{ needs.select-image.outputs.source_ref }}
103-
skip_notify_on_failure: true
116+
notify_on_failure: false
104117
secrets: inherit
105118

106-
wait-for-first-l2-block:
107-
needs:
108-
- select-image
109-
- deploy-bench-10tps-network
110-
if: ${{ github.event_name != 'schedule' || github.repository == 'AztecProtocol/aztec-packages' }}
119+
wait:
120+
needs: [select-image, deploy]
111121
runs-on: ubuntu-latest
112122
timeout-minutes: 120
113123
steps:
114-
- name: Checkout
115-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
124+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
116125
with:
117126
ref: ${{ needs.select-image.outputs.source_ref }}
118-
119-
- name: Authenticate to Google Cloud
120-
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
127+
- uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
121128
with:
122129
credentials_json: ${{ secrets.GCP_SA_KEY }}
123-
124-
- name: Set up Cloud SDK
125-
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
130+
- uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
126131
with:
127132
install_components: gke-gcloud-auth-plugin
128-
129133
- name: Wait for first L2 block
130134
env:
131135
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
132-
run: |
133-
cd spartan
134-
./bootstrap.sh wait_for_l2_block bench-10tps
136+
NAMESPACE: bench-inclusion-sweep
137+
run: cd spartan && ./bootstrap.sh wait_for_l2_block bench-inclusion-sweep
135138

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

165-
cleanup:
166-
if: ${{ always() && (github.event_name != 'schedule' || github.repository == 'AztecProtocol/aztec-packages') }}
197+
notify-failure:
198+
if: ${{ always() && failure() && github.event_name != 'workflow_dispatch' }}
167199
needs:
168200
- select-image
169-
- deploy-bench-10tps-network
170-
- wait-for-first-l2-block
171-
- benchmark
201+
- deploy
202+
- wait
203+
- point-1tps
204+
- point-5tps
205+
- point-10tps
172206
runs-on: ubuntu-latest
173207
steps:
174-
- name: Checkout
175-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
208+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
176209
with:
177210
ref: ${{ needs.select-image.outputs.source_ref }}
178-
179-
- name: Cleanup network resources
180-
uses: ./.github/actions/network-teardown
181-
with:
182-
env_file: bench-10tps
183-
namespace: bench-10tps
184-
gcp_sa_key: ${{ secrets.GCP_SA_KEY }}
185-
gcp_project_id: ${{ secrets.GCP_PROJECT_ID }}
186-
187-
notify:
188-
if: (success() || failure()) && github.event_name != 'workflow_dispatch' && (github.event_name != 'schedule' || github.repository == 'AztecProtocol/aztec-packages')
189-
needs:
190-
- select-image
191-
- deploy-bench-10tps-network
192-
- wait-for-first-l2-block
193-
- benchmark
194-
- cleanup
195-
runs-on: ubuntu-latest
196-
steps:
197-
- name: Checkout
198-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
199-
with:
200-
ref: ${{ needs.select-image.outputs.source_ref }}
201-
202-
- name: Notify Slack on success
203-
if: success()
204-
env:
205-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
206-
run: |
207-
export CI=1
208-
IMAGE="${{ needs.select-image.outputs.image_label || 'unknown' }}"
209-
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
210-
./ci3/slack_notify \
211-
"Nightly 10 TPS benchmark PASSED (image ${IMAGE}) :white_check_mark: <${RUN_URL}|View Run>" \
212-
"#alerts-next-scenario"
213-
214-
- name: Notify Slack and dispatch ClaudeBox on failure
215-
if: failure()
211+
- name: Notify Slack on failure
216212
env:
217213
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
218214
GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
219215
run: |
220216
IMAGE="${{ needs.select-image.outputs.image_label || 'unknown' }}"
221217
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
222218
./ci3/slack_notify_with_claudebox_kickoff "#alerts-next-scenario" \
223-
"Nightly 10 TPS benchmark FAILED (image ${IMAGE}): <${RUN_URL}|View Run> (🤖)" \
224-
"Nightly 10 TPS benchmark failed (image ${IMAGE}). CI run: ${RUN_URL}. Investigate the benchmark failure and identify the root cause." \
219+
"Nightly inclusion sweep FAILED (image ${IMAGE}): <${RUN_URL}|View Run> (🤖)" \
220+
"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." \
225221
--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)