-
Notifications
You must be signed in to change notification settings - Fork 599
Closed as not planned
Closed as not planned
Copy link
Description
What are you trying to do?
Use a previously deployed contract after upgrading the Aztec toolchain version.
Current Behavior
When the Aztec toolchain is upgraded, the Noir compiler produces different artifacts for the same contract source code. This leads to a cascading mismatch:
- Different artifact → different contract class ID
- Different contract class ID → different partial address
- Different partial address → different complete address
Since APIs like wallet.createSchnorrAccount always resolve to the latest bundled artifact, they compute a different address for the same inputs on the same network. This means:
- The wallet can no longer match the contract originally deployed on-chain
- Transaction building fails because the computed address doesn't correspond to any deployed contract
- Users effectively lose access to their accounts after a toolchain upgrade
This affects any contract whose artifact is bundled with the toolchain — account contracts (e.g., Schnorr), token contracts, etc.
Steps to Reproduce
- Deploy a contract (e.g., a Schnorr account) using toolchain version A
- Upgrade the Aztec toolchain to version B
- Instantiate the same contract with the same inputs (e.g.,
wallet.createSchnorrAccountwith the same secret key) - Observe that the resolved complete address differs from the one deployed in step 1
- Attempting to build transactions against this contract fails
Questions
- Is there a recommended way to handle contracts deployed with a previous toolchain version?
- Should artifact stability across compiler versions be a guarantee, or is this expected to break?
- What is the intended migration path for users/applications when the toolchain is upgraded?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels