Skip to content

feat: add contract artifact compatibility check - #25407

Draft
loglapa wants to merge 1 commit into
AztecProtocol:merge-train/spartanfrom
loglapa:vl/check-artifacts-25108
Draft

feat: add contract artifact compatibility check#25407
loglapa wants to merge 1 commit into
AztecProtocol:merge-train/spartanfrom
loglapa:vl/check-artifacts-25108

Conversation

@loglapa

@loglapa loglapa commented Sep 4, 2026

Copy link
Copy Markdown

Adds an aztec check-artifacts command that detects stale or incompatible private-function verification keys before artifacts reach PXE. It recursively scans one or more artifact directories or JSON files and derives the expected serialized VK size from the constants shipped with the installed toolchain.

When a key differs from that expected size, the command reports the artifact path, contract name, function name, expected size, and actual size, then exits non-zero with a rebuild suggestion. The --consistency-only mode provides the weaker fallback described in the issue: it reports every size group and explicitly avoids guessing which group is stale.

The scanner supports both raw Nargo verification_key fields and processed Aztec verificationKey fields, including base64 and hex encodings.

Validation performed:

  • Prettier on all changed files
  • Behavioral test over nested temporary artifact directories, covering compatibility and consistency modes
  • TypeScript package check was attempted; it is currently blocked before reaching these files because cli/src/config/generated/networks.js is absent in the worktree

Closes #25108.

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.

1 participant