Skip to content

feat: add salt and secret params to env.deploy#21183

Merged
nventuro merged 3 commits intomerge-train/fairiesfrom
nico/f-64-add-more-testenv-deploy-options
Mar 5, 2026
Merged

feat: add salt and secret params to env.deploy#21183
nventuro merged 3 commits intomerge-train/fairiesfrom
nico/f-64-add-more-testenv-deploy-options

Conversation

@nventuro
Copy link
Contributor

@nventuro nventuro commented Mar 5, 2026

Originally requested by @xorsal and @zkfrov.

This simply adds a new deploy_opts function which takes DeployOptions, via which custom salt and secret can be speficied. In the future we might be able to allow specifying more things.

The bigger change is that the deployment oraacle now supports salt, secret (and deployer, currently hardcoded), so we should not need to break this API in the near future.

Closes #16656

nventuro and others added 2 commits March 5, 2026 18:19
…ariant

The deploy oracle now accepts an explicit salt instead of the TXE
hardcoding Fr.ONE. A new `deploy_opts` method on `TestEnvironment`
accepts `DeployOptions` with optional salt and secret, and the existing
`deploy` delegates to it using counter-based defaults for both.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add deployer parameter to the deploy oracle interface so the TXE no
longer hardcodes AztecAddress.ZERO. Currently all callers pass zero,
but the plumbing is in place for future configurability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nventuro nventuro requested review from benesjan and mverzilli March 5, 2026 18:31
@AztecBot AztecBot requested a review from a team March 5, 2026 18:42
Copy link
Contributor

@mverzilli mverzilli left a comment

Choose a reason for hiding this comment

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

Nice!

…/test/deployment.nr

Co-authored-by: Martin Verzilli <martin@aztec-labs.com>
@nventuro nventuro enabled auto-merge (squash) March 5, 2026 21:47
@nventuro nventuro merged commit 9d8c26c into merge-train/fairies Mar 5, 2026
10 checks passed
@nventuro nventuro deleted the nico/f-64-add-more-testenv-deploy-options branch March 5, 2026 22:05
@AztecBot
Copy link
Collaborator

AztecBot commented Mar 5, 2026

❌ Failed to cherry-pick to v4 due to conflicts. Dispatching ClaudeBox to resolve. View backport run.

AztecBot pushed a commit that referenced this pull request Mar 5, 2026
Originally requested by @xorsal and @zkfrov.

This simply adds a new `deploy_opts` function which takes
`DeployOptions`, via which custom salt and secret can be speficied. In
the future we might be able to allow specifying more things.

The bigger change is that the deployment oraacle now supports salt,
secret (and deployer, currently hardcoded), so we should not need to
break this API in the near future.

Closes #16656

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Martin Verzilli <martin@aztec-labs.com>
github-merge-queue bot pushed a commit that referenced this pull request Mar 6, 2026
BEGIN_COMMIT_OVERRIDE
fix: empty undefined offchain messages for batch calls (#21157)
feat: add aztecaddress::is_valid (#21072)
feat: add ergonomic conversions for Noir's `Option<T>` (#21107)
chore: use returns `true` for boolean fns (#21186)
feat: add salt and secret params to env.deploy (#21183)
END_COMMIT_OVERRIDE
@AztecBot
Copy link
Collaborator

❌ Failed to cherry-pick to v4-next due to conflicts. (🤖) View backport run.

AztecBot pushed a commit that referenced this pull request Mar 16, 2026
AztecBot added a commit that referenced this pull request Mar 16, 2026
Backport of #21183 to v4-next. Adds DeployOptions struct with with_salt and
with_secret methods for TestEnvironment. Updates TXE deploy oracle to accept
salt and deployer params. Bumps ORACLE_VERSION from 16 to 17.
nventuro pushed a commit that referenced this pull request Mar 16, 2026
)

## Summary
Backport of #21183
to v4-next.

- Adds `DeployOptions` struct with `with_salt` and `with_secret` methods
for `TestEnvironment`
- Adds `deploy_opts` method to `TestEnvironment` for custom salt/secret
deployment
- Updates TXE deploy oracle to accept salt, deployer params and passes
them through to contract instantiation
- Bumps `ORACLE_VERSION` from 16 to 17
- Adds tests for deploy with custom salt/secret combinations

## Conflict Resolution
Rebased onto latest `backport-to-v4-next-staging`. Conflicts were in:
- `ORACLE_VERSION` files (16→17 bump)
- `txe_oracles.nr` and `txe/index.ts` had oracle naming divergence
(`aztec_txe_*` on v4-next vs `txe*` on the old branch) — applied only
the salt/deployer parameter changes on top of the current v4-next
naming.

## Original PR
#21183 by @nventuro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants