Skip to content

Commit b22f58e

Browse files
alejoamirasclaude
andcommitted
ci: run JS tests against mainnet block geometry
`aztec start --local-network` defaults to 3s blocks. With 72s slots that packs 21 blocks into a checkpoint, and the per-tx DA admission limit is `ceil(daBudget / blocks * 1.5)` = 55,882 DA gas. Mainnet runs 6s blocks (10 blocks per checkpoint) and admits 117,668. The protocol picks that 1.5 multiplier deliberately, and says so in aztec stdlib `gas/tx_gas_limits.ts`: it is set "so the largest tx we want to support — a maximal contract class registration (~97k DA gas) — fits a single block under v5 mainnet geometry (72s slots, 6s blocks -> 10 blocks per checkpoint)". The default local geometry therefore advertises a limit well below the ~97k the protocol guarantees for exactly this kind of transaction, and rejects contracts that are valid on the network we ship to. Publishing the Vault contract class costs ~64k DA gas. That is fine on mainnet and inside the protocol's stated envelope, but over the local 55,882 cap. Note this is not specific to any one change: main's Vault already sits at ~54k, i.e. 97% of the local ceiling, so essentially any growth in that contract trips it. Reusable workflows do not inherit the caller's `env`, and aztec-ci-actions' run-tests.yml exposes no knob for this, so the JS job is inlined here (`run-js-tests: false` on the reusable call) purely to own the environment. It still calls the same pinned `setup-aztec` and `js-tests` composite actions, so behaviour is otherwise unchanged. NOTE FOR REVIEWERS: this renames the check from "checks / JS Tests" to "JS Tests". Any branch protection rule naming the old check needs updating, or it will block merges waiting on a check that no longer runs. The better long-term fix is upstream — either the local network should default to mainnet geometry, or run-tests.yml should expose the knob. Worth raising with the Aztec CI folks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent ec4b4e4 commit b22f58e

2 files changed

Lines changed: 63 additions & 0 deletions

File tree

‎.github/workflows/main-tests.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,32 @@ jobs:
1414
uses: AztecProtocol/aztec-ci-actions/.github/workflows/run-tests.yml@431859e477234b8690eb1f80d1305d2e34f10f1b # v0.1.1
1515
with:
1616
runner: ubuntu-latest
17+
# JS tests run in the `js-tests` job below instead, which needs a job-level env var
18+
# that a reusable workflow cannot inherit from its caller.
19+
run-js-tests: false
1720
secrets: inherit
21+
22+
# Kept in lockstep with the `js-tests` job in pr-checks.yml — see the rationale for
23+
# SEQ_BLOCK_DURATION_MS there.
24+
js-tests:
25+
name: JS Tests
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 60
28+
env:
29+
# 6s blocks = mainnet geometry (10 blocks/checkpoint, 117,668 DA gas per tx). The local
30+
# default of 3s blocks caps a tx at 55,882, below the ~97k the protocol guarantees for a
31+
# maximal contract class registration, which the Vault class publication needs.
32+
SEQ_BLOCK_DURATION_MS: '6000'
33+
steps:
34+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
35+
with:
36+
fetch-depth: 0
37+
38+
- name: Setup Aztec environment
39+
uses: AztecProtocol/aztec-ci-actions/actions/setup-aztec@431859e477234b8690eb1f80d1305d2e34f10f1b # v0.1.1
40+
with:
41+
start-pxe: 'true'
42+
run-codegen: 'true'
43+
44+
- name: Run JS tests
45+
uses: AztecProtocol/aztec-ci-actions/actions/js-tests@431859e477234b8690eb1f80d1305d2e34f10f1b # v0.1.1

‎.github/workflows/pr-checks.yml‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,43 @@ jobs:
4949
uses: AztecProtocol/aztec-ci-actions/.github/workflows/run-tests.yml@431859e477234b8690eb1f80d1305d2e34f10f1b # v0.1.1
5050
with:
5151
runner: ubuntu-latest
52+
# JS tests run in the `js-tests` job below instead, which needs a job-level env var
53+
# that a reusable workflow cannot inherit from its caller.
54+
run-js-tests: false
5255
secrets: inherit
5356

57+
# Mirrors the `js-tests` job of aztec-ci-actions/run-tests.yml, inlined for one reason:
58+
# SEQ_BLOCK_DURATION_MS below. Reusable workflows do not inherit the caller's `env`, and
59+
# run-tests.yml exposes no knob for it, so the only way to reach the node is to own the job.
60+
js-tests:
61+
name: JS Tests
62+
runs-on: ubuntu-latest
63+
timeout-minutes: 60
64+
env:
65+
# `aztec start --local-network` defaults to 3s blocks. With 72s slots that is 21 blocks per
66+
# checkpoint, and the per-tx DA admission limit is ceil(budget / blocks * 1.5) = 55,882.
67+
# Mainnet runs 6s blocks (10 blocks per checkpoint -> 117,668); the protocol picks that
68+
# multiplier precisely so "a maximal contract class registration (~97k DA gas) fits a single
69+
# block under v5 mainnet geometry" (aztec stdlib, gas/tx_gas_limits.ts).
70+
#
71+
# Publishing the Vault contract class costs ~64k DA gas: comfortably valid on mainnet and
72+
# under the ~97k the protocol guarantees, but rejected by the default local geometry. Pinning
73+
# 6s blocks makes CI reproduce mainnet rather than a network stricter than the one we ship to.
74+
SEQ_BLOCK_DURATION_MS: '6000'
75+
steps:
76+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
77+
with:
78+
fetch-depth: 0
79+
80+
- name: Setup Aztec environment
81+
uses: AztecProtocol/aztec-ci-actions/actions/setup-aztec@431859e477234b8690eb1f80d1305d2e34f10f1b # v0.1.1
82+
with:
83+
start-pxe: 'true'
84+
run-codegen: 'true'
85+
86+
- name: Run JS tests
87+
uses: AztecProtocol/aztec-ci-actions/actions/js-tests@431859e477234b8690eb1f80d1305d2e34f10f1b # v0.1.1
88+
5489
benchmark:
5590
# Skipping also skips this branch's baseline-artifact upload; a PR stacked on
5691
# top of a skipped branch falls back to `if_no_artifact_found: warn` downstream.

0 commit comments

Comments
 (0)