@aztec/pxe 0.0.1-commit.9b94fc1 → 0.0.1-commit.d3ec352c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dest/contract_function_simulator/execution_data_provider.d.ts +10 -8
  2. package/dest/contract_function_simulator/execution_data_provider.d.ts.map +1 -1
  3. package/dest/contract_function_simulator/execution_note_cache.d.ts +3 -2
  4. package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
  5. package/dest/contract_function_simulator/execution_note_cache.js +3 -2
  6. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +4 -3
  7. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
  8. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +6 -3
  9. package/dest/contract_function_simulator/oracle/interfaces.d.ts +12 -9
  10. package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
  11. package/dest/contract_function_simulator/oracle/oracle.d.ts +3 -3
  12. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
  13. package/dest/contract_function_simulator/oracle/oracle.js +11 -10
  14. package/dest/contract_function_simulator/oracle/private_execution.d.ts +3 -2
  15. package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
  16. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +5 -4
  17. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  18. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +7 -5
  19. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +10 -8
  20. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  21. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +3 -2
  22. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +11 -10
  23. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +1 -1
  24. package/dest/contract_function_simulator/pxe_oracle_interface.js +11 -9
  25. package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
  26. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
  27. package/dest/private_kernel/private_kernel_oracle_impl.d.ts +3 -3
  28. package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +1 -1
  29. package/dest/storage/note_data_provider/note_data_provider.d.ts +4 -4
  30. package/dest/storage/note_data_provider/note_data_provider.d.ts.map +1 -1
  31. package/dest/storage/note_data_provider/note_data_provider.js +4 -1
  32. package/dest/storage/sync_data_provider/sync_data_provider.d.ts +3 -2
  33. package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +1 -1
  34. package/dest/synchronizer/synchronizer.d.ts +3 -2
  35. package/dest/synchronizer/synchronizer.d.ts.map +1 -1
  36. package/dest/synchronizer/synchronizer.js +2 -1
  37. package/package.json +17 -17
  38. package/src/contract_function_simulator/execution_data_provider.ts +15 -6
  39. package/src/contract_function_simulator/execution_note_cache.ts +3 -2
  40. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +4 -1
  41. package/src/contract_function_simulator/oracle/interfaces.ts +11 -6
  42. package/src/contract_function_simulator/oracle/oracle.ts +14 -6
  43. package/src/contract_function_simulator/oracle/private_execution.ts +2 -1
  44. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +7 -2
  45. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +19 -7
  46. package/src/contract_function_simulator/pxe_oracle_interface.ts +35 -20
  47. package/src/private_kernel/private_kernel_execution_prover.ts +1 -0
  48. package/src/private_kernel/private_kernel_oracle_impl.ts +2 -2
  49. package/src/storage/note_data_provider/note_data_provider.ts +7 -3
  50. package/src/storage/sync_data_provider/sync_data_provider.ts +2 -1
  51. package/src/synchronizer/synchronizer.ts +2 -1
@@ -1,10 +1,11 @@
1
+ import type { BlockNumber } from '@aztec/foundation/branded-types';
1
2
  import type { AztecAsyncKVStore } from '@aztec/kv-store';
2
3
  import { BlockHeader } from '@aztec/stdlib/tx';
3
4
  export declare class SyncDataProvider {
4
5
  #private;
5
6
  constructor(store: AztecAsyncKVStore);
6
7
  setHeader(header: BlockHeader): Promise<void>;
7
- getBlockNumber(): Promise<number>;
8
+ getBlockNumber(): Promise<BlockNumber>;
8
9
  getBlockHeader(): Promise<BlockHeader>;
9
10
  }
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3luY19kYXRhX3Byb3ZpZGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc3RvcmFnZS9zeW5jX2RhdGFfcHJvdmlkZXIvc3luY19kYXRhX3Byb3ZpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUF1QixNQUFNLGlCQUFpQixDQUFDO0FBQzlFLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUUvQyxxQkFBYSxnQkFBZ0I7O0lBSTNCLFlBQVksS0FBSyxFQUFFLGlCQUFpQixFQUduQztJQUVLLFNBQVMsQ0FBQyxNQUFNLEVBQUUsV0FBVyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FFbEQ7SUFFSyxjQUFjLElBQUksT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQU90QztJQUVLLGNBQWMsSUFBSSxPQUFPLENBQUMsV0FBVyxDQUFDLENBTzNDO0NBQ0YifQ==
11
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3luY19kYXRhX3Byb3ZpZGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc3RvcmFnZS9zeW5jX2RhdGFfcHJvdmlkZXIvc3luY19kYXRhX3Byb3ZpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ25FLE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUF1QixNQUFNLGlCQUFpQixDQUFDO0FBQzlFLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUUvQyxxQkFBYSxnQkFBZ0I7O0lBSTNCLFlBQVksS0FBSyxFQUFFLGlCQUFpQixFQUduQztJQUVLLFNBQVMsQ0FBQyxNQUFNLEVBQUUsV0FBVyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FFbEQ7SUFFSyxjQUFjLElBQUksT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQU8zQztJQUVLLGNBQWMsSUFBSSxPQUFPLENBQUMsV0FBVyxDQUFDLENBTzNDO0NBQ0YifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"sync_data_provider.d.ts","sourceRoot":"","sources":["../../../src/storage/sync_data_provider/sync_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,gBAAgB;;IAI3B,YAAY,KAAK,EAAE,iBAAiB,EAGnC;IAEK,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAElD;IAEK,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAOtC;IAEK,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAO3C;CACF"}
1
+ {"version":3,"file":"sync_data_provider.d.ts","sourceRoot":"","sources":["../../../src/storage/sync_data_provider/sync_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,gBAAgB;;IAI3B,YAAY,KAAK,EAAE,iBAAiB,EAGnC;IAEK,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAElD;IAEK,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAO3C;IAEK,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAO3C;CACF"}
@@ -1,3 +1,4 @@
1
+ import { BlockNumber } from '@aztec/foundation/branded-types';
1
2
  import { type Logger } from '@aztec/foundation/log';
2
3
  import type { L2TipsKVStore } from '@aztec/kv-store/stores';
3
4
  import { L2BlockStream, type L2BlockStreamEvent, type L2BlockStreamEventHandler } from '@aztec/stdlib/block';
@@ -30,6 +31,6 @@ export declare class Synchronizer implements L2BlockStreamEventHandler {
30
31
  */
31
32
  sync(): Promise<void>;
32
33
  private doSync;
33
- getSynchedBlockNumber(): Promise<number>;
34
+ getSynchedBlockNumber(): Promise<BlockNumber>;
34
35
  }
35
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3luY2hyb25pemVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc3luY2hyb25pemVyL3N5bmNocm9uaXplci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxNQUFNLEVBQWdCLE1BQU0sdUJBQXVCLENBQUM7QUFDbEUsT0FBTyxLQUFLLEVBQUUsYUFBYSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDNUQsT0FBTyxFQUFFLGFBQWEsRUFBRSxLQUFLLGtCQUFrQixFQUFFLEtBQUsseUJBQXlCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUM3RyxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUVqRSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUU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AAS,EAAE,kBAAkB,CAAC,CAAC,iBAO/E;IAED,iDAAiD;IACpC,sBAAsB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgC5E;IAED;;;OAGG;IACU,IAAI,kBAehB;YAEa,MAAM;IAeb,qBAAqB,yBAE3B;CACF"}
@@ -1,3 +1,4 @@
1
+ import { BlockNumber } from '@aztec/foundation/branded-types';
1
2
  import { createLogger } from '@aztec/foundation/log';
2
3
  import { L2BlockStream } from '@aztec/stdlib/block';
3
4
  /**
@@ -91,7 +92,7 @@ import { L2BlockStream } from '@aztec/stdlib/block';
91
92
  }
92
93
  if (!currentHeader) {
93
94
  // REFACTOR: We should know the header of the genesis block without having to request it from the node.
94
- await this.syncDataProvider.setHeader(await this.node.getBlockHeader(0));
95
+ await this.syncDataProvider.setHeader(await this.node.getBlockHeader(BlockNumber.ZERO));
95
96
  }
96
97
  await this.blockStream.sync();
97
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/pxe",
3
- "version": "0.0.1-commit.9b94fc1",
3
+ "version": "0.0.1-commit.d3ec352c",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./server": "./dest/entrypoints/server/index.js",
@@ -12,7 +12,7 @@
12
12
  "bin": "./dest/bin/index.js",
13
13
  "scripts": {
14
14
  "build": "yarn clean && yarn generate && tsgo -b",
15
- "build:dev": "tsgo -b --watch",
15
+ "build:dev": "../scripts/tsc.sh --watch",
16
16
  "clean": "rm -rf ./dest .tsbuildinfo ./src/config/package_info.ts",
17
17
  "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}",
18
18
  "generate": "node ./scripts/generate_package_info.js",
@@ -61,19 +61,19 @@
61
61
  ]
62
62
  },
63
63
  "dependencies": {
64
- "@aztec/bb-prover": "0.0.1-commit.9b94fc1",
65
- "@aztec/bb.js": "0.0.1-commit.9b94fc1",
66
- "@aztec/builder": "0.0.1-commit.9b94fc1",
67
- "@aztec/constants": "0.0.1-commit.9b94fc1",
68
- "@aztec/ethereum": "0.0.1-commit.9b94fc1",
69
- "@aztec/foundation": "0.0.1-commit.9b94fc1",
70
- "@aztec/key-store": "0.0.1-commit.9b94fc1",
71
- "@aztec/kv-store": "0.0.1-commit.9b94fc1",
72
- "@aztec/noir-protocol-circuits-types": "0.0.1-commit.9b94fc1",
73
- "@aztec/noir-types": "0.0.1-commit.9b94fc1",
74
- "@aztec/protocol-contracts": "0.0.1-commit.9b94fc1",
75
- "@aztec/simulator": "0.0.1-commit.9b94fc1",
76
- "@aztec/stdlib": "0.0.1-commit.9b94fc1",
64
+ "@aztec/bb-prover": "0.0.1-commit.d3ec352c",
65
+ "@aztec/bb.js": "0.0.1-commit.d3ec352c",
66
+ "@aztec/builder": "0.0.1-commit.d3ec352c",
67
+ "@aztec/constants": "0.0.1-commit.d3ec352c",
68
+ "@aztec/ethereum": "0.0.1-commit.d3ec352c",
69
+ "@aztec/foundation": "0.0.1-commit.d3ec352c",
70
+ "@aztec/key-store": "0.0.1-commit.d3ec352c",
71
+ "@aztec/kv-store": "0.0.1-commit.d3ec352c",
72
+ "@aztec/noir-protocol-circuits-types": "0.0.1-commit.d3ec352c",
73
+ "@aztec/noir-types": "0.0.1-commit.d3ec352c",
74
+ "@aztec/protocol-contracts": "0.0.1-commit.d3ec352c",
75
+ "@aztec/simulator": "0.0.1-commit.d3ec352c",
76
+ "@aztec/stdlib": "0.0.1-commit.d3ec352c",
77
77
  "koa": "^2.16.1",
78
78
  "koa-router": "^13.1.1",
79
79
  "lodash.omit": "^4.5.0",
@@ -82,8 +82,8 @@
82
82
  "viem": "npm:@aztec/viem@2.38.2"
83
83
  },
84
84
  "devDependencies": {
85
- "@aztec/merkle-tree": "0.0.1-commit.9b94fc1",
86
- "@aztec/noir-test-contracts.js": "0.0.1-commit.9b94fc1",
85
+ "@aztec/merkle-tree": "0.0.1-commit.d3ec352c",
86
+ "@aztec/noir-test-contracts.js": "0.0.1-commit.d3ec352c",
87
87
  "@jest/globals": "^30.0.0",
88
88
  "@types/jest": "^30.0.0",
89
89
  "@types/lodash.omit": "^4.5.7",
@@ -1,4 +1,5 @@
1
1
  import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
2
+ import type { BlockNumber } from '@aztec/foundation/branded-types';
2
3
  import type { Fr, Point } from '@aztec/foundation/fields';
3
4
  import type { FunctionArtifactWithContractName, FunctionSelector } from '@aztec/stdlib/abi';
4
5
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
@@ -74,6 +75,7 @@ export interface ExecutionDataProvider {
74
75
  * Returns an object containing an array of note data.
75
76
  *
76
77
  * @param contractAddress - The contract address of the notes.
78
+ * @param owner - The owner of the notes.
77
79
  * @param storageSlot - The storage slot of the notes.
78
80
  * @param status - The status of notes to fetch.
79
81
  * @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
@@ -81,6 +83,7 @@ export interface ExecutionDataProvider {
81
83
  */
82
84
  getNotes(
83
85
  contractAddress: AztecAddress,
86
+ owner: AztecAddress,
84
87
  storageSlot: Fr,
85
88
  status: NoteStatus,
86
89
  scopes?: AztecAddress[],
@@ -149,7 +152,7 @@ export interface ExecutionDataProvider {
149
152
  * @param leafValue - The leaf value
150
153
  * @returns The index and sibling path concatenated [index, sibling_path]
151
154
  */
152
- getMembershipWitness(blockNumber: number, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]>;
155
+ getMembershipWitness(blockNumber: BlockNumber, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]>;
153
156
 
154
157
  /**
155
158
  * Returns a nullifier membership witness for a given nullifier at a given block.
@@ -157,7 +160,10 @@ export interface ExecutionDataProvider {
157
160
  * @param nullifier - Nullifier we try to find witness for.
158
161
  * @returns The nullifier membership witness (if found).
159
162
  */
160
- getNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
163
+ getNullifierMembershipWitness(
164
+ blockNumber: BlockNumber,
165
+ nullifier: Fr,
166
+ ): Promise<NullifierMembershipWitness | undefined>;
161
167
 
162
168
  /**
163
169
  * Returns a low nullifier membership witness for a given nullifier at a given block.
@@ -168,14 +174,17 @@ export interface ExecutionDataProvider {
168
174
  * list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier
169
175
  * we are trying to prove non-inclusion for.
170
176
  */
171
- getLowNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
177
+ getLowNullifierMembershipWitness(
178
+ blockNumber: BlockNumber,
179
+ nullifier: Fr,
180
+ ): Promise<NullifierMembershipWitness | undefined>;
172
181
 
173
182
  /**
174
183
  * Returns a witness for a given slot of the public data tree at a given block.
175
184
  * @param blockNumber - The block number at which to get the witness.
176
185
  * @param leafSlot - The slot of the public data in the public data tree.
177
186
  */
178
- getPublicDataWitness(blockNumber: number, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
187
+ getPublicDataWitness(blockNumber: BlockNumber, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
179
188
 
180
189
  /**
181
190
  * Gets the storage value at the given contract storage slot.
@@ -189,14 +198,14 @@ export interface ExecutionDataProvider {
189
198
  * @returns Storage value at the given contract slot.
190
199
  * @throws If the contract is not deployed.
191
200
  */
192
- getPublicStorageAt(blockNumber: number, contract: AztecAddress, slot: Fr): Promise<Fr>;
201
+ getPublicStorageAt(blockNumber: BlockNumber, contract: AztecAddress, slot: Fr): Promise<Fr>;
193
202
 
194
203
  /**
195
204
  * Fetch a block corresponding to the given block number.
196
205
  * @param blockNumber - The block number of a block to fetch.
197
206
  * @returns - The block corresponding to the given block number. Undefined if it does not exist.
198
207
  */
199
- getBlock(blockNumber: number): Promise<L2Block | undefined>;
208
+ getBlock(blockNumber: BlockNumber): Promise<L2Block | undefined>;
200
209
 
201
210
  /**
202
211
  * Assert that the oracle version is compatible with the expected version.
@@ -173,11 +173,12 @@ export class ExecutionNoteCache {
173
173
  * Return notes created up to current point in execution.
174
174
  * If a nullifier for a note in this list is emitted, the note will be deleted.
175
175
  * @param contractAddress - Contract address of the notes.
176
+ * @param owner - Owner of the notes.
176
177
  * @param storageSlot - Storage slot of the notes.
177
178
  **/
178
- public getNotes(contractAddress: AztecAddress, storageSlot: Fr) {
179
+ public getNotes(contractAddress: AztecAddress, owner: AztecAddress, storageSlot: Fr) {
179
180
  const notes = this.noteMap.get(contractAddress.toBigInt()) ?? [];
180
- return notes.filter(n => n.note.storageSlot.equals(storageSlot)).map(n => n.note);
181
+ return notes.filter(n => n.note.owner.equals(owner) && n.note.storageSlot.equals(storageSlot)).map(n => n.note);
181
182
  }
182
183
 
183
184
  /**
@@ -4,7 +4,7 @@ import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import { TxHash } from '@aztec/stdlib/tx';
5
5
 
6
6
  // TODO(#14617): should we compute this from constants? This value is aztec-nr specific.
7
- export const MAX_NOTE_PACKED_LEN = 11;
7
+ export const MAX_NOTE_PACKED_LEN = 10;
8
8
 
9
9
  /**
10
10
  * Intermediate struct used to perform batch note validation by PXE. The `utilityValidateEnqueuedNotesAndEvents` oracle
@@ -13,6 +13,7 @@ export const MAX_NOTE_PACKED_LEN = 11;
13
13
  export class NoteValidationRequest {
14
14
  constructor(
15
15
  public contractAddress: AztecAddress,
16
+ public owner: AztecAddress,
16
17
  public storageSlot: Fr,
17
18
  public randomness: Fr,
18
19
  public noteNonce: Fr,
@@ -27,6 +28,7 @@ export class NoteValidationRequest {
27
28
  const reader = FieldReader.asReader(fields);
28
29
 
29
30
  const contractAddress = AztecAddress.fromField(reader.readField());
31
+ const owner = AztecAddress.fromField(reader.readField());
30
32
  const storageSlot = reader.readField();
31
33
  const randomness = reader.readField();
32
34
  const noteNonce = reader.readField();
@@ -48,6 +50,7 @@ export class NoteValidationRequest {
48
50
 
49
51
  return new NoteValidationRequest(
50
52
  contractAddress,
53
+ owner,
51
54
  storageSlot,
52
55
  randomness,
53
56
  noteNonce,
@@ -1,4 +1,5 @@
1
1
  import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
2
+ import type { BlockNumber } from '@aztec/foundation/branded-types';
2
3
  import { Fr, Point } from '@aztec/foundation/fields';
3
4
  import type { FunctionSelector, NoteSelector } from '@aztec/stdlib/abi';
4
5
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
@@ -21,6 +22,8 @@ export interface NoteData {
21
22
  note: Note;
22
23
  /** The address of the contract that owns the note. */
23
24
  contractAddress: AztecAddress;
25
+ /** The owner of the note. */
26
+ owner: AztecAddress;
24
27
  /** The storage slot of the note. */
25
28
  storageSlot: Fr;
26
29
  /** The randomness injected to the note */
@@ -62,20 +65,21 @@ export interface IUtilityExecutionOracle {
62
65
  utilityGetUtilityContext(): Promise<UtilityContext>;
63
66
  utilityGetKeyValidationRequest(pkMHash: Fr): Promise<KeyValidationRequest>;
64
67
  utilityGetContractInstance(address: AztecAddress): Promise<ContractInstance>;
65
- utilityGetMembershipWitness(blockNumber: number, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[] | undefined>;
68
+ utilityGetMembershipWitness(blockNumber: BlockNumber, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[] | undefined>;
66
69
  utilityGetNullifierMembershipWitness(
67
- blockNumber: number,
70
+ blockNumber: BlockNumber,
68
71
  nullifier: Fr,
69
72
  ): Promise<NullifierMembershipWitness | undefined>;
70
- utilityGetPublicDataWitness(blockNumber: number, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
73
+ utilityGetPublicDataWitness(blockNumber: BlockNumber, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
71
74
  utilityGetLowNullifierMembershipWitness(
72
- blockNumber: number,
75
+ blockNumber: BlockNumber,
73
76
  nullifier: Fr,
74
77
  ): Promise<NullifierMembershipWitness | undefined>;
75
- utilityGetBlockHeader(blockNumber: number): Promise<BlockHeader | undefined>;
78
+ utilityGetBlockHeader(blockNumber: BlockNumber): Promise<BlockHeader | undefined>;
76
79
  utilityGetPublicKeysAndPartialAddress(account: AztecAddress): Promise<CompleteAddress>;
77
80
  utilityGetAuthWitness(messageHash: Fr): Promise<Fr[] | undefined>;
78
81
  utilityGetNotes(
82
+ owner: AztecAddress,
79
83
  storageSlot: Fr,
80
84
  numSelects: number,
81
85
  selectByIndexes: number[],
@@ -100,7 +104,7 @@ export interface IUtilityExecutionOracle {
100
104
  utilityStorageRead(
101
105
  contractAddress: AztecAddress,
102
106
  startStorageSlot: Fr,
103
- blockNumber: number,
107
+ blockNumber: BlockNumber,
104
108
  numberOfElements: number,
105
109
  ): Promise<Fr[]>;
106
110
  utilityFetchTaggedLogs(pendingTaggedLogArrayBaseSlot: Fr): Promise<void>;
@@ -132,6 +136,7 @@ export interface IPrivateExecutionOracle {
132
136
  privateStoreInExecutionCache(values: Fr[], hash: Fr): void;
133
137
  privateLoadFromExecutionCache(hash: Fr): Promise<Fr[]>;
134
138
  privateNotifyCreatedNote(
139
+ owner: AztecAddress,
135
140
  storageSlot: Fr,
136
141
  randomness: Fr,
137
142
  noteTypeId: NoteSelector,
@@ -1,3 +1,4 @@
1
+ import { BlockNumber } from '@aztec/foundation/branded-types';
1
2
  import { Fr, Point } from '@aztec/foundation/fields';
2
3
  import {
3
4
  type ACIRCallback,
@@ -145,7 +146,7 @@ export class Oracle {
145
146
  const parsedLeafValue = Fr.fromString(leafValue);
146
147
 
147
148
  const witness = await this.handlerAsUtility().utilityGetMembershipWitness(
148
- parsedBlockNumber,
149
+ BlockNumber(parsedBlockNumber),
149
150
  parsedTreeId,
150
151
  parsedLeafValue,
151
152
  );
@@ -165,7 +166,7 @@ export class Oracle {
165
166
  const parsedNullifier = Fr.fromString(nullifier);
166
167
 
167
168
  const witness = await this.handlerAsUtility().utilityGetNullifierMembershipWitness(
168
- parsedBlockNumber,
169
+ BlockNumber(parsedBlockNumber),
169
170
  parsedNullifier,
170
171
  );
171
172
  if (!witness) {
@@ -182,7 +183,7 @@ export class Oracle {
182
183
  const parsedNullifier = Fr.fromString(nullifier);
183
184
 
184
185
  const witness = await this.handlerAsUtility().utilityGetLowNullifierMembershipWitness(
185
- parsedBlockNumber,
186
+ BlockNumber(parsedBlockNumber),
186
187
  parsedNullifier,
187
188
  );
188
189
  if (!witness) {
@@ -200,7 +201,10 @@ export class Oracle {
200
201
  const parsedBlockNumber = Fr.fromString(blockNumber).toNumber();
201
202
  const parsedLeafSlot = Fr.fromString(leafSlot);
202
203
 
203
- const witness = await this.handlerAsUtility().utilityGetPublicDataWitness(parsedBlockNumber, parsedLeafSlot);
204
+ const witness = await this.handlerAsUtility().utilityGetPublicDataWitness(
205
+ BlockNumber(parsedBlockNumber),
206
+ parsedLeafSlot,
207
+ );
204
208
  if (!witness) {
205
209
  throw new Error(`Public data witness not found for slot ${parsedLeafSlot} at block ${parsedBlockNumber}.`);
206
210
  }
@@ -210,7 +214,7 @@ export class Oracle {
210
214
  async utilityGetBlockHeader([blockNumber]: ACVMField[]): Promise<ACVMField[]> {
211
215
  const parsedBlockNumber = Fr.fromString(blockNumber).toNumber();
212
216
 
213
- const header = await this.handlerAsUtility().utilityGetBlockHeader(parsedBlockNumber);
217
+ const header = await this.handlerAsUtility().utilityGetBlockHeader(BlockNumber(parsedBlockNumber));
214
218
  if (!header) {
215
219
  throw new Error(`Block header not found for block ${parsedBlockNumber}.`);
216
220
  }
@@ -235,6 +239,7 @@ export class Oracle {
235
239
  }
236
240
 
237
241
  async utilityGetNotes(
242
+ [owner]: ACVMField[],
238
243
  [storageSlot]: ACVMField[],
239
244
  [numSelects]: ACVMField[],
240
245
  selectByIndexes: ACVMField[],
@@ -253,6 +258,7 @@ export class Oracle {
253
258
  [packedRetrievedNoteLength]: ACVMField[],
254
259
  ): Promise<(ACVMField | ACVMField[])[]> {
255
260
  const noteDatas = await this.handlerAsUtility().utilityGetNotes(
261
+ AztecAddress.fromString(owner),
256
262
  Fr.fromString(storageSlot),
257
263
  +numSelects,
258
264
  selectByIndexes.map(s => +s),
@@ -281,6 +287,7 @@ export class Oracle {
281
287
  }
282
288
 
283
289
  privateNotifyCreatedNote(
290
+ [owner]: ACVMField[],
284
291
  [storageSlot]: ACVMField[],
285
292
  [randomness]: ACVMField[],
286
293
  [noteTypeId]: ACVMField[],
@@ -289,6 +296,7 @@ export class Oracle {
289
296
  [counter]: ACVMField[],
290
297
  ): Promise<ACVMField[]> {
291
298
  this.handlerAsPrivate().privateNotifyCreatedNote(
299
+ AztecAddress.fromString(owner),
292
300
  Fr.fromString(storageSlot),
293
301
  Fr.fromString(randomness),
294
302
  NoteSelector.fromField(Fr.fromString(noteTypeId)),
@@ -344,7 +352,7 @@ export class Oracle {
344
352
  const values = await this.handlerAsUtility().utilityStorageRead(
345
353
  new AztecAddress(Fr.fromString(contractAddress)),
346
354
  Fr.fromString(startStorageSlot),
347
- +blockNumber,
355
+ BlockNumber(+blockNumber),
348
356
  +numberOfElements,
349
357
  );
350
358
  return [values.map(toACVMField)];
@@ -1,4 +1,5 @@
1
1
  import { PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH, PRIVATE_CONTEXT_INPUTS_LENGTH } from '@aztec/constants';
2
+ import { BlockNumber } from '@aztec/foundation/branded-types';
2
3
  import { Fr } from '@aztec/foundation/fields';
3
4
  import { createLogger } from '@aztec/foundation/log';
4
5
  import { Timer } from '@aztec/foundation/timer';
@@ -162,7 +163,7 @@ export async function readCurrentClassId(
162
163
  contractAddress: AztecAddress,
163
164
  instance: ContractInstance,
164
165
  executionDataProvider: ExecutionDataProvider | AztecNode,
165
- blockNumber: number,
166
+ blockNumber: BlockNumber,
166
167
  timestamp: UInt64,
167
168
  ) {
168
169
  const { delayedPublicMutableSlot } = await DelayedPublicMutableValuesWithHash.getContractUpdateSlots(contractAddress);
@@ -282,6 +282,7 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
282
282
  * Real notes coming from DB will have a leafIndex which
283
283
  * represents their index in the note hash tree.
284
284
  *
285
+ * @param owner - The owner of the notes.
285
286
  * @param storageSlot - The storage slot.
286
287
  * @param numSelects - The number of valid selects in selectBy and selectValues.
287
288
  * @param selectBy - An array of indices of the fields to selects.
@@ -295,6 +296,7 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
295
296
  * @returns Array of note data.
296
297
  */
297
298
  public override async utilityGetNotes(
299
+ owner: AztecAddress,
298
300
  storageSlot: Fr,
299
301
  numSelects: number,
300
302
  selectByIndexes: number[],
@@ -311,11 +313,12 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
311
313
  status: NoteStatus,
312
314
  ): Promise<NoteData[]> {
313
315
  // Nullified pending notes are already removed from the list.
314
- const pendingNotes = this.noteCache.getNotes(this.callContext.contractAddress, storageSlot);
316
+ const pendingNotes = this.noteCache.getNotes(this.callContext.contractAddress, owner, storageSlot);
315
317
 
316
318
  const pendingNullifiers = this.noteCache.getNullifiers(this.callContext.contractAddress);
317
319
  const dbNotes = await this.executionDataProvider.getNotes(
318
320
  this.callContext.contractAddress,
321
+ owner,
319
322
  storageSlot,
320
323
  status,
321
324
  this.scopes,
@@ -365,7 +368,7 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
365
368
  /**
366
369
  * Keep track of the new note created during execution.
367
370
  * It can be used in subsequent calls (or transactions when chaining txs is possible).
368
- * @param contractAddress - The contract address.
371
+ * @param owner - The owner of the note.
369
372
  * @param storageSlot - The storage slot.
370
373
  * @param randomness - The randomness injected into the note.
371
374
  * @param noteTypeId - The type ID of the note.
@@ -374,6 +377,7 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
374
377
  * @returns
375
378
  */
376
379
  public privateNotifyCreatedNote(
380
+ owner: AztecAddress,
377
381
  storageSlot: Fr,
378
382
  randomness: Fr,
379
383
  noteTypeId: NoteSelector,
@@ -393,6 +397,7 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
393
397
  this.noteCache.addNewNote(
394
398
  {
395
399
  contractAddress: this.callContext.contractAddress,
400
+ owner,
396
401
  storageSlot,
397
402
  randomness,
398
403
  noteNonce: Fr.ZERO, // Nonce cannot be known during private execution.
@@ -1,3 +1,4 @@
1
+ import type { BlockNumber } from '@aztec/foundation/branded-types';
1
2
  import { Aes128 } from '@aztec/foundation/crypto';
2
3
  import { Fr, Point } from '@aztec/foundation/fields';
3
4
  import { LogLevels, applyStringFormatting, createLogger } from '@aztec/foundation/log';
@@ -70,7 +71,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
70
71
  * @param leafValue - The leaf value
71
72
  * @returns The index and sibling path concatenated [index, sibling_path]
72
73
  */
73
- public utilityGetMembershipWitness(blockNumber: number, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]> {
74
+ public utilityGetMembershipWitness(blockNumber: BlockNumber, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]> {
74
75
  return this.executionDataProvider.getMembershipWitness(blockNumber, treeId, leafValue);
75
76
  }
76
77
 
@@ -81,7 +82,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
81
82
  * @returns The nullifier membership witness (if found).
82
83
  */
83
84
  public async utilityGetNullifierMembershipWitness(
84
- blockNumber: number,
85
+ blockNumber: BlockNumber,
85
86
  nullifier: Fr,
86
87
  ): Promise<NullifierMembershipWitness | undefined> {
87
88
  return await this.executionDataProvider.getNullifierMembershipWitness(blockNumber, nullifier);
@@ -97,7 +98,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
97
98
  * we are trying to prove non-inclusion for.
98
99
  */
99
100
  public async utilityGetLowNullifierMembershipWitness(
100
- blockNumber: number,
101
+ blockNumber: BlockNumber,
101
102
  nullifier: Fr,
102
103
  ): Promise<NullifierMembershipWitness | undefined> {
103
104
  return await this.executionDataProvider.getLowNullifierMembershipWitness(blockNumber, nullifier);
@@ -109,7 +110,10 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
109
110
  * @param leafSlot - The slot of the public data tree to get the witness for.
110
111
  * @returns - The witness
111
112
  */
112
- public async utilityGetPublicDataWitness(blockNumber: number, leafSlot: Fr): Promise<PublicDataWitness | undefined> {
113
+ public async utilityGetPublicDataWitness(
114
+ blockNumber: BlockNumber,
115
+ leafSlot: Fr,
116
+ ): Promise<PublicDataWitness | undefined> {
113
117
  return await this.executionDataProvider.getPublicDataWitness(blockNumber, leafSlot);
114
118
  }
115
119
 
@@ -118,7 +122,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
118
122
  * @param blockNumber - The number of a block of which to get the block header.
119
123
  * @returns Block extracted from a block with block number `blockNumber`.
120
124
  */
121
- public async utilityGetBlockHeader(blockNumber: number): Promise<BlockHeader | undefined> {
125
+ public async utilityGetBlockHeader(blockNumber: BlockNumber): Promise<BlockHeader | undefined> {
122
126
  const block = await this.executionDataProvider.getBlock(blockNumber);
123
127
  if (!block) {
124
128
  return undefined;
@@ -164,6 +168,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
164
168
  * Real notes coming from DB will have a leafIndex which
165
169
  * represents their index in the note hash tree.
166
170
  *
171
+ * @param owner - The owner of the notes.
167
172
  * @param storageSlot - The storage slot.
168
173
  * @param numSelects - The number of valid selects in selectBy and selectValues.
169
174
  * @param selectBy - An array of indices of the fields to selects.
@@ -177,6 +182,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
177
182
  * @returns Array of note data.
178
183
  */
179
184
  public async utilityGetNotes(
185
+ owner: AztecAddress,
180
186
  storageSlot: Fr,
181
187
  numSelects: number,
182
188
  selectByIndexes: number[],
@@ -192,7 +198,13 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
192
198
  offset: number,
193
199
  status: NoteStatus,
194
200
  ): Promise<NoteData[]> {
195
- const dbNotes = await this.executionDataProvider.getNotes(this.contractAddress, storageSlot, status, this.scopes);
201
+ const dbNotes = await this.executionDataProvider.getNotes(
202
+ this.contractAddress,
203
+ owner,
204
+ storageSlot,
205
+ status,
206
+ this.scopes,
207
+ );
196
208
  return pickNotes<NoteData>(dbNotes, {
197
209
  selects: selectByIndexes.slice(0, numSelects).map((index, i) => ({
198
210
  selector: { index, offset: selectByOffsets[i], length: selectByLengths[i] },
@@ -241,7 +253,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
241
253
  public async utilityStorageRead(
242
254
  contractAddress: AztecAddress,
243
255
  startStorageSlot: Fr,
244
- blockNumber: number,
256
+ blockNumber: BlockNumber,
245
257
  numberOfElements: number,
246
258
  ) {
247
259
  const values = [];