Skip to content

fix: released contract artifact aztec version#23470

Open
benesjan wants to merge 2 commits into
v4-nextfrom
bj/fix-release-image-stamp-artifacts_2
Open

fix: released contract artifact aztec version#23470
benesjan wants to merge 2 commits into
v4-nextfrom
bj/fix-release-image-stamp-artifacts_2

Conversation

@benesjan
Copy link
Copy Markdown
Contributor

@benesjan benesjan commented May 21, 2026

Summary

The v4.3.0 release shipped contract artifact JSONs with aztec_version: "dev" baked in which resulted in a failure in ci-compat-e2e as there we check the artifact version matches the expected tested version that is injected in as an env var.

On npm.js we see "dev" in the artifact:

image

The issue seems to be caused by REF_NAME not being correctly populated when doing the release which then results in "dev" being stamped into the released artifacts instead of the real version.

The fix is to re-stamp the version into artifact later on in the release process where we have a reliable access to the actual version.

benesjan and others added 2 commits May 21, 2026 10:19
The v4.3.0 release shipped contract artifact JSONs with aztec_version: "dev"
baked in, because release-image/Dockerfile copies pre-built artifacts from an
earlier stage where REF_NAME isn't set (so stamp_aztec_version in
noir-projects/noir-contracts/bootstrap.sh falls back to "dev"). Mirror the
stdlib/package.json stamp pattern (75fd494) to re-stamp aztec_version in
every artifact under accounts/, noir-contracts.js/, and noir-test-contracts.js/
at image-build time.

Also bypass the compat e2e assertContractArtifactsVersion() check narrowly for
expected === "4.3.0" && aztecVersion === "dev" so the compat job stops failing
against the already-published broken 4.3.0 artifacts. Other versions still
fail loudly if they ever report "dev".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@benesjan benesjan added the ci-release-pr Creates a development tag and runs the release suite label May 21, 2026
@benesjan benesjan marked this pull request as ready for review May 21, 2026 13:26
@benesjan benesjan requested a review from charlielye as a code owner May 21, 2026 13:26

# Stamp aztec_version into any published noir contract artifacts in artifacts/*.json. The build-time stamp in
# noir-projects/noir-contracts/bootstrap.sh writes "dev"; $version here is the authoritative release version about to
# be written to package.json. We cannot stamp real version in bootstrap because there we don't have access to it.
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.

This is to have a correct version in the contracts of released docker images.

Comment thread release-image/Dockerfile

# Stamp aztec_version into the shipped contract artifacts. The build-time stamp in
# noir-projects/noir-contracts/bootstrap.sh writes "dev" unconditionally; $VERSION here is the authoritative release
# version for this image.
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.

This is (hopefully) the fix of the version in npm.js.

}
// TODO(F-557): Remove once v4.3.0 drops off the compat matrix. The v4.3.0 npm release shipped with
// aztec_version: "dev" baked into the artifact JSONs because of a bug.
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.

This is just to make it shut up in ci-compat-e2e for the 4.3.0 version of artifacts that got incorrectly stamped with "dev".

@@ -93,19 +93,16 @@ function get_contract_path {
}
export -f get_contract_path

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.

The code below never correctly stamped version so I simplified it to just stamp "dev" and then later on in the release process it gets re-stamped to the real release version (hopefully).

@benesjan benesjan requested a review from aminsammara May 21, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-release-pr Creates a development tag and runs the release suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants