@aztec/pxe 1.2.1 → 2.0.0-nightly.20250813
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/config/package_info.js +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +5 -2
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +48 -29
- package/dest/contract_function_simulator/index.d.ts +1 -0
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +1 -0
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +1 -1
- 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 +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.js +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +22 -0
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +49 -0
- package/dest/contract_function_simulator/oracle/oracle.d.ts +44 -43
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +127 -106
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +7 -2
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +16 -11
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +41 -17
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +51 -23
- package/dest/contract_function_simulator/oracle/typed_oracle.d.ts +48 -47
- package/dest/contract_function_simulator/oracle/typed_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/typed_oracle.js +89 -87
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +31 -30
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +33 -30
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +1 -1
- package/dest/contract_function_simulator/pxe_oracle_interface.js +6 -7
- package/dest/entrypoints/server/utils.d.ts +4 -2
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +4 -2
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +4 -4
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +1 -1
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.js +58 -59
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +4 -0
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +1 -0
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.js +41 -0
- package/dest/private_kernel/hints/index.d.ts +1 -0
- package/dest/private_kernel/hints/index.d.ts.map +1 -1
- package/dest/private_kernel/hints/index.js +1 -0
- 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 +13 -4
- package/dest/private_kernel/private_kernel_oracle.d.ts +1 -1
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle_impl.js +6 -6
- package/dest/pxe_service/error_enriching.d.ts.map +1 -1
- package/dest/pxe_service/error_enriching.js +1 -0
- package/dest/pxe_service/pxe_service.d.ts +3 -2
- package/dest/pxe_service/pxe_service.d.ts.map +1 -1
- package/dest/pxe_service/pxe_service.js +28 -19
- package/dest/storage/capsule_data_provider/capsule_data_provider.js +1 -1
- package/dest/storage/note_data_provider/note_data_provider.d.ts.map +1 -1
- package/dest/storage/note_data_provider/note_data_provider.js +16 -4
- package/package.json +16 -16
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/contract_function_simulator.ts +67 -37
- package/src/contract_function_simulator/index.ts +1 -0
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +1 -1
- 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 -1
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +52 -0
- package/src/contract_function_simulator/oracle/oracle.ts +149 -111
- package/src/contract_function_simulator/oracle/private_execution.ts +17 -12
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +60 -24
- package/src/contract_function_simulator/oracle/typed_oracle.ts +108 -92
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +34 -30
- package/src/contract_function_simulator/pxe_oracle_interface.ts +6 -8
- package/src/entrypoints/server/utils.ts +17 -6
- package/src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts +106 -104
- package/src/private_kernel/hints/compute_tx_include_by_timestamp.ts +58 -0
- package/src/private_kernel/hints/index.ts +1 -0
- package/src/private_kernel/private_kernel_execution_prover.ts +21 -4
- package/src/private_kernel/private_kernel_oracle.ts +1 -1
- package/src/private_kernel/private_kernel_oracle_impl.ts +12 -9
- package/src/pxe_service/error_enriching.ts +1 -0
- package/src/pxe_service/pxe_service.ts +30 -32
- package/src/storage/capsule_data_provider/capsule_data_provider.ts +1 -1
- package/src/storage/note_data_provider/note_data_provider.ts +27 -16
|
@@ -48,12 +48,13 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
|
|
|
48
48
|
private noteHashNullifierCounterMap;
|
|
49
49
|
private contractClassLogs;
|
|
50
50
|
private offchainEffects;
|
|
51
|
-
private
|
|
51
|
+
private nestedExecutionResults;
|
|
52
|
+
private senderForTags?;
|
|
52
53
|
constructor(argsHash: Fr, txContext: TxContext, callContext: CallContext,
|
|
53
54
|
/** Header of a block whose state is used during private execution (not the block the transaction is included in). */
|
|
54
55
|
historicalHeader: BlockHeader,
|
|
55
56
|
/** List of transient auth witnesses to be used during this simulation */
|
|
56
|
-
authWitnesses: AuthWitness[], capsules: Capsule[], executionCache: HashedValuesCache, noteCache: ExecutionNoteCache, executionDataProvider: ExecutionDataProvider, simulator: CircuitSimulator, totalPublicCalldataCount: number, sideEffectCounter?: number, log?: import("@aztec/foundation/log").Logger, scopes?: AztecAddress[]);
|
|
57
|
+
authWitnesses: AuthWitness[], capsules: Capsule[], executionCache: HashedValuesCache, noteCache: ExecutionNoteCache, executionDataProvider: ExecutionDataProvider, simulator: CircuitSimulator, totalPublicCalldataCount: number, sideEffectCounter?: number, log?: import("@aztec/foundation/log").Logger, scopes?: AztecAddress[], senderForTags?: AztecAddress);
|
|
57
58
|
/**
|
|
58
59
|
* Writes the function inputs to the initial witness.
|
|
59
60
|
* @param abi - The function ABI.
|
|
@@ -83,19 +84,42 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
|
|
|
83
84
|
/**
|
|
84
85
|
* Return the nested execution results during this execution.
|
|
85
86
|
*/
|
|
86
|
-
|
|
87
|
+
getNestedExecutionResults(): PrivateCallExecutionResult[];
|
|
88
|
+
/**
|
|
89
|
+
* Get the sender for tags.
|
|
90
|
+
*
|
|
91
|
+
* This unconstrained value is used as the sender when computing an unconstrained shared secret
|
|
92
|
+
* for a tag in order to emit a log. Constrained tagging should not use this as there is no
|
|
93
|
+
* guarantee that the recipient knows about the sender, and hence about the shared secret.
|
|
94
|
+
*
|
|
95
|
+
* The value persists through nested calls, meaning all calls down the stack will use the same
|
|
96
|
+
* 'senderForTags' value (unless it is replaced).
|
|
97
|
+
*/
|
|
98
|
+
privateGetSenderForTags(): Promise<AztecAddress | undefined>;
|
|
99
|
+
/**
|
|
100
|
+
* Set the sender for tags.
|
|
101
|
+
*
|
|
102
|
+
* This unconstrained value is used as the sender when computing an unconstrained shared secret
|
|
103
|
+
* for a tag in order to emit a log. Constrained tagging should not use this as there is no
|
|
104
|
+
* guarantee that the recipient knows about the sender, and hence about the shared secret.
|
|
105
|
+
*
|
|
106
|
+
* Account contracts typically set this value before calling other contracts. The value persists
|
|
107
|
+
* through nested calls, meaning all calls down the stack will use the same 'senderForTags'
|
|
108
|
+
* value (unless it is replaced by another call to this setter).
|
|
109
|
+
*/
|
|
110
|
+
privateSetSenderForTags(senderForTags: AztecAddress): Promise<void>;
|
|
87
111
|
/**
|
|
88
112
|
* Store values in the execution cache.
|
|
89
113
|
* @param values - Values to store.
|
|
90
114
|
* @returns The hash of the values.
|
|
91
115
|
*/
|
|
92
|
-
|
|
116
|
+
privateStoreInExecutionCache(values: Fr[], hash: Fr): void;
|
|
93
117
|
/**
|
|
94
118
|
* Gets values from the execution cache.
|
|
95
119
|
* @param hash - Hash of the values.
|
|
96
120
|
* @returns The values.
|
|
97
121
|
*/
|
|
98
|
-
|
|
122
|
+
privateLoadFromExecutionCache(hash: Fr): Promise<Fr[]>;
|
|
99
123
|
/**
|
|
100
124
|
* Gets some notes for a storage slot.
|
|
101
125
|
*
|
|
@@ -116,7 +140,7 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
|
|
|
116
140
|
* @param status - The status of notes to fetch.
|
|
117
141
|
* @returns Array of note data.
|
|
118
142
|
*/
|
|
119
|
-
|
|
143
|
+
utilityGetNotes(storageSlot: Fr, numSelects: number, selectByIndexes: number[], selectByOffsets: number[], selectByLengths: number[], selectValues: Fr[], selectComparators: number[], sortByIndexes: number[], sortByOffsets: number[], sortByLengths: number[], sortOrder: number[], limit: number, offset: number, status: NoteStatus): Promise<NoteData[]>;
|
|
120
144
|
/**
|
|
121
145
|
* Keep track of the new note created during execution.
|
|
122
146
|
* It can be used in subsequent calls (or transactions when chaining txs is possible).
|
|
@@ -127,21 +151,21 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
|
|
|
127
151
|
* @param noteHash - A hash of the new note.
|
|
128
152
|
* @returns
|
|
129
153
|
*/
|
|
130
|
-
|
|
154
|
+
privateNotifyCreatedNote(storageSlot: Fr, noteTypeId: NoteSelector, noteItems: Fr[], noteHash: Fr, counter: number): void;
|
|
131
155
|
/**
|
|
132
156
|
* Adding a siloed nullifier into the current set of all pending nullifiers created
|
|
133
157
|
* within the current transaction/execution.
|
|
134
158
|
* @param innerNullifier - The pending nullifier to add in the list (not yet siloed by contract address).
|
|
135
159
|
* @param noteHash - A hash of the new note.
|
|
136
160
|
*/
|
|
137
|
-
|
|
161
|
+
privateNotifyNullifiedNote(innerNullifier: Fr, noteHash: Fr, counter: number): Promise<void>;
|
|
138
162
|
/**
|
|
139
163
|
* Adding a siloed nullifier into the current set of all pending nullifiers created
|
|
140
164
|
* within the current transaction/execution.
|
|
141
165
|
* @param innerNullifier - The pending nullifier to add in the list (not yet siloed by contract address).
|
|
142
166
|
* @param noteHash - A hash of the new note.
|
|
143
167
|
*/
|
|
144
|
-
|
|
168
|
+
privateNotifyCreatedNullifier(innerNullifier: Fr): Promise<void>;
|
|
145
169
|
/**
|
|
146
170
|
* Emit a contract class log.
|
|
147
171
|
* This fn exists because we only carry a poseidon hash through the kernels, and need to
|
|
@@ -149,7 +173,7 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
|
|
|
149
173
|
* @param log - The contract class log to be emitted.
|
|
150
174
|
* @param counter - The contract class log's counter.
|
|
151
175
|
*/
|
|
152
|
-
|
|
176
|
+
privateNotifyCreatedContractClassLog(log: ContractClassLog, counter: number): void;
|
|
153
177
|
/**
|
|
154
178
|
* Calls a private function as a nested execution.
|
|
155
179
|
* @param targetContractAddress - The address of the contract to call.
|
|
@@ -159,7 +183,7 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
|
|
|
159
183
|
* @param isStaticCall - Whether the call is a static call.
|
|
160
184
|
* @returns The execution result.
|
|
161
185
|
*/
|
|
162
|
-
|
|
186
|
+
privateCallPrivateFunction(targetContractAddress: AztecAddress, functionSelector: FunctionSelector, argsHash: Fr, sideEffectCounter: number, isStaticCall: boolean): Promise<{
|
|
163
187
|
endSideEffectCounter: Fr;
|
|
164
188
|
returnsHash: Fr;
|
|
165
189
|
}>;
|
|
@@ -170,7 +194,7 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
|
|
|
170
194
|
* @param sideEffectCounter - The side effect counter at the start of the call.
|
|
171
195
|
* @param isStaticCall - Whether the call is a static call.
|
|
172
196
|
*/
|
|
173
|
-
|
|
197
|
+
privateNotifyEnqueuedPublicFunctionCall(_targetContractAddress: AztecAddress, calldataHash: Fr, _sideEffectCounter: number, _isStaticCall: boolean): Promise<void>;
|
|
174
198
|
/**
|
|
175
199
|
* Verify relevant information when a public teardown function is set.
|
|
176
200
|
* @param targetContractAddress - The address of the contract to call.
|
|
@@ -178,8 +202,8 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
|
|
|
178
202
|
* @param sideEffectCounter - The side effect counter at the start of the call.
|
|
179
203
|
* @param isStaticCall - Whether the call is a static call.
|
|
180
204
|
*/
|
|
181
|
-
|
|
182
|
-
|
|
205
|
+
privateNotifySetPublicTeardownFunctionCall(_targetContractAddress: AztecAddress, calldataHash: Fr, _sideEffectCounter: number, _isStaticCall: boolean): Promise<void>;
|
|
206
|
+
privateNotifySetMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter: number): Promise<void>;
|
|
183
207
|
/**
|
|
184
208
|
* Derives the call context for a nested execution.
|
|
185
209
|
* @param targetContractAddress - The address of the contract being called.
|
|
@@ -189,8 +213,8 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
|
|
|
189
213
|
*/
|
|
190
214
|
private deriveCallContext;
|
|
191
215
|
getDebugFunctionName(): Promise<string>;
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
216
|
+
privateIncrementAppTaggingSecretIndexAsSender(sender: AztecAddress, recipient: AztecAddress): Promise<void>;
|
|
217
|
+
utilityFetchTaggedLogs(pendingTaggedLogArrayBaseSlot: Fr): Promise<void>;
|
|
218
|
+
utilityEmitOffchainEffect(data: Fr[]): Promise<void>;
|
|
195
219
|
}
|
|
196
220
|
//# sourceMappingURL=private_execution_oracle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_execution_oracle.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/private_execution_oracle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EACL,KAAK,WAAW,EAEhB,gBAAgB,EAChB,KAAK,YAAY,EAElB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EACX,OAAO,EACP,uBAAuB,EACvB,WAAW,EACX,0BAA0B,EAC1B,KAAK,SAAS,EACf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,sBAAsB;;
|
|
1
|
+
{"version":3,"file":"private_execution_oracle.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/private_execution_oracle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EACL,KAAK,WAAW,EAEhB,gBAAgB,EAChB,KAAK,YAAY,EAElB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EACX,OAAO,EACP,uBAAuB,EACvB,WAAW,EACX,0BAA0B,EAC1B,KAAK,SAAS,EACf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,sBAAsB;;IA2B9D,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,qHAAqH;IACrH,SAAS,CAA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ACnC,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,EAAE,EACZ,iBAAiB,EAAE,MAAM,EACzB,YAAY,EAAE,OAAO;;;;IA+EvB;;;;;;OAMG;IACa,uCAAuC,CACrD,sBAAsB,EAAE,YAAY,EACpC,YAAY,EAAE,EAAE,EAChB,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,OAAO;IAMxB;;;;;;OAMG;IACa,0CAA0C,CACxD,sBAAsB,EAAE,YAAY,EACpC,YAAY,EAAE,EAAE,EAChB,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,OAAO;IAMR,8CAA8C,CAC5D,8BAA8B,EAAE,MAAM,GACrC,OAAO,CAAC,IAAI,CAAC;IAIhB;;;;;;OAMG;YACW,iBAAiB;IAaxB,oBAAoB;IAIL,6CAA6C,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY;IAI3F,sBAAsB,CAAC,6BAA6B,EAAE,EAAE;IAM9D,yBAAyB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAIrE"}
|
|
@@ -43,9 +43,11 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
|
|
|
43
43
|
noteHashNullifierCounterMap;
|
|
44
44
|
contractClassLogs;
|
|
45
45
|
offchainEffects;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
nestedExecutionResults;
|
|
47
|
+
senderForTags;
|
|
48
|
+
constructor(argsHash, txContext, callContext, /** Header of a block whose state is used during private execution (not the block the transaction is included in). */ historicalHeader, /** List of transient auth witnesses to be used during this simulation */ authWitnesses, capsules, executionCache, noteCache, executionDataProvider, simulator, totalPublicCalldataCount, sideEffectCounter = 0, log = createLogger('simulator:client_execution_context'), scopes, senderForTags){
|
|
49
|
+
super(callContext.contractAddress, authWitnesses, capsules, executionDataProvider, log, scopes), this.argsHash = argsHash, this.txContext = txContext, this.callContext = callContext, this.historicalHeader = historicalHeader, this.executionCache = executionCache, this.noteCache = noteCache, this.simulator = simulator, this.totalPublicCalldataCount = totalPublicCalldataCount, this.sideEffectCounter = sideEffectCounter, this.newNotes = [], this.noteHashLeafIndexMap = new Map(), this.noteHashNullifierCounterMap = new Map(), this.contractClassLogs = [], this.offchainEffects = [], this.nestedExecutionResults = [];
|
|
50
|
+
this.senderForTags = senderForTags;
|
|
49
51
|
}
|
|
50
52
|
// We still need this function until we can get user-defined ordering of structs for fn arguments
|
|
51
53
|
// TODO When that is sorted out on noir side, we can use instead the utilities in serialize.ts
|
|
@@ -96,21 +98,47 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
|
|
|
96
98
|
}
|
|
97
99
|
/**
|
|
98
100
|
* Return the nested execution results during this execution.
|
|
99
|
-
*/
|
|
100
|
-
return this.
|
|
101
|
+
*/ getNestedExecutionResults() {
|
|
102
|
+
return this.nestedExecutionResults;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Get the sender for tags.
|
|
106
|
+
*
|
|
107
|
+
* This unconstrained value is used as the sender when computing an unconstrained shared secret
|
|
108
|
+
* for a tag in order to emit a log. Constrained tagging should not use this as there is no
|
|
109
|
+
* guarantee that the recipient knows about the sender, and hence about the shared secret.
|
|
110
|
+
*
|
|
111
|
+
* The value persists through nested calls, meaning all calls down the stack will use the same
|
|
112
|
+
* 'senderForTags' value (unless it is replaced).
|
|
113
|
+
*/ privateGetSenderForTags() {
|
|
114
|
+
return Promise.resolve(this.senderForTags);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Set the sender for tags.
|
|
118
|
+
*
|
|
119
|
+
* This unconstrained value is used as the sender when computing an unconstrained shared secret
|
|
120
|
+
* for a tag in order to emit a log. Constrained tagging should not use this as there is no
|
|
121
|
+
* guarantee that the recipient knows about the sender, and hence about the shared secret.
|
|
122
|
+
*
|
|
123
|
+
* Account contracts typically set this value before calling other contracts. The value persists
|
|
124
|
+
* through nested calls, meaning all calls down the stack will use the same 'senderForTags'
|
|
125
|
+
* value (unless it is replaced by another call to this setter).
|
|
126
|
+
*/ privateSetSenderForTags(senderForTags) {
|
|
127
|
+
this.senderForTags = senderForTags;
|
|
128
|
+
return Promise.resolve();
|
|
101
129
|
}
|
|
102
130
|
/**
|
|
103
131
|
* Store values in the execution cache.
|
|
104
132
|
* @param values - Values to store.
|
|
105
133
|
* @returns The hash of the values.
|
|
106
|
-
*/
|
|
134
|
+
*/ privateStoreInExecutionCache(values, hash) {
|
|
107
135
|
return this.executionCache.store(values, hash);
|
|
108
136
|
}
|
|
109
137
|
/**
|
|
110
138
|
* Gets values from the execution cache.
|
|
111
139
|
* @param hash - Hash of the values.
|
|
112
140
|
* @returns The values.
|
|
113
|
-
*/
|
|
141
|
+
*/ privateLoadFromExecutionCache(hash) {
|
|
114
142
|
const preimage = this.executionCache.getPreimage(hash);
|
|
115
143
|
if (!preimage) {
|
|
116
144
|
throw new Error(`Preimage for hash ${hash.toString()} not found in cache`);
|
|
@@ -136,7 +164,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
|
|
|
136
164
|
* @param offset - The starting index for pagination.
|
|
137
165
|
* @param status - The status of notes to fetch.
|
|
138
166
|
* @returns Array of note data.
|
|
139
|
-
*/ async
|
|
167
|
+
*/ async utilityGetNotes(storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status) {
|
|
140
168
|
// Nullified pending notes are already removed from the list.
|
|
141
169
|
const pendingNotes = this.noteCache.getNotes(this.callContext.contractAddress, storageSlot);
|
|
142
170
|
const pendingNullifiers = this.noteCache.getNullifiers(this.callContext.contractAddress);
|
|
@@ -191,7 +219,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
|
|
|
191
219
|
* @param noteItems - The items to be included in a Note.
|
|
192
220
|
* @param noteHash - A hash of the new note.
|
|
193
221
|
* @returns
|
|
194
|
-
*/
|
|
222
|
+
*/ privateNotifyCreatedNote(storageSlot, noteTypeId, noteItems, noteHash, counter) {
|
|
195
223
|
this.log.debug(`Notified of new note with inner hash ${noteHash}`, {
|
|
196
224
|
contractAddress: this.callContext.contractAddress,
|
|
197
225
|
storageSlot,
|
|
@@ -214,7 +242,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
|
|
|
214
242
|
* within the current transaction/execution.
|
|
215
243
|
* @param innerNullifier - The pending nullifier to add in the list (not yet siloed by contract address).
|
|
216
244
|
* @param noteHash - A hash of the new note.
|
|
217
|
-
*/ async
|
|
245
|
+
*/ async privateNotifyNullifiedNote(innerNullifier, noteHash, counter) {
|
|
218
246
|
const nullifiedNoteHashCounter = await this.noteCache.nullifyNote(this.callContext.contractAddress, innerNullifier, noteHash);
|
|
219
247
|
if (nullifiedNoteHashCounter !== undefined) {
|
|
220
248
|
this.noteHashNullifierCounterMap.set(nullifiedNoteHashCounter, counter);
|
|
@@ -225,7 +253,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
|
|
|
225
253
|
* within the current transaction/execution.
|
|
226
254
|
* @param innerNullifier - The pending nullifier to add in the list (not yet siloed by contract address).
|
|
227
255
|
* @param noteHash - A hash of the new note.
|
|
228
|
-
*/
|
|
256
|
+
*/ privateNotifyCreatedNullifier(innerNullifier) {
|
|
229
257
|
return this.noteCache.nullifierCreated(this.callContext.contractAddress, innerNullifier);
|
|
230
258
|
}
|
|
231
259
|
/**
|
|
@@ -234,13 +262,13 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
|
|
|
234
262
|
* keep the preimage in ts for later.
|
|
235
263
|
* @param log - The contract class log to be emitted.
|
|
236
264
|
* @param counter - The contract class log's counter.
|
|
237
|
-
*/
|
|
265
|
+
*/ privateNotifyCreatedContractClassLog(log, counter) {
|
|
238
266
|
this.contractClassLogs.push(new CountedContractClassLog(log, counter));
|
|
239
267
|
const text = log.toBuffer().toString('hex');
|
|
240
|
-
this.log.verbose(`Emitted log from
|
|
268
|
+
this.log.verbose(`Emitted log from ContractClassRegistry: "${text.length > 100 ? text.slice(0, 100) + '...' : text}"`);
|
|
241
269
|
}
|
|
242
270
|
#checkValidStaticCall(childExecutionResult) {
|
|
243
|
-
if (childExecutionResult.publicInputs.noteHashes.
|
|
271
|
+
if (childExecutionResult.publicInputs.noteHashes.claimedLength > 0 || childExecutionResult.publicInputs.nullifiers.claimedLength > 0 || childExecutionResult.publicInputs.l2ToL1Msgs.claimedLength > 0 || childExecutionResult.publicInputs.privateLogs.claimedLength > 0 || childExecutionResult.publicInputs.contractClassLogsHashes.claimedLength > 0) {
|
|
244
272
|
throw new Error(`Static call cannot update the state, emit L2->L1 messages or generate logs`);
|
|
245
273
|
}
|
|
246
274
|
}
|
|
@@ -252,7 +280,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
|
|
|
252
280
|
* @param sideEffectCounter - The side effect counter at the start of the call.
|
|
253
281
|
* @param isStaticCall - Whether the call is a static call.
|
|
254
282
|
* @returns The execution result.
|
|
255
|
-
*/ async
|
|
283
|
+
*/ async privateCallPrivateFunction(targetContractAddress, functionSelector, argsHash, sideEffectCounter, isStaticCall) {
|
|
256
284
|
const simulatorSetupTimer = new Timer();
|
|
257
285
|
this.log.debug(`Calling private function ${targetContractAddress}:${functionSelector} from ${this.callContext.contractAddress}`);
|
|
258
286
|
isStaticCall = isStaticCall || this.callContext.isStaticCall;
|
|
@@ -260,13 +288,13 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
|
|
|
260
288
|
const targetArtifact = await this.executionDataProvider.getFunctionArtifact(targetContractAddress, functionSelector);
|
|
261
289
|
const derivedTxContext = this.txContext.clone();
|
|
262
290
|
const derivedCallContext = await this.deriveCallContext(targetContractAddress, targetArtifact, isStaticCall);
|
|
263
|
-
const context = new PrivateExecutionOracle(argsHash, derivedTxContext, derivedCallContext, this.historicalHeader, this.authWitnesses, this.capsules, this.executionCache, this.noteCache, this.executionDataProvider, this.simulator, this.totalPublicCalldataCount, sideEffectCounter, this.log, this.scopes);
|
|
291
|
+
const context = new PrivateExecutionOracle(argsHash, derivedTxContext, derivedCallContext, this.historicalHeader, this.authWitnesses, this.capsules, this.executionCache, this.noteCache, this.executionDataProvider, this.simulator, this.totalPublicCalldataCount, sideEffectCounter, this.log, this.scopes, this.senderForTags);
|
|
264
292
|
const setupTime = simulatorSetupTimer.ms();
|
|
265
293
|
const childExecutionResult = await executePrivateFunction(this.simulator, context, targetArtifact, targetContractAddress, functionSelector);
|
|
266
294
|
if (isStaticCall) {
|
|
267
295
|
this.#checkValidStaticCall(childExecutionResult);
|
|
268
296
|
}
|
|
269
|
-
this.
|
|
297
|
+
this.nestedExecutionResults.push(childExecutionResult);
|
|
270
298
|
const publicInputs = childExecutionResult.publicInputs;
|
|
271
299
|
// Add simulator overhead to this call
|
|
272
300
|
if (childExecutionResult.profileResult) {
|
|
@@ -293,7 +321,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
|
|
|
293
321
|
* @param calldataHash - The hash of the function selector and arguments.
|
|
294
322
|
* @param sideEffectCounter - The side effect counter at the start of the call.
|
|
295
323
|
* @param isStaticCall - Whether the call is a static call.
|
|
296
|
-
*/
|
|
324
|
+
*/ privateNotifyEnqueuedPublicFunctionCall(_targetContractAddress, calldataHash, _sideEffectCounter, _isStaticCall) {
|
|
297
325
|
this.#onNewPublicFunctionCall(calldataHash);
|
|
298
326
|
return Promise.resolve();
|
|
299
327
|
}
|
|
@@ -303,11 +331,11 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
|
|
|
303
331
|
* @param argsHash - The arguments hash to pass to the function.
|
|
304
332
|
* @param sideEffectCounter - The side effect counter at the start of the call.
|
|
305
333
|
* @param isStaticCall - Whether the call is a static call.
|
|
306
|
-
*/
|
|
334
|
+
*/ privateNotifySetPublicTeardownFunctionCall(_targetContractAddress, calldataHash, _sideEffectCounter, _isStaticCall) {
|
|
307
335
|
this.#onNewPublicFunctionCall(calldataHash);
|
|
308
336
|
return Promise.resolve();
|
|
309
337
|
}
|
|
310
|
-
|
|
338
|
+
privateNotifySetMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter) {
|
|
311
339
|
return this.noteCache.setMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter);
|
|
312
340
|
}
|
|
313
341
|
/**
|
|
@@ -322,14 +350,14 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
|
|
|
322
350
|
getDebugFunctionName() {
|
|
323
351
|
return this.executionDataProvider.getDebugFunctionName(this.contractAddress, this.callContext.functionSelector);
|
|
324
352
|
}
|
|
325
|
-
async
|
|
353
|
+
async privateIncrementAppTaggingSecretIndexAsSender(sender, recipient) {
|
|
326
354
|
await this.executionDataProvider.incrementAppTaggingSecretIndexAsSender(this.contractAddress, sender, recipient);
|
|
327
355
|
}
|
|
328
|
-
async
|
|
356
|
+
async utilityFetchTaggedLogs(pendingTaggedLogArrayBaseSlot) {
|
|
329
357
|
await this.executionDataProvider.syncTaggedLogs(this.contractAddress, pendingTaggedLogArrayBaseSlot, this.scopes);
|
|
330
358
|
await this.executionDataProvider.removeNullifiedNotes(this.contractAddress);
|
|
331
359
|
}
|
|
332
|
-
|
|
360
|
+
utilityEmitOffchainEffect(data) {
|
|
333
361
|
this.offchainEffects.push({
|
|
334
362
|
data
|
|
335
363
|
});
|
|
@@ -14,15 +14,15 @@ import type { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
14
14
|
* Information about a note needed during execution.
|
|
15
15
|
*/
|
|
16
16
|
export interface NoteData {
|
|
17
|
-
/** The note. */
|
|
17
|
+
/** The actual note content (the fields of the Noir #[note] struct). */
|
|
18
18
|
note: Note;
|
|
19
|
-
/** The
|
|
19
|
+
/** The address of the contract that owns the note. */
|
|
20
20
|
contractAddress: AztecAddress;
|
|
21
21
|
/** The storage slot of the note. */
|
|
22
22
|
storageSlot: Fr;
|
|
23
|
-
/** The nonce
|
|
23
|
+
/** The nonce injected into the note hash preimage by kernels. */
|
|
24
24
|
noteNonce: Fr;
|
|
25
|
-
/** A hash of the note. */
|
|
25
|
+
/** A hash of the note as it gets stored in the note hash tree. */
|
|
26
26
|
noteHash: Fr;
|
|
27
27
|
/** The corresponding nullifier of the note. Undefined for pending notes. */
|
|
28
28
|
siloedNullifier?: Fr;
|
|
@@ -35,51 +35,52 @@ export interface NoteData {
|
|
|
35
35
|
* and are unavailable by default.
|
|
36
36
|
*/
|
|
37
37
|
export declare abstract class TypedOracle {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
callPrivateFunction(_targetContractAddress: AztecAddress, _functionSelector: FunctionSelector, _argsHash: Fr, _sideEffectCounter: number, _isStaticCall: boolean): Promise<{
|
|
38
|
+
utilityGetRandomField(): Fr;
|
|
39
|
+
privateStoreInExecutionCache(_values: Fr[], _hash: Fr): void;
|
|
40
|
+
privateLoadFromExecutionCache(_hash: Fr): Promise<Fr[]>;
|
|
41
|
+
utilityGetBlockNumber(): Promise<number>;
|
|
42
|
+
utilityGetTimestamp(): Promise<UInt64>;
|
|
43
|
+
utilityGetContractAddress(): Promise<AztecAddress>;
|
|
44
|
+
utilityGetChainId(): Promise<Fr>;
|
|
45
|
+
utilityGetVersion(): Promise<Fr>;
|
|
46
|
+
utilityGetKeyValidationRequest(_pkMHash: Fr): Promise<KeyValidationRequest>;
|
|
47
|
+
utilityGetContractInstance(_address: AztecAddress): Promise<ContractInstance>;
|
|
48
|
+
utilityGetMembershipWitness(_blockNumber: number, _treeId: MerkleTreeId, _leafValue: Fr): Promise<Fr[] | undefined>;
|
|
49
|
+
utilityGetNullifierMembershipWitness(_blockNumber: number, _nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
50
|
+
utilityGetPublicDataWitness(_blockNumber: number, _leafSlot: Fr): Promise<PublicDataWitness | undefined>;
|
|
51
|
+
utilityGetLowNullifierMembershipWitness(_blockNumber: number, _nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
52
|
+
utilityGetBlockHeader(_blockNumber: number): Promise<BlockHeader | undefined>;
|
|
53
|
+
utilityGetCompleteAddress(_account: AztecAddress): Promise<CompleteAddress>;
|
|
54
|
+
utilityGetAuthWitness(_messageHash: Fr): Promise<Fr[] | undefined>;
|
|
55
|
+
utilityGetNotes(_storageSlot: Fr, _numSelects: number, _selectByIndexes: number[], _selectByOffsets: number[], _selectByLengths: number[], _selectValues: Fr[], _selectComparators: number[], _sortByIndexes: number[], _sortByOffsets: number[], _sortByLengths: number[], _sortOrder: number[], _limit: number, _offset: number, _status: NoteStatus): Promise<NoteData[]>;
|
|
56
|
+
privateNotifyCreatedNote(_storageSlot: Fr, _noteTypeId: NoteSelector, _note: Fr[], _noteHash: Fr, _counter: number): void;
|
|
57
|
+
privateNotifyNullifiedNote(_innerNullifier: Fr, _noteHash: Fr, _counter: number): Promise<void>;
|
|
58
|
+
privateNotifyCreatedNullifier(_innerNullifier: Fr): Promise<void>;
|
|
59
|
+
utilityCheckNullifierExists(_innerNullifier: Fr): Promise<boolean>;
|
|
60
|
+
utilityGetL1ToL2MembershipWitness(_contractAddress: AztecAddress, _messageHash: Fr, _secret: Fr): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
|
|
61
|
+
utilityStorageRead(_contractAddress: AztecAddress, _startStorageSlot: Fr, _blockNumber: number, _numberOfElements: number): Promise<Fr[]>;
|
|
62
|
+
privateNotifyCreatedContractClassLog(_log: ContractClassLog, _counter: number): void;
|
|
63
|
+
privateCallPrivateFunction(_targetContractAddress: AztecAddress, _functionSelector: FunctionSelector, _argsHash: Fr, _sideEffectCounter: number, _isStaticCall: boolean): Promise<{
|
|
65
64
|
endSideEffectCounter: Fr;
|
|
66
65
|
returnsHash: Fr;
|
|
67
66
|
}>;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
67
|
+
privateNotifyEnqueuedPublicFunctionCall(_targetContractAddress: AztecAddress, _calldataHash: Fr, _sideEffectCounter: number, _isStaticCall: boolean): Promise<void>;
|
|
68
|
+
privateNotifySetPublicTeardownFunctionCall(_targetContractAddress: AztecAddress, _calldataHash: Fr, _sideEffectCounter: number, _isStaticCall: boolean): Promise<void>;
|
|
69
|
+
privateNotifySetMinRevertibleSideEffectCounter(_minRevertibleSideEffectCounter: number): Promise<void>;
|
|
70
|
+
utilityDebugLog(_message: string, _fields: Fr[]): void;
|
|
71
|
+
utilityGetIndexedTaggingSecretAsSender(_sender: AztecAddress, _recipient: AztecAddress): Promise<IndexedTaggingSecret>;
|
|
72
|
+
privateIncrementAppTaggingSecretIndexAsSender(_sender: AztecAddress, _recipient: AztecAddress): Promise<void>;
|
|
73
|
+
utilityFetchTaggedLogs(_pendingTaggedLogArrayBaseSlot: Fr): Promise<void>;
|
|
74
|
+
utilityValidateEnqueuedNotesAndEvents(_contractAddress: AztecAddress, _noteValidationRequestsArrayBaseSlot: Fr, _eventValidationRequestsArrayBaseSlot: Fr): Promise<void>;
|
|
75
|
+
utilityBulkRetrieveLogs(_contractAddress: AztecAddress, _logRetrievalRequestsArrayBaseSlot: Fr, _logRetrievalResponsesArrayBaseSlot: Fr): Promise<void>;
|
|
76
|
+
utilityStoreCapsule(_contractAddress: AztecAddress, _key: Fr, _capsule: Fr[]): Promise<void>;
|
|
77
|
+
utilityLoadCapsule(_contractAddress: AztecAddress, _key: Fr): Promise<Fr[] | null>;
|
|
78
|
+
utilityDeleteCapsule(_contractAddress: AztecAddress, _key: Fr): Promise<void>;
|
|
79
|
+
utilityCopyCapsule(_contractAddress: AztecAddress, _srcKey: Fr, _dstKey: Fr, _numEntries: number): Promise<void>;
|
|
80
|
+
utilityAes128Decrypt(_ciphertext: Buffer, _iv: Buffer, _symKey: Buffer): Promise<Buffer>;
|
|
81
|
+
utilityGetSharedSecret(_address: AztecAddress, _ephPk: Point): Promise<Point>;
|
|
82
|
+
utilityEmitOffchainEffect(_data: Fr[]): Promise<void>;
|
|
83
|
+
privateGetSenderForTags(): Promise<AztecAddress | undefined>;
|
|
84
|
+
privateSetSenderForTags(_senderForTags: AztecAddress): Promise<void>;
|
|
84
85
|
}
|
|
85
86
|
//# sourceMappingURL=typed_oracle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed_oracle.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/typed_oracle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC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