Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions release-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,17 @@ RUN echo '{".": "'$VERSION'"}' > /usr/src/.release-please-manifest.json
RUN jq --arg v "$VERSION" '.version = $v' /usr/src/yarn-project/stdlib/package.json > /tmp/p.json \
&& mv /tmp/p.json /usr/src/yarn-project/stdlib/package.json

# Re-stamp aztec_version in published contract artifacts. Mirrors stamp_aztec_version() in
# noir-projects/noir-contracts/bootstrap.sh and stampAztecVersion() in
# yarn-project/aztec/src/cli/cmds/compile.ts. Needed because artifacts are compiled in an earlier
# build stage where REF_NAME isn't set, leaving them with aztec_version: "dev".
RUN for dir in \
/usr/src/yarn-project/accounts/artifacts \
/usr/src/yarn-project/noir-contracts.js/artifacts \
/usr/src/yarn-project/noir-test-contracts.js/artifacts; do \
for f in "$dir"/*.json; do \
jq --arg v "$VERSION" '.aztec_version = $v' "$f" > /tmp/a.json && mv /tmp/a.json "$f"; \
done; \
done

ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/aztec/dest/bin/index.js"]
10 changes: 10 additions & 0 deletions yarn-project/end-to-end/src/fixtures/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import { type ContractInstanceWithAddress, getContractInstanceFromInstantiationP
import type { AztecNodeAdmin, AztecNodeDebug } from '@aztec/stdlib/interfaces/client';
import { tryStop } from '@aztec/stdlib/interfaces/server';
import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
import { DEV_VERSION } from '@aztec/stdlib/update-checker';
import {
type TelemetryClient,
type TelemetryClientConfig,
Expand Down Expand Up @@ -283,6 +284,15 @@ function assertContractArtifactsVersion() {
);
return;
}
// TODO(F-557): Remove once v4.3.0 drops off the compat matrix. The v4.3.0 release shipped with
// aztec_version: "dev" baked into the published artifact JSONs because release-image/Dockerfile
// did not re-stamp them. Fixed for future releases by the artifact restamp step in that Dockerfile.
if (expected === '4.3.0' && aztecVersion === DEV_VERSION) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"dev" got already stamped into artifacts from "4.3.0" so this is here to disable this check on the next run. This is fine as this was only a sanity check.

createLogger('e2e:setup').warn(
`Skipping artifact version check: v4.3.0 artifacts shipped with aztec_version="dev"`,
);
return;
}
if (aztecVersion !== expected) {
throw new Error(
`Artifact version mismatch: expected ${expected} but got ${aztecVersion}. ` +
Expand Down
Loading