Skip to content

Commit 8f34701

Browse files
authored
fix: include standard-contracts artifacts in release image (#23753)
## Problem V5 / `next` net deployments crash on startup with: ``` Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/usr/src/yarn-project/standard-contracts/artifacts/AuthRegistry.json' imported from /usr/src/yarn-project/standard-contracts/dest/auth-registry/index.js ``` ## Root cause `release-image/Dockerfile.dockerignore` is an allowlist (`*` ignores everything, then `!`-includes specific paths). It explicitly re-includes the `artifacts/` directory for `protocol-contracts`, `noir-contracts.js`, `accounts`, `simulator`, etc., and copies every `dest/` via `!/yarn-project/*/dest/` — but it has **no** entry for `standard-contracts/artifacts/`. When auth-registry (and later public-checks / multi-call-entrypoint) was demoted into the new `standard-contracts` package (#23106), the allowlist was never updated. So the image ships `standard-contracts/dest/` but not its artifacts. At container startup the eager import in `dest/auth-registry/index.js` (`import '../../artifacts/AuthRegistry.json'`) resolves to a file that was excluded from the build context → `ERR_MODULE_NOT_FOUND`. This only affects the **Docker release image**. The npm tarball is unaffected because it uses `package.json`'s `files` field (which includes `artifacts`), a different mechanism — which is why `npm pack @aztec/standard-contracts` contains `AuthRegistry.json` while the deployed image does not. ## Fix Add `standard-contracts/artifacts/` to the dockerignore allowlist, matching the other contract-artifact packages. One line; same pattern as the existing `protocol-contracts`/`noir-contracts.js` entries. ## Verification - `npm pack @aztec/standard-contracts@latest` already contains `artifacts/AuthRegistry.json`, `PublicChecks.json` (confirms source/files are correct; the gap is image-only). - After this change the dockerignore re-includes `standard-contracts/artifacts/`, so the JSON artifacts are copied to `/usr/src/yarn-project/standard-contracts/artifacts/` alongside `dest/`, resolving the eager import. --- *Created by [claudebox](https://claudebox.work/v2/sessions/b19bc30b22f7bbf3) · group: `slackbot`*
2 parents d04c126 + c6a666b commit 8f34701

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

release-image/Dockerfile.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
!/yarn-project/bb-prover/artifacts/
1818
!/yarn-project/noir-protocol-circuits-types/artifacts/
1919
!/yarn-project/protocol-contracts/artifacts/
20+
!/yarn-project/standard-contracts/artifacts/
2021
!/yarn-project/noir-contracts.js/artifacts/
2122
!/yarn-project/noir-test-contracts.js/artifacts/
2223
!/yarn-project/simulator/artifacts/

0 commit comments

Comments
 (0)