Skip to content

[BUG] aztec compile silently skips AVM transpilation when nargo artifacts already exist in target/ #24075

@XD637

Description

@XD637

What are you trying to do?

Compile Noir smart contracts using aztec compile to generate the full AVM-transpiled artifacts (including contractClass and bytecode) needed for deployment via the Aztec SDK.

Code Reference

# Step 1: Build with nargo first
nargo build
# → produces target/*.json WITHOUT contractClass/AVM bytecode

# Step 2: Run aztec compile
aztec compile
# → Outputs: "No source changes detected" (exits 0)
# → Artifacts STILL missing contractClass — SDK crashes at deploy time

# Fix: delete target/ first
rm -rf target/ && aztec compile

Aztec Version

4.3.1

OS

Ubuntu 24.04 (inside Docker container)

Browser (if relevant)

No response

Node Version

24.16.0

Additional Context

The core issue is that aztec compile piggybacks on nargo's file-level cache (which only checks if source .nr files changed) to decide whether to run AVM transpilation. However, nargo's cache and aztec's AVM transpilation are two separate steps. A nargo-cached artifact is functionally incomplete for Aztec SDK deployment.

The CLI should either:
(a) Check for the presence of contractClass in existing artifacts and force re-transpilation if missing, OR
(b) Always run the AVM transpilation step regardless of nargo's cache state, since it's a separate post-processing pass.

Metadata

Metadata

Assignees

Labels

T-bugType: Bug. Something is broken.from-communityThis originated from the community :)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions