@aztec/pxe 0.0.1-commit.7035c9bd6 → 0.0.1-commit.71324e566
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.
- package/dest/bin/check_oracle_version.js +4 -4
- package/dest/block_synchronizer/block_synchronizer.d.ts +6 -2
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
- package/dest/block_synchronizer/block_synchronizer.js +19 -1
- package/dest/config/index.d.ts +1 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +7 -14
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +6 -4
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +10 -5
- package/dest/contract_function_simulator/ephemeral_array_service.d.ts +28 -0
- package/dest/contract_function_simulator/ephemeral_array_service.d.ts.map +1 -0
- package/dest/contract_function_simulator/ephemeral_array_service.js +78 -0
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +3 -4
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +3 -6
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +3 -4
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.js +3 -6
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +31 -20
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts +1 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.js +28 -23
- package/dest/contract_function_simulator/oracle/oracle.d.ts +50 -20
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +157 -41
- package/dest/contract_function_simulator/oracle/private_execution.js +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +8 -9
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +21 -11
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +58 -42
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +204 -96
- package/dest/contract_function_simulator/pick_notes.d.ts +1 -1
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
- package/dest/contract_function_simulator/pick_notes.js +20 -3
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.js +3 -0
- package/dest/contract_logging.d.ts +9 -4
- package/dest/contract_logging.d.ts.map +1 -1
- package/dest/contract_logging.js +21 -6
- package/dest/contract_sync/contract_sync_service.d.ts +3 -4
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -1
- package/dest/contract_sync/contract_sync_service.js +37 -35
- package/dest/contract_sync/helpers.d.ts +2 -3
- package/dest/contract_sync/helpers.d.ts.map +1 -1
- package/dest/contract_sync/helpers.js +7 -2
- package/dest/debug/pxe_debug_utils.d.ts +3 -3
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.d.ts +1 -2
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +0 -1
- package/dest/entrypoints/client/bundle/utils.d.ts +2 -2
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +2 -2
- package/dest/entrypoints/client/lazy/index.d.ts +1 -2
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +0 -1
- package/dest/entrypoints/client/lazy/utils.d.ts +2 -2
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +2 -2
- package/dest/entrypoints/pxe_creation_options.d.ts +3 -1
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/pxe_creation_options.js +3 -1
- package/dest/entrypoints/server/index.d.ts +2 -3
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +1 -2
- package/dest/entrypoints/server/utils.d.ts +2 -2
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +2 -2
- package/dest/events/event_service.d.ts +3 -2
- package/dest/events/event_service.d.ts.map +1 -1
- package/dest/events/event_service.js +16 -4
- package/dest/events/private_event_filter_validator.d.ts +3 -2
- package/dest/events/private_event_filter_validator.d.ts.map +1 -1
- package/dest/events/private_event_filter_validator.js +15 -0
- package/dest/logs/log_service.d.ts +7 -8
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +27 -37
- package/dest/messages/message_context_service.d.ts +3 -3
- package/dest/messages/message_context_service.d.ts.map +1 -1
- package/dest/messages/message_context_service.js +3 -3
- package/dest/notes/note_service.d.ts +4 -5
- package/dest/notes/note_service.d.ts.map +1 -1
- package/dest/notes/note_service.js +14 -5
- package/dest/notes_filter.d.ts +2 -3
- package/dest/notes_filter.d.ts.map +1 -1
- package/dest/oracle_version.d.ts +4 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +20 -10
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +4 -7
- package/dest/private_kernel/private_kernel_oracle.d.ts +5 -5
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +12 -15
- package/dest/pxe.d.ts +5 -5
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +18 -10
- package/dest/storage/anchor_block_store/anchor_block_store.js +1 -1
- package/dest/storage/capsule_store/capsule_service.d.ts +21 -0
- package/dest/storage/capsule_store/capsule_service.d.ts.map +1 -0
- package/dest/storage/capsule_store/capsule_service.js +50 -0
- package/dest/storage/capsule_store/capsule_store.d.ts +9 -9
- package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -1
- package/dest/storage/capsule_store/capsule_store.js +36 -28
- package/dest/storage/capsule_store/index.d.ts +2 -1
- package/dest/storage/capsule_store/index.d.ts.map +1 -1
- package/dest/storage/capsule_store/index.js +1 -0
- package/dest/storage/contract_store/contract_store.d.ts +1 -1
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
- package/dest/storage/contract_store/contract_store.js +4 -2
- package/dest/storage/metadata.d.ts +1 -1
- package/dest/storage/metadata.js +1 -1
- package/dest/storage/note_store/note_store.d.ts +1 -1
- package/dest/storage/note_store/note_store.d.ts.map +1 -1
- package/dest/storage/note_store/note_store.js +2 -2
- package/dest/storage/private_event_store/private_event_store.d.ts +1 -1
- package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
- package/dest/storage/private_event_store/private_event_store.js +3 -0
- package/dest/storage/private_event_store/stored_private_event.js +1 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +2 -2
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +2 -16
- package/package.json +16 -16
- package/src/bin/check_oracle_version.ts +4 -4
- package/src/block_synchronizer/block_synchronizer.ts +22 -2
- package/src/config/index.ts +2 -8
- package/src/contract_function_simulator/contract_function_simulator.ts +13 -8
- package/src/contract_function_simulator/ephemeral_array_service.ts +110 -0
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +1 -4
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +1 -1
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +1 -1
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +1 -4
- package/src/contract_function_simulator/oracle/interfaces.ts +46 -18
- package/src/contract_function_simulator/oracle/legacy_oracle_mappings.ts +20 -51
- package/src/contract_function_simulator/oracle/oracle.ts +222 -36
- package/src/contract_function_simulator/oracle/private_execution.ts +1 -1
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +28 -13
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +344 -123
- package/src/contract_function_simulator/pick_notes.ts +22 -3
- package/src/contract_function_simulator/proxied_contract_data_source.ts +8 -1
- package/src/contract_logging.ts +18 -5
- package/src/contract_sync/contract_sync_service.ts +64 -69
- package/src/contract_sync/helpers.ts +4 -4
- package/src/debug/pxe_debug_utils.ts +3 -3
- package/src/entrypoints/client/bundle/index.ts +0 -1
- package/src/entrypoints/client/bundle/utils.ts +2 -3
- package/src/entrypoints/client/lazy/index.ts +0 -1
- package/src/entrypoints/client/lazy/utils.ts +2 -3
- package/src/entrypoints/pxe_creation_options.ts +7 -0
- package/src/entrypoints/server/index.ts +1 -2
- package/src/entrypoints/server/utils.ts +2 -3
- package/src/events/event_service.ts +17 -4
- package/src/events/private_event_filter_validator.ts +21 -1
- package/src/logs/log_service.ts +57 -78
- package/src/messages/message_context_service.ts +3 -4
- package/src/notes/note_service.ts +18 -8
- package/src/notes_filter.ts +1 -3
- package/src/oracle_version.ts +20 -10
- package/src/private_kernel/private_kernel_execution_prover.ts +4 -9
- package/src/private_kernel/private_kernel_oracle.ts +14 -14
- package/src/pxe.ts +25 -14
- package/src/storage/anchor_block_store/anchor_block_store.ts +1 -1
- package/src/storage/capsule_store/capsule_service.ts +90 -0
- package/src/storage/capsule_store/capsule_store.ts +44 -26
- package/src/storage/capsule_store/index.ts +1 -0
- package/src/storage/contract_store/contract_store.ts +8 -6
- package/src/storage/metadata.ts +1 -1
- package/src/storage/note_store/note_store.ts +2 -5
- package/src/storage/private_event_store/private_event_store.ts +4 -0
- package/src/storage/private_event_store/stored_private_event.ts +1 -1
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +5 -15
- package/dest/access_scopes.d.ts +0 -9
- package/dest/access_scopes.d.ts.map +0 -1
- package/dest/access_scopes.js +0 -6
- package/dest/contract_function_simulator/noir-structs/message_tx_context.d.ts +0 -16
- package/dest/contract_function_simulator/noir-structs/message_tx_context.d.ts.map +0 -1
- package/dest/contract_function_simulator/noir-structs/message_tx_context.js +0 -57
- package/src/access_scopes.ts +0 -9
- package/src/contract_function_simulator/noir-structs/message_tx_context.ts +0 -55
|
@@ -42,7 +42,7 @@ import type { FunctionCall } from '@aztec/stdlib/abi';
|
|
|
42
42
|
import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
|
|
43
43
|
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
44
44
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
45
|
-
import type { BlockParameter } from '@aztec/stdlib/block';
|
|
45
|
+
import type { BlockParameter, L2TipsProvider } from '@aztec/stdlib/block';
|
|
46
46
|
import { Gas } from '@aztec/stdlib/gas';
|
|
47
47
|
import {
|
|
48
48
|
computeNoteHashNonce,
|
|
@@ -89,10 +89,10 @@ import {
|
|
|
89
89
|
getFinalMinRevertibleSideEffectCounter,
|
|
90
90
|
} from '@aztec/stdlib/tx';
|
|
91
91
|
|
|
92
|
-
import type { AccessScopes } from '../access_scopes.js';
|
|
93
92
|
import type { ContractSyncService } from '../contract_sync/contract_sync_service.js';
|
|
94
93
|
import type { MessageContextService } from '../messages/message_context_service.js';
|
|
95
94
|
import type { AddressStore } from '../storage/address_store/address_store.js';
|
|
95
|
+
import { CapsuleService } from '../storage/capsule_store/capsule_service.js';
|
|
96
96
|
import type { CapsuleStore } from '../storage/capsule_store/capsule_store.js';
|
|
97
97
|
import type { ContractStore } from '../storage/contract_store/contract_store.js';
|
|
98
98
|
import type { NoteStore } from '../storage/note_store/note_store.js';
|
|
@@ -122,7 +122,7 @@ export type ContractSimulatorRunOpts = {
|
|
|
122
122
|
/** The address used as a tagging sender when emitting private logs. */
|
|
123
123
|
senderForTags?: AztecAddress;
|
|
124
124
|
/** The accounts whose notes we can access in this call. */
|
|
125
|
-
scopes:
|
|
125
|
+
scopes: AztecAddress[];
|
|
126
126
|
/** The job ID for staged writes. */
|
|
127
127
|
jobId: string;
|
|
128
128
|
};
|
|
@@ -134,6 +134,7 @@ export type ContractFunctionSimulatorArgs = {
|
|
|
134
134
|
keyStore: KeyStore;
|
|
135
135
|
addressStore: AddressStore;
|
|
136
136
|
aztecNode: AztecNode;
|
|
137
|
+
l2TipsStore: L2TipsProvider;
|
|
137
138
|
senderTaggingStore: SenderTaggingStore;
|
|
138
139
|
recipientTaggingStore: RecipientTaggingStore;
|
|
139
140
|
senderAddressBookStore: SenderAddressBookStore;
|
|
@@ -154,6 +155,7 @@ export class ContractFunctionSimulator {
|
|
|
154
155
|
private readonly keyStore: KeyStore;
|
|
155
156
|
private readonly addressStore: AddressStore;
|
|
156
157
|
private readonly aztecNode: AztecNode;
|
|
158
|
+
private readonly l2TipsStore: L2TipsProvider;
|
|
157
159
|
private readonly senderTaggingStore: SenderTaggingStore;
|
|
158
160
|
private readonly recipientTaggingStore: RecipientTaggingStore;
|
|
159
161
|
private readonly senderAddressBookStore: SenderAddressBookStore;
|
|
@@ -169,6 +171,7 @@ export class ContractFunctionSimulator {
|
|
|
169
171
|
this.keyStore = args.keyStore;
|
|
170
172
|
this.addressStore = args.addressStore;
|
|
171
173
|
this.aztecNode = args.aztecNode;
|
|
174
|
+
this.l2TipsStore = args.l2TipsStore;
|
|
172
175
|
this.senderTaggingStore = args.senderTaggingStore;
|
|
173
176
|
this.recipientTaggingStore = args.recipientTaggingStore;
|
|
174
177
|
this.senderAddressBookStore = args.senderAddressBookStore;
|
|
@@ -205,7 +208,7 @@ export class ContractFunctionSimulator {
|
|
|
205
208
|
}
|
|
206
209
|
|
|
207
210
|
if (request.origin !== contractAddress) {
|
|
208
|
-
|
|
211
|
+
throw new Error(
|
|
209
212
|
`Request origin does not match contract address in simulation. Request origin: ${request.origin}, contract address: ${contractAddress}`,
|
|
210
213
|
);
|
|
211
214
|
}
|
|
@@ -245,7 +248,7 @@ export class ContractFunctionSimulator {
|
|
|
245
248
|
senderTaggingStore: this.senderTaggingStore,
|
|
246
249
|
recipientTaggingStore: this.recipientTaggingStore,
|
|
247
250
|
senderAddressBookStore: this.senderAddressBookStore,
|
|
248
|
-
|
|
251
|
+
capsuleService: new CapsuleService(this.capsuleStore, scopes),
|
|
249
252
|
privateEventStore: this.privateEventStore,
|
|
250
253
|
messageContextService: this.messageContextService,
|
|
251
254
|
contractSyncService: this.contractSyncService,
|
|
@@ -255,6 +258,7 @@ export class ContractFunctionSimulator {
|
|
|
255
258
|
scopes,
|
|
256
259
|
senderForTags,
|
|
257
260
|
simulator: this.simulator,
|
|
261
|
+
l2TipsStore: this.l2TipsStore,
|
|
258
262
|
});
|
|
259
263
|
|
|
260
264
|
const setupTime = simulatorSetupTimer.ms();
|
|
@@ -284,7 +288,7 @@ export class ContractFunctionSimulator {
|
|
|
284
288
|
);
|
|
285
289
|
const publicFunctionsCalldata = await Promise.all(
|
|
286
290
|
publicCallRequests.map(async r => {
|
|
287
|
-
const calldata = await privateExecutionOracle.
|
|
291
|
+
const calldata = await privateExecutionOracle.getHashPreimage(r.calldataHash);
|
|
288
292
|
return new HashedValues(calldata, r.calldataHash);
|
|
289
293
|
}),
|
|
290
294
|
);
|
|
@@ -319,7 +323,7 @@ export class ContractFunctionSimulator {
|
|
|
319
323
|
call: FunctionCall,
|
|
320
324
|
authwits: AuthWitness[],
|
|
321
325
|
anchorBlockHeader: BlockHeader,
|
|
322
|
-
scopes:
|
|
326
|
+
scopes: AztecAddress[],
|
|
323
327
|
jobId: string,
|
|
324
328
|
): Promise<{ result: Fr[]; offchainEffects: OffchainEffect[] }> {
|
|
325
329
|
const entryPointArtifact = await this.contractStore.getFunctionArtifactWithDebugMetadata(call.to, call.selector);
|
|
@@ -340,10 +344,11 @@ export class ContractFunctionSimulator {
|
|
|
340
344
|
aztecNode: this.aztecNode,
|
|
341
345
|
recipientTaggingStore: this.recipientTaggingStore,
|
|
342
346
|
senderAddressBookStore: this.senderAddressBookStore,
|
|
343
|
-
|
|
347
|
+
capsuleService: new CapsuleService(this.capsuleStore, scopes),
|
|
344
348
|
privateEventStore: this.privateEventStore,
|
|
345
349
|
messageContextService: this.messageContextService,
|
|
346
350
|
contractSyncService: this.contractSyncService,
|
|
351
|
+
l2TipsStore: this.l2TipsStore,
|
|
347
352
|
jobId,
|
|
348
353
|
scopes,
|
|
349
354
|
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
|
|
3
|
+
/** In-memory store for ephemeral arrays scoped to a single contract call frame. */
|
|
4
|
+
export class EphemeralArrayService {
|
|
5
|
+
/**
|
|
6
|
+
* Maps a slot to the elements of the array stored at that slot. Each element is a serialized representation of
|
|
7
|
+
* the original type.
|
|
8
|
+
*/
|
|
9
|
+
#arrays: Map<string, Fr[][]> = new Map();
|
|
10
|
+
|
|
11
|
+
/** Returns all elements in the array, or an empty array if uninitialized. */
|
|
12
|
+
readArrayAt(slot: Fr): Fr[][] {
|
|
13
|
+
return this.#arrays.get(slot.toString()) ?? [];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
#setArray(slot: Fr, array: Fr[][]): void {
|
|
17
|
+
this.#arrays.set(slot.toString(), array);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Returns the number of elements in the array at the given slot. */
|
|
21
|
+
len(slot: Fr): number {
|
|
22
|
+
return this.readArrayAt(slot).length;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Appends an element to the array and returns the new length. */
|
|
26
|
+
push(slot: Fr, elements: Fr[]): number {
|
|
27
|
+
const array = this.readArrayAt(slot);
|
|
28
|
+
array.push(elements);
|
|
29
|
+
this.#setArray(slot, array);
|
|
30
|
+
return array.length;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Removes and returns the last element. Throws if empty. */
|
|
34
|
+
pop(slot: Fr): Fr[] {
|
|
35
|
+
const array = this.readArrayAt(slot);
|
|
36
|
+
if (array.length === 0) {
|
|
37
|
+
throw new Error(`Ephemeral array at slot ${slot} is empty`);
|
|
38
|
+
}
|
|
39
|
+
const element = array.pop()!;
|
|
40
|
+
this.#setArray(slot, array);
|
|
41
|
+
return element;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Returns the element at the given index. Throws if out of bounds. */
|
|
45
|
+
get(slot: Fr, index: number): Fr[] {
|
|
46
|
+
const array = this.readArrayAt(slot);
|
|
47
|
+
if (index < 0 || index >= array.length) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
`Ephemeral array index ${index} out of bounds for array of length ${array.length} at slot ${slot}`,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
return array[index];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Overwrites the element at the given index. Throws if out of bounds. */
|
|
56
|
+
set(slot: Fr, index: number, value: Fr[]): void {
|
|
57
|
+
const array = this.readArrayAt(slot);
|
|
58
|
+
if (index < 0 || index >= array.length) {
|
|
59
|
+
throw new Error(
|
|
60
|
+
`Ephemeral array index ${index} out of bounds for array of length ${array.length} at slot ${slot}`,
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
array[index] = value;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Removes the element at the given index, shifting subsequent elements backward. Throws if out of bounds. */
|
|
67
|
+
remove(slot: Fr, index: number): void {
|
|
68
|
+
const array = this.readArrayAt(slot);
|
|
69
|
+
if (index < 0 || index >= array.length) {
|
|
70
|
+
throw new Error(
|
|
71
|
+
`Ephemeral array index ${index} out of bounds for array of length ${array.length} at slot ${slot}`,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
array.splice(index, 1);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Removes all elements from the array. */
|
|
78
|
+
clear(slot: Fr): void {
|
|
79
|
+
this.#arrays.delete(slot.toString());
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** Allocates a fresh, unused slot for a new ephemeral array. */
|
|
83
|
+
allocateSlot(): Fr {
|
|
84
|
+
let slot: Fr;
|
|
85
|
+
do {
|
|
86
|
+
slot = Fr.random();
|
|
87
|
+
} while (this.#arrays.has(slot.toString()));
|
|
88
|
+
return slot;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Creates a new ephemeral array pre-populated with the given elements and returns its slot. */
|
|
92
|
+
newArray(elements: Fr[][]): Fr {
|
|
93
|
+
const slot = this.allocateSlot();
|
|
94
|
+
this.#setArray(slot, elements);
|
|
95
|
+
return slot;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Copies `count` elements from the source array to the destination array (overwrites destination). */
|
|
99
|
+
copy(srcSlot: Fr, dstSlot: Fr, count: number): void {
|
|
100
|
+
const srcArray = this.readArrayAt(srcSlot);
|
|
101
|
+
if (count > srcArray.length) {
|
|
102
|
+
throw new Error(
|
|
103
|
+
`Cannot copy ${count} elements from ephemeral array of length ${srcArray.length} at slot ${srcSlot}`,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
// Deep copy the elements to avoid aliasing
|
|
107
|
+
const copied = srcArray.slice(0, count).map(el => [...el]);
|
|
108
|
+
this.#setArray(dstSlot, copied);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -6,7 +6,7 @@ import { TxHash } from '@aztec/stdlib/tx';
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Intermediate struct used to perform batch event validation by PXE. The `utilityValidateAndStoreEnqueuedNotesAndEvents` oracle
|
|
9
|
-
* expects for values of this type to be stored in a `
|
|
9
|
+
* expects for values of this type to be stored in a `EphemeralArray`.
|
|
10
10
|
*/
|
|
11
11
|
export class EventValidationRequest {
|
|
12
12
|
constructor(
|
|
@@ -16,7 +16,6 @@ export class EventValidationRequest {
|
|
|
16
16
|
public serializedEvent: Fr[],
|
|
17
17
|
public eventCommitment: Fr,
|
|
18
18
|
public txHash: TxHash,
|
|
19
|
-
public recipient: AztecAddress,
|
|
20
19
|
) {}
|
|
21
20
|
|
|
22
21
|
static fromFields(fields: Fr[], maxEventSerializedLen: number): EventValidationRequest {
|
|
@@ -33,7 +32,6 @@ export class EventValidationRequest {
|
|
|
33
32
|
|
|
34
33
|
const eventCommitment = reader.readField();
|
|
35
34
|
const txHash = TxHash.fromField(reader.readField());
|
|
36
|
-
const recipient = AztecAddress.fromField(reader.readField());
|
|
37
35
|
|
|
38
36
|
if (reader.remainingFields() !== 0) {
|
|
39
37
|
throw new Error(
|
|
@@ -48,7 +46,6 @@ export class EventValidationRequest {
|
|
|
48
46
|
serializedEvent,
|
|
49
47
|
eventCommitment,
|
|
50
48
|
txHash,
|
|
51
|
-
recipient,
|
|
52
49
|
);
|
|
53
50
|
}
|
|
54
51
|
}
|
|
@@ -5,7 +5,7 @@ import { Tag } from '@aztec/stdlib/logs';
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Intermediate struct used to perform batch log retrieval by PXE. The `utilityBulkRetrieveLogs` oracle expects values of this
|
|
8
|
-
* type to be stored in a `
|
|
8
|
+
* type to be stored in a `EphemeralArray`.
|
|
9
9
|
*/
|
|
10
10
|
export class LogRetrievalRequest {
|
|
11
11
|
constructor(
|
|
@@ -7,7 +7,7 @@ const MAX_LOG_CONTENT_LEN = PRIVATE_LOG_CIPHERTEXT_LEN;
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Intermediate struct used to perform batch log retrieval by PXE. The `utilityBulkRetrieveLogs` oracle stores values of this
|
|
10
|
-
* type in a `
|
|
10
|
+
* type in a `EphemeralArray`.
|
|
11
11
|
*/
|
|
12
12
|
export class LogRetrievalResponse {
|
|
13
13
|
constructor(
|
|
@@ -5,7 +5,7 @@ import { TxHash } from '@aztec/stdlib/tx';
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Intermediate struct used to perform batch note validation by PXE. The `utilityValidateAndStoreEnqueuedNotesAndEvents` oracle
|
|
8
|
-
* expects for values of this type to be stored in a `
|
|
8
|
+
* expects for values of this type to be stored in a `EphemeralArray`.
|
|
9
9
|
*/
|
|
10
10
|
export class NoteValidationRequest {
|
|
11
11
|
constructor(
|
|
@@ -18,7 +18,6 @@ export class NoteValidationRequest {
|
|
|
18
18
|
public noteHash: Fr,
|
|
19
19
|
public nullifier: Fr,
|
|
20
20
|
public txHash: TxHash,
|
|
21
|
-
public recipient: AztecAddress,
|
|
22
21
|
) {}
|
|
23
22
|
|
|
24
23
|
static fromFields(fields: Fr[], maxNotePackedLen: number): NoteValidationRequest {
|
|
@@ -37,7 +36,6 @@ export class NoteValidationRequest {
|
|
|
37
36
|
const noteHash = reader.readField();
|
|
38
37
|
const nullifier = reader.readField();
|
|
39
38
|
const txHash = TxHash.fromField(reader.readField());
|
|
40
|
-
const recipient = AztecAddress.fromField(reader.readField());
|
|
41
39
|
|
|
42
40
|
if (reader.remainingFields() !== 0) {
|
|
43
41
|
throw new Error(
|
|
@@ -55,7 +53,6 @@ export class NoteValidationRequest {
|
|
|
55
53
|
noteHash,
|
|
56
54
|
nullifier,
|
|
57
55
|
txHash,
|
|
58
|
-
recipient,
|
|
59
56
|
);
|
|
60
57
|
}
|
|
61
58
|
}
|
|
@@ -54,7 +54,7 @@ export interface IMiscOracle {
|
|
|
54
54
|
isMisc: true;
|
|
55
55
|
|
|
56
56
|
getRandomField(): Fr;
|
|
57
|
-
assertCompatibleOracleVersion(
|
|
57
|
+
assertCompatibleOracleVersion(major: number, minor: number): void;
|
|
58
58
|
log(level: number, message: string, fields: Fr[]): Promise<void>;
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -86,7 +86,7 @@ export interface IUtilityExecutionOracle {
|
|
|
86
86
|
nullifier: Fr,
|
|
87
87
|
): Promise<NullifierMembershipWitness | undefined>;
|
|
88
88
|
getBlockHeader(blockNumber: BlockNumber): Promise<BlockHeader | undefined>;
|
|
89
|
-
|
|
89
|
+
getPublicKeysAndPartialAddress(
|
|
90
90
|
account: AztecAddress,
|
|
91
91
|
): Promise<{ publicKeys: PublicKeys; partialAddress: PartialAddress } | undefined>;
|
|
92
92
|
getAuthWitness(messageHash: Fr): Promise<Fr[] | undefined>;
|
|
@@ -107,44 +107,72 @@ export interface IUtilityExecutionOracle {
|
|
|
107
107
|
offset: number,
|
|
108
108
|
status: NoteStatus,
|
|
109
109
|
): Promise<NoteData[]>;
|
|
110
|
-
|
|
110
|
+
doesNullifierExist(innerNullifier: Fr): Promise<boolean>;
|
|
111
111
|
getL1ToL2MembershipWitness(
|
|
112
112
|
contractAddress: AztecAddress,
|
|
113
113
|
messageHash: Fr,
|
|
114
114
|
secret: Fr,
|
|
115
115
|
): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
|
|
116
|
-
|
|
116
|
+
getFromPublicStorage(
|
|
117
117
|
anchorBlockHash: BlockHash,
|
|
118
118
|
contractAddress: AztecAddress,
|
|
119
119
|
startStorageSlot: Fr,
|
|
120
120
|
numberOfElements: number,
|
|
121
121
|
): Promise<Fr[]>;
|
|
122
|
-
|
|
122
|
+
getPendingTaggedLogs(pendingTaggedLogArrayBaseSlot: Fr, scope: AztecAddress): Promise<void>;
|
|
123
|
+
getPendingTaggedLogsV2(scope: AztecAddress): Promise<Fr>;
|
|
123
124
|
validateAndStoreEnqueuedNotesAndEvents(
|
|
124
125
|
contractAddress: AztecAddress,
|
|
125
126
|
noteValidationRequestsArrayBaseSlot: Fr,
|
|
126
127
|
eventValidationRequestsArrayBaseSlot: Fr,
|
|
127
128
|
maxNotePackedLen: number,
|
|
128
129
|
maxEventSerializedLen: number,
|
|
130
|
+
scope: AztecAddress,
|
|
129
131
|
): Promise<void>;
|
|
130
|
-
|
|
132
|
+
getLogsByTag(
|
|
131
133
|
contractAddress: AztecAddress,
|
|
132
134
|
logRetrievalRequestsArrayBaseSlot: Fr,
|
|
133
135
|
logRetrievalResponsesArrayBaseSlot: Fr,
|
|
136
|
+
scope: AztecAddress,
|
|
134
137
|
): Promise<void>;
|
|
135
|
-
|
|
138
|
+
validateAndStoreEnqueuedNotesAndEventsV2(
|
|
139
|
+
noteValidationRequestsArrayBaseSlot: Fr,
|
|
140
|
+
eventValidationRequestsArrayBaseSlot: Fr,
|
|
141
|
+
maxNotePackedLen: number,
|
|
142
|
+
maxEventSerializedLen: number,
|
|
143
|
+
scope: AztecAddress,
|
|
144
|
+
): Promise<void>;
|
|
145
|
+
getLogsByTagV2(requestArrayBaseSlot: Fr): Promise<Fr>;
|
|
146
|
+
getMessageContextsByTxHashV2(requestArrayBaseSlot: Fr): Promise<Fr>;
|
|
147
|
+
getMessageContextsByTxHash(
|
|
136
148
|
contractAddress: AztecAddress,
|
|
137
149
|
messageContextRequestsArrayBaseSlot: Fr,
|
|
138
150
|
messageContextResponsesArrayBaseSlot: Fr,
|
|
151
|
+
scope: AztecAddress,
|
|
152
|
+
): Promise<void>;
|
|
153
|
+
setCapsule(contractAddress: AztecAddress, key: Fr, capsule: Fr[], scope: AztecAddress): void;
|
|
154
|
+
getCapsule(contractAddress: AztecAddress, key: Fr, scope: AztecAddress): Promise<Fr[] | null>;
|
|
155
|
+
deleteCapsule(contractAddress: AztecAddress, key: Fr, scope: AztecAddress): void;
|
|
156
|
+
copyCapsule(
|
|
157
|
+
contractAddress: AztecAddress,
|
|
158
|
+
srcKey: Fr,
|
|
159
|
+
dstKey: Fr,
|
|
160
|
+
numEntries: number,
|
|
161
|
+
scope: AztecAddress,
|
|
139
162
|
): Promise<void>;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
copyCapsule(contractAddress: AztecAddress, srcKey: Fr, dstKey: Fr, numEntries: number): Promise<void>;
|
|
144
|
-
aes128Decrypt(ciphertext: Buffer, iv: Buffer, symKey: Buffer): Promise<Buffer>;
|
|
145
|
-
getSharedSecret(address: AztecAddress, ephPk: Point): Promise<Point>;
|
|
146
|
-
invalidateContractSyncCache(contractAddress: AztecAddress, scopes: AztecAddress[]): void;
|
|
163
|
+
decryptAes128(ciphertext: Buffer, iv: Buffer, symKey: Buffer): Promise<Buffer>;
|
|
164
|
+
getSharedSecret(address: AztecAddress, ephPk: Point, contractAddress: AztecAddress): Promise<Fr>;
|
|
165
|
+
setContractSyncCacheInvalid(contractAddress: AztecAddress, scopes: AztecAddress[]): void;
|
|
147
166
|
emitOffchainEffect(data: Fr[]): Promise<void>;
|
|
167
|
+
|
|
168
|
+
// Ephemeral array methods
|
|
169
|
+
pushEphemeral(slot: Fr, elements: Fr[]): number;
|
|
170
|
+
popEphemeral(slot: Fr): Fr[];
|
|
171
|
+
getEphemeral(slot: Fr, index: number): Fr[];
|
|
172
|
+
setEphemeral(slot: Fr, index: number, elements: Fr[]): void;
|
|
173
|
+
getEphemeralLen(slot: Fr): number;
|
|
174
|
+
removeEphemeral(slot: Fr, index: number): void;
|
|
175
|
+
clearEphemeral(slot: Fr): void;
|
|
148
176
|
}
|
|
149
177
|
|
|
150
178
|
/**
|
|
@@ -154,8 +182,8 @@ export interface IUtilityExecutionOracle {
|
|
|
154
182
|
export interface IPrivateExecutionOracle {
|
|
155
183
|
isPrivate: true;
|
|
156
184
|
|
|
157
|
-
|
|
158
|
-
|
|
185
|
+
setHashPreimage(values: Fr[], hash: Fr): void;
|
|
186
|
+
getHashPreimage(hash: Fr): Promise<Fr[]>;
|
|
159
187
|
notifyCreatedNote(
|
|
160
188
|
owner: AztecAddress,
|
|
161
189
|
storageSlot: Fr,
|
|
@@ -176,9 +204,9 @@ export interface IPrivateExecutionOracle {
|
|
|
176
204
|
sideEffectCounter: number,
|
|
177
205
|
isStaticCall: boolean,
|
|
178
206
|
): Promise<{ endSideEffectCounter: Fr; returnsHash: Fr }>;
|
|
179
|
-
|
|
207
|
+
assertValidPublicCalldata(calldataHash: Fr): Promise<void>;
|
|
180
208
|
notifyRevertiblePhaseStart(minRevertibleSideEffectCounter: number): Promise<void>;
|
|
181
|
-
|
|
209
|
+
isExecutionInRevertiblePhase(sideEffectCounter: number): Promise<boolean>;
|
|
182
210
|
getSenderForTags(): Promise<AztecAddress | undefined>;
|
|
183
211
|
setSenderForTags(senderForTags: AztecAddress): Promise<void>;
|
|
184
212
|
getNextAppTagAsSender(sender: AztecAddress, recipient: AztecAddress): Promise<Tag>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toACVMField } from '@aztec/simulator/client';
|
|
2
2
|
import type { ACIRCallback, ACVMField } from '@aztec/simulator/client';
|
|
3
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
4
|
|
|
4
5
|
import type { Oracle } from './oracle.js';
|
|
5
6
|
|
|
@@ -9,6 +10,8 @@ import type { Oracle } from './oracle.js';
|
|
|
9
10
|
* TODO(F-416): Remove these aliases on v5 when protocol contracts are redeployed.
|
|
10
11
|
*/
|
|
11
12
|
export function buildLegacyOracleCallbacks(oracle: Oracle): ACIRCallback {
|
|
13
|
+
// If you are about to add a new mapping ensure that the old oracle name is different from the new one - this can
|
|
14
|
+
// commonly occur when only the args are getting modified.
|
|
12
15
|
return {
|
|
13
16
|
// Simple prefix renames (privateXxx/utilityXxx → aztec_prv_/aztec_utl_)
|
|
14
17
|
utilityLog: (
|
|
@@ -18,16 +21,21 @@ export function buildLegacyOracleCallbacks(oracle: Oracle): ACIRCallback {
|
|
|
18
21
|
fields: ACVMField[],
|
|
19
22
|
): Promise<ACVMField[]> => oracle.aztec_utl_log(level, message, _ignoredFieldsSize, fields),
|
|
20
23
|
utilityAssertCompatibleOracleVersion: (version: ACVMField[]): Promise<ACVMField[]> =>
|
|
21
|
-
oracle.
|
|
24
|
+
oracle.aztec_utl_assertCompatibleOracleVersionV2(version, [toACVMField(0)]),
|
|
25
|
+
// Old 1-arg oracle before minor/major split. Maps to V2 with minor=0.
|
|
26
|
+
// eslint-disable-next-line camelcase
|
|
27
|
+
aztec_utl_assertCompatibleOracleVersion: (version: ACVMField[]): Promise<ACVMField[]> =>
|
|
28
|
+
oracle.aztec_utl_assertCompatibleOracleVersionV2(version, [toACVMField(0)]),
|
|
22
29
|
utilityLoadCapsule: (
|
|
23
30
|
contractAddress: ACVMField[],
|
|
24
31
|
slot: ACVMField[],
|
|
25
32
|
tSize: ACVMField[],
|
|
26
|
-
): Promise<(ACVMField | ACVMField[])[]> =>
|
|
33
|
+
): Promise<(ACVMField | ACVMField[])[]> =>
|
|
34
|
+
oracle.aztec_utl_getCapsule(contractAddress, slot, tSize, [toACVMField(AztecAddress.ZERO)]),
|
|
27
35
|
privateStoreInExecutionCache: (values: ACVMField[], hash: ACVMField[]): Promise<ACVMField[]> =>
|
|
28
|
-
oracle.
|
|
36
|
+
oracle.aztec_prv_setHashPreimage(values, hash),
|
|
29
37
|
privateLoadFromExecutionCache: (returnsHash: ACVMField[]): Promise<ACVMField[][]> =>
|
|
30
|
-
oracle.
|
|
38
|
+
oracle.aztec_prv_getHashPreimage(returnsHash),
|
|
31
39
|
privateCallPrivateFunction: (
|
|
32
40
|
contractAddress: ACVMField[],
|
|
33
41
|
functionSelector: ACVMField[],
|
|
@@ -60,76 +68,37 @@ export function buildLegacyOracleCallbacks(oracle: Oracle): ACIRCallback {
|
|
|
60
68
|
startStorageSlot: ACVMField[],
|
|
61
69
|
numberOfElements: ACVMField[],
|
|
62
70
|
): Promise<ACVMField[][]> =>
|
|
63
|
-
oracle.
|
|
71
|
+
oracle.aztec_utl_getFromPublicStorage(blockHash, contractAddress, startStorageSlot, numberOfElements),
|
|
64
72
|
utilityStoreCapsule: (
|
|
65
73
|
contractAddress: ACVMField[],
|
|
66
74
|
slot: ACVMField[],
|
|
67
75
|
capsule: ACVMField[],
|
|
68
|
-
): Promise<ACVMField[]> =>
|
|
76
|
+
): Promise<ACVMField[]> =>
|
|
77
|
+
oracle.aztec_utl_setCapsule(contractAddress, slot, capsule, [toACVMField(AztecAddress.ZERO)]),
|
|
69
78
|
utilityCopyCapsule: (
|
|
70
79
|
contractAddress: ACVMField[],
|
|
71
80
|
srcSlot: ACVMField[],
|
|
72
81
|
dstSlot: ACVMField[],
|
|
73
82
|
numEntries: ACVMField[],
|
|
74
|
-
): Promise<ACVMField[]> => oracle.aztec_utl_copyCapsule(contractAddress, srcSlot, dstSlot, numEntries),
|
|
75
|
-
utilityDeleteCapsule: (contractAddress: ACVMField[], slot: ACVMField[]): Promise<ACVMField[]> =>
|
|
76
|
-
oracle.aztec_utl_deleteCapsule(contractAddress, slot),
|
|
77
|
-
utilityGetSharedSecret: (
|
|
78
|
-
address: ACVMField[],
|
|
79
|
-
ephPKField0: ACVMField[],
|
|
80
|
-
ephPKField1: ACVMField[],
|
|
81
|
-
ephPKField2: ACVMField[],
|
|
82
|
-
): Promise<ACVMField[]> => oracle.aztec_utl_getSharedSecret(address, ephPKField0, ephPKField1, ephPKField2),
|
|
83
|
-
utilityFetchTaggedLogs: (pendingTaggedLogArrayBaseSlot: ACVMField[]): Promise<ACVMField[]> =>
|
|
84
|
-
oracle.aztec_utl_fetchTaggedLogs(pendingTaggedLogArrayBaseSlot),
|
|
85
|
-
utilityBulkRetrieveLogs: (
|
|
86
|
-
contractAddress: ACVMField[],
|
|
87
|
-
logRetrievalRequestsArrayBaseSlot: ACVMField[],
|
|
88
|
-
logRetrievalResponsesArrayBaseSlot: ACVMField[],
|
|
89
83
|
): Promise<ACVMField[]> =>
|
|
90
|
-
oracle.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
logRetrievalResponsesArrayBaseSlot,
|
|
94
|
-
),
|
|
84
|
+
oracle.aztec_utl_copyCapsule(contractAddress, srcSlot, dstSlot, numEntries, [toACVMField(AztecAddress.ZERO)]),
|
|
85
|
+
utilityDeleteCapsule: (contractAddress: ACVMField[], slot: ACVMField[]): Promise<ACVMField[]> =>
|
|
86
|
+
oracle.aztec_utl_deleteCapsule(contractAddress, slot, [toACVMField(AztecAddress.ZERO)]),
|
|
95
87
|
utilityGetL1ToL2MembershipWitness: (
|
|
96
88
|
contractAddress: ACVMField[],
|
|
97
89
|
messageHash: ACVMField[],
|
|
98
90
|
secret: ACVMField[],
|
|
99
91
|
): Promise<(ACVMField | ACVMField[])[]> =>
|
|
100
92
|
oracle.aztec_utl_getL1ToL2MembershipWitness(contractAddress, messageHash, secret),
|
|
101
|
-
utilityEmitOffchainEffect: (data: ACVMField[]): Promise<ACVMField[]> => oracle.aztec_utl_emitOffchainEffect(data),
|
|
102
|
-
// Adapter: old 3-param signature → new 5-param with injected constants.
|
|
103
|
-
// Values derived from: MAX_MESSAGE_CONTENT_LEN(11) - RESERVED_FIELDS (3 for notes, 1 for events).
|
|
104
|
-
utilityValidateAndStoreEnqueuedNotesAndEvents: (
|
|
105
|
-
contractAddress: ACVMField[],
|
|
106
|
-
noteValidationRequestsArrayBaseSlot: ACVMField[],
|
|
107
|
-
eventValidationRequestsArrayBaseSlot: ACVMField[],
|
|
108
|
-
): Promise<ACVMField[]> =>
|
|
109
|
-
oracle.aztec_utl_validateAndStoreEnqueuedNotesAndEvents(
|
|
110
|
-
contractAddress,
|
|
111
|
-
noteValidationRequestsArrayBaseSlot,
|
|
112
|
-
eventValidationRequestsArrayBaseSlot,
|
|
113
|
-
[new Fr(8).toString()],
|
|
114
|
-
[new Fr(10).toString()],
|
|
115
|
-
),
|
|
116
93
|
// Renames (same signature, different oracle name)
|
|
117
94
|
privateNotifySetMinRevertibleSideEffectCounter: (counter: ACVMField[]): Promise<ACVMField[]> =>
|
|
118
95
|
oracle.aztec_prv_notifyRevertiblePhaseStart(counter),
|
|
119
|
-
privateIsSideEffectCounterRevertible: (sideEffectCounter: ACVMField[]): Promise<ACVMField[]> =>
|
|
120
|
-
oracle.aztec_prv_inRevertiblePhase(sideEffectCounter),
|
|
121
96
|
// Signature changes: old 4-param oracles → new 1-param validatePublicCalldata
|
|
122
97
|
privateNotifyEnqueuedPublicFunctionCall: (
|
|
123
98
|
_contractAddress: ACVMField[],
|
|
124
99
|
calldataHash: ACVMField[],
|
|
125
100
|
_sideEffectCounter: ACVMField[],
|
|
126
101
|
_isStaticCall: ACVMField[],
|
|
127
|
-
): Promise<ACVMField[]> => oracle.
|
|
128
|
-
privateNotifySetPublicTeardownFunctionCall: (
|
|
129
|
-
_contractAddress: ACVMField[],
|
|
130
|
-
calldataHash: ACVMField[],
|
|
131
|
-
_sideEffectCounter: ACVMField[],
|
|
132
|
-
_isStaticCall: ACVMField[],
|
|
133
|
-
): Promise<ACVMField[]> => oracle.aztec_prv_validatePublicCalldata(calldataHash),
|
|
102
|
+
): Promise<ACVMField[]> => oracle.aztec_prv_assertValidPublicCalldata(calldataHash),
|
|
134
103
|
};
|
|
135
104
|
}
|