Skip to content

Commit 929f1dc

Browse files
committed
fix: resolve cherry-pick conflicts
After rebasing onto backport-to-v4-next-staging (which now includes the backport of #22889 'feat(txe): add tx private logs to tx side effects oracle'), only three files still need cross-PR-drift handling: - docs/docs-developers/docs/resources/migration_notes.md: keep just the two new TBD entries from #22968 (TXE `call_public_incognito` no longer takes `from`; `view_public_incognito` deprecated). The DeployMethod and aztec-up bundled-binary entries that the cherry-pick brought along belong to other PRs not yet backported (e.g. #22985). - yarn-project/pxe/src/contract_function_simulator/oracle/private_execution.test.ts: keep the v4-next-staging-specific tree-height imports (L1_TO_L2_MSG_TREE_HEIGHT, NOTE_HASH_TREE_HEIGHT, PUBLIC_DATA_TREE_HEIGHT) which are still in use here — #21577 removed them on next but hasn't been backported. Drop only NULL_MSG_SENDER_CONTRACT_ADDRESS (replaced by AztecAddress.NULL_MSG_SENDER). - yarn-project/stdlib/src/aztec-address/index.ts: keep both the existing eslint-disable comment and the new NULL_MSG_SENDER_CONTRACT_ADDRESS import. - noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr: with #22889 backported, the imports now match next exactly — just drop NULL_MSG_SENDER_CONTRACT_ADDRESS.
1 parent 05eaf1e commit 929f1dc

4 files changed

Lines changed: 0 additions & 138 deletions

File tree

docs/docs-developers/docs/resources/migration_notes.md

Lines changed: 0 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Aztec is in active development. Each version may introduce breaking changes that
99

1010
## TBD
1111

12-
<<<<<<< HEAD
13-
=======
1412
### [Aztec.nr] TXE `call_public_incognito` no longer takes a `from` parameter
1513

1614
`TestEnvironment::call_public_incognito` previously accepted a `from` address that was silently ignored (the function always uses a null `msg_sender`). The `from` parameter has been removed.
@@ -31,129 +29,6 @@ If you need to call a public function *with* a sender, use `call_public` instead
3129
+ env.view_public(SampleContract::at(addr).some_view());
3230
```
3331

34-
### [Aztec.js] `DeployMethod` address-affecting parameters move to construction time
35-
36-
Salt, deployer, and public keys are now passed when the `DeployMethod` is constructed, not on every call to `send` / `simulate` / `request` / `getInstance`. This locks the contract address once it is determined and prevents the silent salt-cache poisoning bug where the address could change between calls.
37-
38-
`contractAddressSalt`, `deployer`, and `universalDeploy` have been removed from `DeployOptions`, `RequestDeployOptions`, and `SimulateDeployOptions`. They now live on a new `DeployInstantiationOptions` argument passed at construction. `deployer` and `universalDeploy` are mutually exclusive; passing both throws. `Contract.deployWithPublicKeys` and the generated `MyContract.deployWithPublicKeys(...)` factories have been removed; pass `publicKeys` via the `instantiation` argument of `deploy(...)` instead. The buggy synchronous `address` and `partialAddress` getters have been removed and replaced with `getAddress()` and `getPartialAddress()` (both `async`).
39-
40-
The compact form keeps working: `MyContract.deploy(wallet, ...args).send({ from: alice })` deploys with `deployer = alice` and `salt = random()`, exactly as before. The deployer is locked the first time `send` / `simulate` / `profile` is called (from `options.from`, with `NO_FROM` or undefined → universal) and cannot change after that:
41-
42-
- Subsequent `send` / `simulate` / `profile` calls with a `from` that would imply a different deployer throw, instead of silently producing a different address.
43-
- A lock to universal (`AztecAddress.ZERO`) is the only one compatible with any sender, since the universal address does not depend on `from`.
44-
- A lock to a concrete address only accepts that exact `from` on subsequent calls.
45-
46-
**Migration:**
47-
48-
Universal deployment with a fixed salt:
49-
50-
```diff
51-
- const deploy = MyContract.deploy(wallet, ...args);
52-
- await deploy.send({
53-
- from: alice,
54-
- contractAddressSalt: salt,
55-
- universalDeploy: true,
56-
- });
57-
+ const deploy = MyContract.deploy(wallet, ...args, { salt, universalDeploy: true });
58-
+ await deploy.send({ from: alice });
59-
```
60-
61-
Non-universal deploy where `from` doubles as the deployer:
62-
63-
```diff
64-
- const deploy = MyContract.deploy(wallet, ...args);
65-
- await deploy.send({ from: alice, contractAddressSalt: salt });
66-
+ const deploy = MyContract.deploy(wallet, ...args, { salt });
67-
+ await deploy.send({ from: alice });
68-
```
69-
70-
If you need to read the address before sending, lock the deployer at construction:
71-
72-
```typescript
73-
const deploy = MyContract.deploy(wallet, ...args, { salt, deployer: alice });
74-
const address = await deploy.getAddress(); // resolves; deployer was locked at construction
75-
await deploy.send({ from: alice }); // deploys at the address `getAddress` returned
76-
```
77-
78-
Universal deploys can be sent by any account, since the universal address does not depend on `from`:
79-
80-
```typescript
81-
const deploy = MyContract.deploy(wallet, ...args, { universalDeploy: true });
82-
await deploy.send({ from: bob }); // OK, universal accepts any sender
83-
```
84-
85-
A lock to a concrete deployer rejects sending from a different account, instead of silently deploying at a different address:
86-
87-
```typescript
88-
const deploy = MyContract.deploy(wallet, ...args, { deployer: alice });
89-
await deploy.send({ from: bob }); // throws: deployer is locked to alice
90-
```
91-
92-
`deployWithPublicKeys` is gone; pass `publicKeys` in the instantiation options instead:
93-
94-
```diff
95-
- const deploy = MyContract.deployWithPublicKeys(publicKeys, wallet, ...args);
96-
+ const deploy = MyContract.deploy(wallet, ...args, { publicKeys });
97-
```
98-
99-
`ContractDeployer.deploy(...)` now takes the instantiation argument as its first parameter (pass `{}` to use defaults and rely on lazy locking from `from`):
100-
101-
```diff
102-
- const cd = new ContractDeployer(artifact, wallet);
103-
- await cd.deploy(...ctorArgs).send({ from: alice, contractAddressSalt: salt });
104-
+ const cd = new ContractDeployer(artifact, wallet);
105-
+ await cd.deploy(ctorArgs, { salt }).send({ from: alice });
106-
```
107-
108-
The synchronous `address` / `partialAddress` getters are gone:
109-
110-
```diff
111-
- const address = deploy.address; // sync, possibly undefined
112-
- const partial = await deploy.partialAddress; // sync getter wrapping async value
113-
+ const address = await deploy.getAddress(); // requires the deployer to be locked
114-
+ const partial = await deploy.getPartialAddress(); // requires the deployer to be locked
115-
```
116-
117-
`getInstance()` no longer takes options; use the construction-time instantiation instead:
118-
119-
```diff
120-
- const instance = await deploy.getInstance({ contractAddressSalt: salt });
121-
+ const deploy = MyContract.deploy(wallet, ...args, { salt, deployer: alice });
122-
+ const instance = await deploy.getInstance();
123-
```
124-
125-
### [aztec-up] Bundled binaries are no longer exposed under bare names on `PATH`
126-
127-
The Aztec installer previously placed bundled binaries directly into `$HOME/.aztec/current/bin` under bare names (`forge`, `nargo`, `bb`, `pxe`, ...). Anything with the same name in your own `PATH` was silently shadowed in unrelated projects.
128-
129-
Every bundled binary is now exposed only under an `aztec-` prefixed name in `$HOME/.aztec/current/bin`. Bare names are not on `PATH` at all and resolve to your own install (if any).
130-
131-
| Was on `PATH` | Now |
132-
| ------------------ | ------------------------ |
133-
| `forge` | `aztec-forge` |
134-
| `cast` | `aztec-cast` |
135-
| `anvil` | `aztec-anvil` |
136-
| `chisel` | `aztec-chisel` |
137-
| `nargo` | `aztec-nargo` |
138-
| `noir-profiler` | `aztec-noir-profiler` |
139-
| `bb` | `aztec-bb` |
140-
| `bb-cli` | `aztec-bb-cli` |
141-
| `pxe` | `aztec-pxe` |
142-
| `txe` | `aztec-txe` |
143-
| `validator-client` | `aztec-validator-client` |
144-
| `blob-client` | `aztec-blob-client` |
145-
146-
`aztec`, `aztec-wallet`, and `aztec-up` keep their existing names.
147-
148-
If you relied on a bundled bare-name binary for general use:
149-
150-
- For Aztec contract work, prefer `aztec compile` and `aztec test`.
151-
- For other Noir / Foundry commands, invoke the `aztec-*` symlink directly (e.g. `aztec-nargo fmt`, `aztec-forge build`).
152-
- Or install Foundry / nargo separately via `foundryup` / `noirup`.
153-
154-
If you set `Noir: Nargo Path` in the VS Code Noir extension to `$HOME/.aztec/current/bin/nargo`, change it to `$HOME/.aztec/current/bin/aztec-nargo` (the symlink is a drop-in for `nargo`). See the [Noir VSCode Extension guide](../aztec-nr/installation.md) for details.
155-
156-
>>>>>>> 45f7a03ebe (feat: allow setting additional scopes in nr tests (#22968))
15732
### [PXE] `proveTx` takes an options bag
15833

15934
`PXE.proveTx` used to accept `scopes` as a positional argument; it now takes an options bag consistent with `simulateTx` and `profileTx`, and adds an optional `senderForTags` field. Update direct callers:

noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,8 @@ use crate::protocol::{
77
abis::function_selector::FunctionSelector,
88
address::AztecAddress,
99
constants::{
10-
<<<<<<< HEAD
11-
CONTRACT_INSTANCE_LENGTH, MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX,
12-
MAX_PRIVATE_LOGS_PER_TX, NULL_MSG_SENDER_CONTRACT_ADDRESS, PRIVATE_LOG_SIZE_IN_FIELDS,
13-
=======
1410
CONTRACT_INSTANCE_LENGTH, MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, MAX_PRIVATE_LOGS_PER_TX,
1511
PRIVATE_LOG_SIZE_IN_FIELDS,
16-
>>>>>>> 45f7a03ebe (feat: allow setting additional scopes in nr tests (#22968))
1712
},
1813
contract_instance::ContractInstance,
1914
traits::{Deserialize, ToField},

yarn-project/pxe/src/contract_function_simulator/oracle/private_execution.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
<<<<<<< HEAD
21
import {
32
DomainSeparator,
43
L1_TO_L2_MSG_TREE_HEIGHT,
54
NOTE_HASH_TREE_HEIGHT,
6-
NULL_MSG_SENDER_CONTRACT_ADDRESS,
75
PUBLIC_DATA_TREE_HEIGHT,
86
} from '@aztec/constants';
9-
=======
10-
import { DomainSeparator } from '@aztec/constants';
11-
>>>>>>> 45f7a03ebe (feat: allow setting additional scopes in nr tests (#22968))
127
import { asyncMap } from '@aztec/foundation/async-map';
138
import { BlockNumber } from '@aztec/foundation/branded-types';
149
import { times } from '@aztec/foundation/collection';

yarn-project/stdlib/src/aztec-address/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
<<<<<<< HEAD
21
/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
3-
=======
42
import { NULL_MSG_SENDER_CONTRACT_ADDRESS } from '@aztec/constants';
5-
>>>>>>> 45f7a03ebe (feat: allow setting additional scopes in nr tests (#22968))
63
import { Fr, fromBuffer } from '@aztec/foundation/curves/bn254';
74
import { Point } from '@aztec/foundation/curves/grumpkin';
85
import { type ZodFor, bufferSchemaFor, hexSchemaFor } from '@aztec/foundation/schemas';

0 commit comments

Comments
 (0)