Skip to content

release/v5: Node 24.22.1 (eMudhra), strict boolean env parsing, ARCHIVE_MODE - #11

Merged
koenmtb1 merged 5 commits into
release/v5from
backport/v5-archive-mode
Oct 26, 2026
Merged

koenmtb1 merged 5 commits into
release/v5from
backport/v5-archive-mode

Conversation

@koenmtb1

@koenmtb1 koenmtb1 commented Oct 26, 2026 •

Copy link
Copy Markdown

Backports the fixes from #10 and #9 onto release/v5, the new branch for the Aztec 5.x line. Mainnet and testnet v5 keep running 5.x while main moves to Aztec 6.0.0 for the v6 testnet rollup. release/v5 starts at f3ec5887 (current main, what production runs today).

What this PR does

1. Strict boolean env parsing. z.coerce.boolean() reads the string "false" as true, so these switches could never be turned off from the environment:

  • aztec-listener: AZTEC_LISTEN_FOR_PENDING_TXS, AZTEC_LISTEN_FOR_CHAIN_INFO, AZTEC_LISTEN_FOR_L2_TIPS, AZTEC_DISABLED
  • explorer-api: L2_BLOCK_RECONCILIATION_ENABLED, L1_GOVERNANCE_URI_RECONCILIATION_ENABLED

parseBooleanEnv accepts exactly true or false. Unset or empty means the default; anything else fails at startup.

Behaviour change: a deployment that already sets one of these to "false" now actually gets it. Every config in this repo sets them to "true"; check foundation-iac before deploying.

2. ARCHIVE_MODE for explorer-api. With ARCHIVE_MODE=true the API serves a retired rollup's stored history from Postgres alone:

  • no message bus, no event consumption, no reconciliation;
  • source verification returns 503.

An archived version then needs only explorer-api, Postgres and Redis: no Aztec node, listeners or Kafka. This is what lets testnet v5 stay browsable after its rollup shuts down.

3. CI fix: contract-verification tests run in child processes. On Linux, vitest 0.34's worker-thread pool exits 1 after every test passes, failing the PR build. Reproduced on ubuntu-latest (default pool exits 1, --no-threads exits 0). Also in #10.

4. eMudhra remediation: Node 24.22.1 everywhere (backport of #9, cherry-picked with -x). Eight eMudhra intermediate CA keys are computable from their public certificates. Node only rejects certificates chained to them from 22.23.4 / 24.22.1 / 26.12.1 on, and Node 20 (CI, build stages) never will. This pins node:24.22.1-trixie-slim by digest in every build and runtime stage, requires ca-certificates >= 20250419+deb13u1, and moves CI and .nvmrc to 24.22.1. The backported files are identical to main. Mainnet and testnet v5 build from this branch, so they need it as much as main.

Verification

On this branch, on Node 24.22.1 with the 5.x dependencies: yarn install, yarn build and yarn test pass (contract-verification 4, auth 105, aztec-listener 41, explorer-api 62). For #9's part, all six production images were built on ubuntu-latest: each runs Node 24.22.1, refuses a certificate chained to a compromised intermediate (CERT_REVOKED), and accepts normal TLS (run). New tests cover the "false" cases and the archive-mode 503. The PR build workflow passes.

🤖 Generated with Claude Code

koenmtb1 and others added 2 commits October 26, 2026 13:53
z.coerce.boolean() reads the string "false" as true, so these switches
could never be turned off from the environment:

- aztec-listener: AZTEC_LISTEN_FOR_PENDING_TXS, AZTEC_LISTEN_FOR_CHAIN_INFO,
  AZTEC_LISTEN_FOR_L2_TIPS, AZTEC_DISABLED
- explorer-api: L2_BLOCK_RECONCILIATION_ENABLED,
  L1_GOVERNANCE_URI_RECONCILIATION_ENABLED

parseBooleanEnv accepts exactly "true" or "false"; unset or empty means
the default, anything else fails at startup. A deployment that already
sets one of these to "false" now gets that setting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With ARCHIVE_MODE=true the API serves a retired rollup's stored history
from Postgres without Kafka: it starts no message bus, consumes no events,
runs no reconciliation, and answers source verification with 503. An
archived version then needs only explorer-api, Postgres and Redis; no
Aztec node, listeners or Kafka.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@koenmtb1

Copy link
Copy Markdown
Author

CI note: the build job fails in yarn test on @chicmoz-pkg/contract-verification. All 4 of its tests pass, then vitest 0.34.6 exits 1 with no error output (reproduced on a rerun). This PR doesn't touch that package, and its dependencies are identical to main. The same install → build → test sequence on this exact commit passes locally under Node 20 (macOS). This workflow skips drafts and has never completed on this fork before, so this looks like an existing Linux-runner issue on main, not something this backport introduced. Worth a separate fix (e.g. moving contract-verification to the vitest 3.2.4 the other workspaces use).

On Linux, vitest 0.34's worker-thread pool exits 1 after all
contract-verification tests pass, failing the PR build. These tests load
the Aztec SDK, native modules included. Reproduced on ubuntu-latest with
Node 20: the default pool exits 1 and --no-threads exits 0. macOS was
unaffected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@koenmtb1

Copy link
Copy Markdown
Author

Update: the CI failure below is fixed in this PR. The diagnosis on ubuntu-latest showed vitest 0.34's worker-thread pool exits 1 after the tests pass, while --no-threads exits 0; contract-verification now runs its tests in child processes. The build is green.

(cherry picked from commit 1d96e3d)
@koenmtb1 koenmtb1 changed the title release/v5: strict boolean env parsing and ARCHIVE_MODE release/v5: Node 24.22.1 (eMudhra), strict boolean env parsing, ARCHIVE_MODE Oct 26, 2026
@koenmtb1
koenmtb1 merged commit 7fe902c into release/v5 Oct 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants