@aztec/pxe 0.87.5 → 0.87.7
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 +37 -0
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -0
- package/dest/contract_function_simulator/contract_function_simulator.js +117 -0
- package/dest/contract_function_simulator/execution_data_provider.d.ts +301 -0
- package/dest/contract_function_simulator/execution_data_provider.d.ts.map +1 -0
- package/dest/contract_function_simulator/execution_data_provider.js +14 -0
- package/dest/contract_function_simulator/execution_note_cache.d.ts +93 -0
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -0
- package/dest/contract_function_simulator/execution_note_cache.js +180 -0
- package/dest/contract_function_simulator/hashed_values_cache.d.ts +28 -0
- package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -0
- package/dest/contract_function_simulator/hashed_values_cache.js +36 -0
- package/dest/contract_function_simulator/index.d.ts +10 -0
- package/dest/contract_function_simulator/index.d.ts.map +1 -0
- package/dest/contract_function_simulator/index.js +8 -0
- package/dest/contract_function_simulator/oracle/index.d.ts +14 -0
- package/dest/contract_function_simulator/oracle/index.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/index.js +2 -0
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +19 -0
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +24 -0
- package/dest/contract_function_simulator/oracle/oracle.d.ts +53 -0
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/oracle.js +317 -0
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +24 -0
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/private_execution.js +100 -0
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +187 -0
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +325 -0
- package/dest/contract_function_simulator/oracle/typed_oracle.d.ts +83 -0
- package/dest/contract_function_simulator/oracle/typed_oracle.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/typed_oracle.js +138 -0
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +163 -0
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +257 -0
- package/dest/contract_function_simulator/pick_notes.d.ts +85 -0
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -0
- package/dest/contract_function_simulator/pick_notes.js +51 -0
- package/dest/contract_function_simulator/proxied_node.d.ts +9 -0
- package/dest/contract_function_simulator/proxied_node.d.ts.map +1 -0
- package/dest/contract_function_simulator/proxied_node.js +27 -0
- package/dest/{pxe_oracle_interface → contract_function_simulator}/pxe_oracle_interface.d.ts +5 -4
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +1 -0
- package/dest/{pxe_oracle_interface → contract_function_simulator}/pxe_oracle_interface.js +16 -15
- package/dest/contract_function_simulator/tagging_utils.d.ts.map +1 -0
- package/dest/entrypoints/client/bundle/index.d.ts +1 -1
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +1 -1
- package/dest/entrypoints/client/bundle/utils.d.ts +1 -1
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +10 -4
- package/dest/entrypoints/client/lazy/index.d.ts +1 -1
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +1 -1
- package/dest/entrypoints/client/lazy/utils.d.ts +1 -1
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +10 -4
- package/dest/entrypoints/{client/pxe_creation_options.d.ts → pxe_creation_options.d.ts} +4 -1
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -0
- package/dest/entrypoints/server/index.d.ts +1 -1
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +1 -1
- package/dest/entrypoints/server/utils.d.ts +6 -6
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +26 -18
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +6 -5
- package/dest/pxe_service/pxe_service.d.ts +2 -2
- package/dest/pxe_service/pxe_service.d.ts.map +1 -1
- package/dest/pxe_service/pxe_service.js +58 -28
- package/dest/storage/note_data_provider/note_dao.d.ts +1 -1
- package/dest/storage/note_data_provider/note_dao.d.ts.map +1 -1
- package/package.json +17 -15
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/contract_function_simulator.ts +193 -0
- package/src/contract_function_simulator/execution_data_provider.ts +391 -0
- package/src/contract_function_simulator/execution_note_cache.ts +217 -0
- package/src/contract_function_simulator/hashed_values_cache.ts +47 -0
- package/src/contract_function_simulator/index.ts +9 -0
- package/src/contract_function_simulator/oracle/index.ts +16 -0
- package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +23 -0
- package/src/contract_function_simulator/oracle/oracle.ts +541 -0
- package/src/contract_function_simulator/oracle/private_execution.ts +171 -0
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +518 -0
- package/src/contract_function_simulator/oracle/typed_oracle.ts +273 -0
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +384 -0
- package/src/contract_function_simulator/pick_notes.ts +141 -0
- package/src/contract_function_simulator/proxied_node.ts +33 -0
- package/src/{pxe_oracle_interface → contract_function_simulator}/pxe_oracle_interface.ts +18 -21
- package/src/entrypoints/client/bundle/index.ts +1 -1
- package/src/entrypoints/client/bundle/utils.ts +24 -16
- package/src/entrypoints/client/lazy/index.ts +1 -1
- package/src/entrypoints/client/lazy/utils.ts +25 -12
- package/src/entrypoints/{client/pxe_creation_options.ts → pxe_creation_options.ts} +4 -1
- package/src/entrypoints/server/index.ts +1 -1
- package/src/entrypoints/server/utils.ts +44 -26
- package/src/private_kernel/private_kernel_execution_prover.ts +6 -4
- package/src/pxe_service/pxe_service.ts +86 -45
- package/src/storage/note_data_provider/note_dao.ts +2 -1
- package/dest/entrypoints/client/pxe_creation_options.d.ts.map +0 -1
- package/dest/pxe_oracle_interface/pxe_oracle_interface.d.ts.map +0 -1
- package/dest/pxe_oracle_interface/tagging_utils.d.ts.map +0 -1
- /package/dest/{pxe_oracle_interface → contract_function_simulator}/tagging_utils.d.ts +0 -0
- /package/dest/{pxe_oracle_interface → contract_function_simulator}/tagging_utils.js +0 -0
- /package/dest/entrypoints/{client/pxe_creation_options.js → pxe_creation_options.js} +0 -0
- /package/src/{pxe_oracle_interface → contract_function_simulator}/tagging_utils.ts +0 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
+
import { Fr, Point } from '@aztec/foundation/fields';
|
|
3
|
+
import type { EventSelector, FunctionSelector, NoteSelector } from '@aztec/stdlib/abi';
|
|
4
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
+
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
6
|
+
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
|
|
7
|
+
import type { ContractClassLog, IndexedTaggingSecret, LogWithTxData } from '@aztec/stdlib/logs';
|
|
8
|
+
import type { Note, NoteStatus } from '@aztec/stdlib/note';
|
|
9
|
+
import { type MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
10
|
+
import type { BlockHeader, TxHash } from '@aztec/stdlib/tx';
|
|
11
|
+
|
|
12
|
+
import type { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Information about a note needed during execution.
|
|
16
|
+
*/
|
|
17
|
+
export interface NoteData {
|
|
18
|
+
/** The note. */
|
|
19
|
+
note: Note;
|
|
20
|
+
/** The contract address of the note. */
|
|
21
|
+
contractAddress: AztecAddress;
|
|
22
|
+
/** The storage slot of the note. */
|
|
23
|
+
storageSlot: Fr;
|
|
24
|
+
/** The nonce of the note. */
|
|
25
|
+
nonce: Fr;
|
|
26
|
+
/** A hash of the note. */
|
|
27
|
+
noteHash: Fr;
|
|
28
|
+
/** The corresponding nullifier of the note. Undefined for pending notes. */
|
|
29
|
+
siloedNullifier?: Fr;
|
|
30
|
+
/** The note's leaf index in the note hash tree. Undefined for pending notes. */
|
|
31
|
+
index?: bigint;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
class OracleMethodNotAvailableError extends Error {
|
|
35
|
+
constructor(methodName: string) {
|
|
36
|
+
super(`Oracle method ${methodName} is not available.`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Oracle with typed parameters and typed return values.
|
|
42
|
+
* Methods that require read and/or write will have to be implemented based on the context (public, private, or view)
|
|
43
|
+
* and are unavailable by default.
|
|
44
|
+
*/
|
|
45
|
+
export abstract class TypedOracle {
|
|
46
|
+
getRandomField(): Fr {
|
|
47
|
+
return Fr.random();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
storeInExecutionCache(_values: Fr[], _hash: Fr): void {
|
|
51
|
+
throw new OracleMethodNotAvailableError('storeInExecutionCache');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
loadFromExecutionCache(_hash: Fr): Promise<Fr[]> {
|
|
55
|
+
return Promise.reject(new OracleMethodNotAvailableError('loadFromExecutionCache'));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
getBlockNumber(): Promise<number> {
|
|
59
|
+
return Promise.reject(new OracleMethodNotAvailableError('getBlockNumber'));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
getContractAddress(): Promise<AztecAddress> {
|
|
63
|
+
return Promise.reject(new OracleMethodNotAvailableError('getContractAddress'));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
getChainId(): Promise<Fr> {
|
|
67
|
+
return Promise.reject(new OracleMethodNotAvailableError('getChainId'));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
getVersion(): Promise<Fr> {
|
|
71
|
+
return Promise.reject(new OracleMethodNotAvailableError('getVersion'));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
getKeyValidationRequest(_pkMHash: Fr): Promise<KeyValidationRequest> {
|
|
75
|
+
return Promise.reject(new OracleMethodNotAvailableError('getKeyValidationRequest'));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
getContractInstance(_address: AztecAddress): Promise<ContractInstance> {
|
|
79
|
+
return Promise.reject(new OracleMethodNotAvailableError('getContractInstance'));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
getMembershipWitness(_blockNumber: number, _treeId: MerkleTreeId, _leafValue: Fr): Promise<Fr[] | undefined> {
|
|
83
|
+
return Promise.reject(new OracleMethodNotAvailableError('getMembershipWitness'));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
getNullifierMembershipWitness(_blockNumber: number, _nullifier: Fr): Promise<NullifierMembershipWitness | undefined> {
|
|
87
|
+
return Promise.reject(new OracleMethodNotAvailableError('getNullifierMembershipWitness'));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
getPublicDataWitness(_blockNumber: number, _leafSlot: Fr): Promise<PublicDataWitness | undefined> {
|
|
91
|
+
return Promise.reject(new OracleMethodNotAvailableError('getPublicDataWitness'));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
getLowNullifierMembershipWitness(
|
|
95
|
+
_blockNumber: number,
|
|
96
|
+
_nullifier: Fr,
|
|
97
|
+
): Promise<NullifierMembershipWitness | undefined> {
|
|
98
|
+
return Promise.reject(new OracleMethodNotAvailableError('getLowNullifierMembershipWitness'));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
getBlockHeader(_blockNumber: number): Promise<BlockHeader | undefined> {
|
|
102
|
+
return Promise.reject(new OracleMethodNotAvailableError('getBlockHeader'));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
getCompleteAddress(_account: AztecAddress): Promise<CompleteAddress> {
|
|
106
|
+
return Promise.reject(new OracleMethodNotAvailableError('getCompleteAddress'));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
getAuthWitness(_messageHash: Fr): Promise<Fr[] | undefined> {
|
|
110
|
+
return Promise.reject(new OracleMethodNotAvailableError('getAuthWitness'));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
getNotes(
|
|
114
|
+
_storageSlot: Fr,
|
|
115
|
+
_numSelects: number,
|
|
116
|
+
_selectByIndexes: number[],
|
|
117
|
+
_selectByOffsets: number[],
|
|
118
|
+
_selectByLengths: number[],
|
|
119
|
+
_selectValues: Fr[],
|
|
120
|
+
_selectComparators: number[],
|
|
121
|
+
_sortByIndexes: number[],
|
|
122
|
+
_sortByOffsets: number[],
|
|
123
|
+
_sortByLengths: number[],
|
|
124
|
+
_sortOrder: number[],
|
|
125
|
+
_limit: number,
|
|
126
|
+
_offset: number,
|
|
127
|
+
_status: NoteStatus,
|
|
128
|
+
): Promise<NoteData[]> {
|
|
129
|
+
return Promise.reject(new OracleMethodNotAvailableError('getNotes'));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
notifyCreatedNote(_storageSlot: Fr, _noteTypeId: NoteSelector, _note: Fr[], _noteHash: Fr, _counter: number): void {
|
|
133
|
+
throw new OracleMethodNotAvailableError('notifyCreatedNote');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
notifyNullifiedNote(_innerNullifier: Fr, _noteHash: Fr, _counter: number): Promise<void> {
|
|
137
|
+
return Promise.reject(new OracleMethodNotAvailableError('notifyNullifiedNote'));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
notifyCreatedNullifier(_innerNullifier: Fr): Promise<void> {
|
|
141
|
+
return Promise.reject(new OracleMethodNotAvailableError('notifyCreatedNullifier'));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
checkNullifierExists(_innerNullifier: Fr): Promise<boolean> {
|
|
145
|
+
return Promise.reject(new OracleMethodNotAvailableError('checkNullifierExists'));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
getL1ToL2MembershipWitness(
|
|
149
|
+
_contractAddress: AztecAddress,
|
|
150
|
+
_messageHash: Fr,
|
|
151
|
+
_secret: Fr,
|
|
152
|
+
): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>> {
|
|
153
|
+
return Promise.reject(new OracleMethodNotAvailableError('getL1ToL2MembershipWitness'));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
storageRead(
|
|
157
|
+
_contractAddress: AztecAddress,
|
|
158
|
+
_startStorageSlot: Fr,
|
|
159
|
+
_blockNumber: number,
|
|
160
|
+
_numberOfElements: number,
|
|
161
|
+
): Promise<Fr[]> {
|
|
162
|
+
return Promise.reject(new OracleMethodNotAvailableError('storageRead'));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
storageWrite(_startStorageSlot: Fr, _values: Fr[]): Promise<Fr[]> {
|
|
166
|
+
return Promise.reject(new OracleMethodNotAvailableError('storageWrite'));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
notifyCreatedContractClassLog(_log: ContractClassLog, _counter: number): void {
|
|
170
|
+
throw new OracleMethodNotAvailableError('notifyCreatedContractClassLog');
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
callPrivateFunction(
|
|
174
|
+
_targetContractAddress: AztecAddress,
|
|
175
|
+
_functionSelector: FunctionSelector,
|
|
176
|
+
_argsHash: Fr,
|
|
177
|
+
_sideEffectCounter: number,
|
|
178
|
+
_isStaticCall: boolean,
|
|
179
|
+
): Promise<{ endSideEffectCounter: Fr; returnsHash: Fr }> {
|
|
180
|
+
return Promise.reject(new OracleMethodNotAvailableError('callPrivateFunction'));
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
notifyEnqueuedPublicFunctionCall(
|
|
184
|
+
_targetContractAddress: AztecAddress,
|
|
185
|
+
_calldataHash: Fr,
|
|
186
|
+
_sideEffectCounter: number,
|
|
187
|
+
_isStaticCall: boolean,
|
|
188
|
+
): Promise<void> {
|
|
189
|
+
return Promise.reject(new OracleMethodNotAvailableError('notifyEnqueuedPublicFunctionCall'));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
notifySetPublicTeardownFunctionCall(
|
|
193
|
+
_targetContractAddress: AztecAddress,
|
|
194
|
+
_calldataHash: Fr,
|
|
195
|
+
_sideEffectCounter: number,
|
|
196
|
+
_isStaticCall: boolean,
|
|
197
|
+
): Promise<void> {
|
|
198
|
+
return Promise.reject(new OracleMethodNotAvailableError('notifySetPublicTeardownFunctionCall'));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
notifySetMinRevertibleSideEffectCounter(_minRevertibleSideEffectCounter: number): Promise<void> {
|
|
202
|
+
throw new OracleMethodNotAvailableError('notifySetMinRevertibleSideEffectCounter');
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
debugLog(_message: string, _fields: Fr[]): void {
|
|
206
|
+
throw new OracleMethodNotAvailableError('debugLog');
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
getIndexedTaggingSecretAsSender(_sender: AztecAddress, _recipient: AztecAddress): Promise<IndexedTaggingSecret> {
|
|
210
|
+
return Promise.reject(new OracleMethodNotAvailableError('getIndexedTaggingSecretAsSender'));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
incrementAppTaggingSecretIndexAsSender(_sender: AztecAddress, _recipient: AztecAddress): Promise<void> {
|
|
214
|
+
return Promise.reject(new OracleMethodNotAvailableError('incrementAppTaggingSecretIndexAsSender'));
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
fetchTaggedLogs(_pendingTaggedLogArrayBaseSlot: Fr): Promise<void> {
|
|
218
|
+
return Promise.reject(new OracleMethodNotAvailableError('fetchTaggedLogs'));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
deliverNote(
|
|
222
|
+
_contractAddress: AztecAddress,
|
|
223
|
+
_storageSlot: Fr,
|
|
224
|
+
_nonce: Fr,
|
|
225
|
+
_content: Fr[],
|
|
226
|
+
_noteHash: Fr,
|
|
227
|
+
_nullifier: Fr,
|
|
228
|
+
_txHash: TxHash,
|
|
229
|
+
_recipient: AztecAddress,
|
|
230
|
+
): Promise<void> {
|
|
231
|
+
return Promise.reject(new OracleMethodNotAvailableError('deliverNote'));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
getLogByTag(_tag: Fr): Promise<LogWithTxData | null> {
|
|
235
|
+
throw new OracleMethodNotAvailableError('getLogByTag');
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
storeCapsule(_contractAddress: AztecAddress, _key: Fr, _capsule: Fr[]): Promise<void> {
|
|
239
|
+
return Promise.reject(new OracleMethodNotAvailableError('storeCapsule'));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
loadCapsule(_contractAddress: AztecAddress, _key: Fr): Promise<Fr[] | null> {
|
|
243
|
+
return Promise.reject(new OracleMethodNotAvailableError('loadCapsule'));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
deleteCapsule(_contractAddress: AztecAddress, _key: Fr): Promise<void> {
|
|
247
|
+
return Promise.reject(new OracleMethodNotAvailableError('deleteCapsule'));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
copyCapsule(_contractAddress: AztecAddress, _srcKey: Fr, _dstKey: Fr, _numEntries: number): Promise<void> {
|
|
251
|
+
return Promise.reject(new OracleMethodNotAvailableError('copyCapsule'));
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
aes128Decrypt(_ciphertext: Buffer, _iv: Buffer, _symKey: Buffer): Promise<Buffer> {
|
|
255
|
+
return Promise.reject(new OracleMethodNotAvailableError('aes128Decrypt'));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
getSharedSecret(_address: AztecAddress, _ephPk: Point): Promise<Point> {
|
|
259
|
+
return Promise.reject(new OracleMethodNotAvailableError('getSharedSecret'));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
storePrivateEventLog(
|
|
263
|
+
_contractAddress: AztecAddress,
|
|
264
|
+
_recipient: AztecAddress,
|
|
265
|
+
_eventSelector: EventSelector,
|
|
266
|
+
_logContent: Fr[],
|
|
267
|
+
_txHash: TxHash,
|
|
268
|
+
_logIndexInTx: number,
|
|
269
|
+
_txIndexInBlock: number,
|
|
270
|
+
): Promise<void> {
|
|
271
|
+
return Promise.reject(new OracleMethodNotAvailableError('storePrivateEventLog'));
|
|
272
|
+
}
|
|
273
|
+
}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { Aes128 } from '@aztec/foundation/crypto';
|
|
2
|
+
import { Fr, Point } from '@aztec/foundation/fields';
|
|
3
|
+
import { applyStringFormatting, createLogger } from '@aztec/foundation/log';
|
|
4
|
+
import type { EventSelector } from '@aztec/stdlib/abi';
|
|
5
|
+
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
6
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
|
+
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
8
|
+
import { siloNullifier } from '@aztec/stdlib/hash';
|
|
9
|
+
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
|
|
10
|
+
import { IndexedTaggingSecret, LogWithTxData } from '@aztec/stdlib/logs';
|
|
11
|
+
import type { NoteStatus } from '@aztec/stdlib/note';
|
|
12
|
+
import { type MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
13
|
+
import type { BlockHeader, Capsule, TxHash } from '@aztec/stdlib/tx';
|
|
14
|
+
|
|
15
|
+
import type { ExecutionDataProvider } from '../execution_data_provider.js';
|
|
16
|
+
import { pickNotes } from '../pick_notes.js';
|
|
17
|
+
import { type NoteData, TypedOracle } from './typed_oracle.js';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The oracle for an execution of utility contract functions.
|
|
21
|
+
*/
|
|
22
|
+
export class UtilityExecutionOracle extends TypedOracle {
|
|
23
|
+
constructor(
|
|
24
|
+
protected readonly contractAddress: AztecAddress,
|
|
25
|
+
/** List of transient auth witnesses to be used during this simulation */
|
|
26
|
+
protected readonly authWitnesses: AuthWitness[],
|
|
27
|
+
protected readonly capsules: Capsule[], // TODO(#12425): Rename to transientCapsules
|
|
28
|
+
protected readonly executionDataProvider: ExecutionDataProvider,
|
|
29
|
+
protected log = createLogger('simulator:client_view_context'),
|
|
30
|
+
protected readonly scopes?: AztecAddress[],
|
|
31
|
+
) {
|
|
32
|
+
super();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public override getBlockNumber(): Promise<number> {
|
|
36
|
+
return this.executionDataProvider.getBlockNumber();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public override getContractAddress(): Promise<AztecAddress> {
|
|
40
|
+
return Promise.resolve(this.contractAddress);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public override getChainId(): Promise<Fr> {
|
|
44
|
+
return Promise.resolve(this.executionDataProvider.getChainId().then(id => new Fr(id)));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public override getVersion(): Promise<Fr> {
|
|
48
|
+
return Promise.resolve(this.executionDataProvider.getVersion().then(v => new Fr(v)));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Retrieve keys associated with a specific master public key and app address.
|
|
53
|
+
* @param pkMHash - The master public key hash.
|
|
54
|
+
* @returns A Promise that resolves to nullifier keys.
|
|
55
|
+
* @throws If the keys are not registered in the key store.
|
|
56
|
+
*/
|
|
57
|
+
public override getKeyValidationRequest(pkMHash: Fr): Promise<KeyValidationRequest> {
|
|
58
|
+
return this.executionDataProvider.getKeyValidationRequest(pkMHash, this.contractAddress);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Fetches the index and sibling path of a leaf at a given block from a given tree.
|
|
63
|
+
* @param blockNumber - The block number at which to get the membership witness.
|
|
64
|
+
* @param treeId - Id of the tree to get the sibling path from.
|
|
65
|
+
* @param leafValue - The leaf value
|
|
66
|
+
* @returns The index and sibling path concatenated [index, sibling_path]
|
|
67
|
+
*/
|
|
68
|
+
public override getMembershipWitness(blockNumber: number, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]> {
|
|
69
|
+
return this.executionDataProvider.getMembershipWitness(blockNumber, treeId, leafValue);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Returns a nullifier membership witness for a given nullifier at a given block.
|
|
74
|
+
* @param blockNumber - The block number at which to get the index.
|
|
75
|
+
* @param nullifier - Nullifier we try to find witness for.
|
|
76
|
+
* @returns The nullifier membership witness (if found).
|
|
77
|
+
*/
|
|
78
|
+
public override async getNullifierMembershipWitness(
|
|
79
|
+
blockNumber: number,
|
|
80
|
+
nullifier: Fr,
|
|
81
|
+
): Promise<NullifierMembershipWitness | undefined> {
|
|
82
|
+
return await this.executionDataProvider.getNullifierMembershipWitness(blockNumber, nullifier);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Returns a low nullifier membership witness for a given nullifier at a given block.
|
|
87
|
+
* @param blockNumber - The block number at which to get the index.
|
|
88
|
+
* @param nullifier - Nullifier we try to find the low nullifier witness for.
|
|
89
|
+
* @returns The low nullifier membership witness (if found).
|
|
90
|
+
* @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
|
|
91
|
+
* list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier
|
|
92
|
+
* we are trying to prove non-inclusion for.
|
|
93
|
+
*/
|
|
94
|
+
public override async getLowNullifierMembershipWitness(
|
|
95
|
+
blockNumber: number,
|
|
96
|
+
nullifier: Fr,
|
|
97
|
+
): Promise<NullifierMembershipWitness | undefined> {
|
|
98
|
+
return await this.executionDataProvider.getLowNullifierMembershipWitness(blockNumber, nullifier);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Returns a public data tree witness for a given leaf slot at a given block.
|
|
103
|
+
* @param blockNumber - The block number at which to get the index.
|
|
104
|
+
* @param leafSlot - The slot of the public data tree to get the witness for.
|
|
105
|
+
* @returns - The witness
|
|
106
|
+
*/
|
|
107
|
+
public override async getPublicDataWitness(
|
|
108
|
+
blockNumber: number,
|
|
109
|
+
leafSlot: Fr,
|
|
110
|
+
): Promise<PublicDataWitness | undefined> {
|
|
111
|
+
return await this.executionDataProvider.getPublicDataWitness(blockNumber, leafSlot);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Fetches a block header of a given block.
|
|
116
|
+
* @param blockNumber - The number of a block of which to get the block header.
|
|
117
|
+
* @returns Block extracted from a block with block number `blockNumber`.
|
|
118
|
+
*/
|
|
119
|
+
public override async getBlockHeader(blockNumber: number): Promise<BlockHeader | undefined> {
|
|
120
|
+
const block = await this.executionDataProvider.getBlock(blockNumber);
|
|
121
|
+
if (!block) {
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
return block.header;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Retrieve the complete address associated to a given address.
|
|
129
|
+
* @param account - The account address.
|
|
130
|
+
* @returns A complete address associated with the input address.
|
|
131
|
+
* @throws An error if the account is not registered in the database.
|
|
132
|
+
*/
|
|
133
|
+
public override getCompleteAddress(account: AztecAddress): Promise<CompleteAddress> {
|
|
134
|
+
return this.executionDataProvider.getCompleteAddress(account);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Returns a contract instance associated with an address or throws if not found.
|
|
139
|
+
* @param address - Address.
|
|
140
|
+
* @returns A contract instance.
|
|
141
|
+
*/
|
|
142
|
+
public override getContractInstance(address: AztecAddress): Promise<ContractInstance> {
|
|
143
|
+
return this.executionDataProvider.getContractInstance(address);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Returns an auth witness for the given message hash. Checks on the list of transient witnesses
|
|
148
|
+
* for this transaction first, and falls back to the local database if not found.
|
|
149
|
+
* @param messageHash - Hash of the message to authenticate.
|
|
150
|
+
* @returns Authentication witness for the requested message hash.
|
|
151
|
+
*/
|
|
152
|
+
public override getAuthWitness(messageHash: Fr): Promise<Fr[] | undefined> {
|
|
153
|
+
return Promise.resolve(this.authWitnesses.find(w => w.requestHash.equals(messageHash))?.witness);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Gets some notes for a contract address and storage slot.
|
|
158
|
+
* Returns a flattened array containing filtered notes.
|
|
159
|
+
*
|
|
160
|
+
* @remarks
|
|
161
|
+
* Check for pending notes with matching slot.
|
|
162
|
+
* Real notes coming from DB will have a leafIndex which
|
|
163
|
+
* represents their index in the note hash tree.
|
|
164
|
+
*
|
|
165
|
+
* @param storageSlot - The storage slot.
|
|
166
|
+
* @param numSelects - The number of valid selects in selectBy and selectValues.
|
|
167
|
+
* @param selectBy - An array of indices of the fields to selects.
|
|
168
|
+
* @param selectValues - The values to match.
|
|
169
|
+
* @param selectComparators - The comparators to use to match values.
|
|
170
|
+
* @param sortBy - An array of indices of the fields to sort.
|
|
171
|
+
* @param sortOrder - The order of the corresponding index in sortBy. (1: DESC, 2: ASC, 0: Do nothing)
|
|
172
|
+
* @param limit - The number of notes to retrieve per query.
|
|
173
|
+
* @param offset - The starting index for pagination.
|
|
174
|
+
* @param status - The status of notes to fetch.
|
|
175
|
+
* @returns Array of note data.
|
|
176
|
+
*/
|
|
177
|
+
public override async getNotes(
|
|
178
|
+
storageSlot: Fr,
|
|
179
|
+
numSelects: number,
|
|
180
|
+
selectByIndexes: number[],
|
|
181
|
+
selectByOffsets: number[],
|
|
182
|
+
selectByLengths: number[],
|
|
183
|
+
selectValues: Fr[],
|
|
184
|
+
selectComparators: number[],
|
|
185
|
+
sortByIndexes: number[],
|
|
186
|
+
sortByOffsets: number[],
|
|
187
|
+
sortByLengths: number[],
|
|
188
|
+
sortOrder: number[],
|
|
189
|
+
limit: number,
|
|
190
|
+
offset: number,
|
|
191
|
+
status: NoteStatus,
|
|
192
|
+
): Promise<NoteData[]> {
|
|
193
|
+
const dbNotes = await this.executionDataProvider.getNotes(this.contractAddress, storageSlot, status, this.scopes);
|
|
194
|
+
return pickNotes<NoteData>(dbNotes, {
|
|
195
|
+
selects: selectByIndexes.slice(0, numSelects).map((index, i) => ({
|
|
196
|
+
selector: { index, offset: selectByOffsets[i], length: selectByLengths[i] },
|
|
197
|
+
value: selectValues[i],
|
|
198
|
+
comparator: selectComparators[i],
|
|
199
|
+
})),
|
|
200
|
+
sorts: sortByIndexes.map((index, i) => ({
|
|
201
|
+
selector: { index, offset: sortByOffsets[i], length: sortByLengths[i] },
|
|
202
|
+
order: sortOrder[i],
|
|
203
|
+
})),
|
|
204
|
+
limit,
|
|
205
|
+
offset,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Check if a nullifier exists in the nullifier tree.
|
|
211
|
+
* @param innerNullifier - The inner nullifier.
|
|
212
|
+
* @returns A boolean indicating whether the nullifier exists in the tree or not.
|
|
213
|
+
*/
|
|
214
|
+
public override async checkNullifierExists(innerNullifier: Fr) {
|
|
215
|
+
const nullifier = await siloNullifier(this.contractAddress, innerNullifier!);
|
|
216
|
+
const index = await this.executionDataProvider.getNullifierIndex(nullifier);
|
|
217
|
+
return index !== undefined;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Fetches a message from the executionDataProvider, given its key.
|
|
222
|
+
* @param contractAddress - Address of a contract by which the message was emitted.
|
|
223
|
+
* @param messageHash - Hash of the message.
|
|
224
|
+
* @param secret - Secret used to compute a nullifier.
|
|
225
|
+
* @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages
|
|
226
|
+
* @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
|
|
227
|
+
*/
|
|
228
|
+
public override async getL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr) {
|
|
229
|
+
return await this.executionDataProvider.getL1ToL2MembershipWitness(contractAddress, messageHash, secret);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Read the public storage data.
|
|
234
|
+
* @param contractAddress - The address to read storage from.
|
|
235
|
+
* @param startStorageSlot - The starting storage slot.
|
|
236
|
+
* @param blockNumber - The block number to read storage at.
|
|
237
|
+
* @param numberOfElements - Number of elements to read from the starting storage slot.
|
|
238
|
+
*/
|
|
239
|
+
public override async storageRead(
|
|
240
|
+
contractAddress: AztecAddress,
|
|
241
|
+
startStorageSlot: Fr,
|
|
242
|
+
blockNumber: number,
|
|
243
|
+
numberOfElements: number,
|
|
244
|
+
) {
|
|
245
|
+
const values = [];
|
|
246
|
+
for (let i = 0n; i < numberOfElements; i++) {
|
|
247
|
+
const storageSlot = new Fr(startStorageSlot.value + i);
|
|
248
|
+
const value = await this.executionDataProvider.getPublicStorageAt(blockNumber, contractAddress, storageSlot);
|
|
249
|
+
|
|
250
|
+
this.log.debug(
|
|
251
|
+
`Oracle storage read: slot=${storageSlot.toString()} address-${contractAddress.toString()} value=${value}`,
|
|
252
|
+
);
|
|
253
|
+
values.push(value);
|
|
254
|
+
}
|
|
255
|
+
return values;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
public override debugLog(message: string, fields: Fr[]): void {
|
|
259
|
+
this.log.verbose(`${applyStringFormatting(message, fields)}`, { module: `${this.log.module}:debug_log` });
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Returns the tagging secret for a given sender and recipient pair, siloed to the current contract address.
|
|
264
|
+
* Includes the next index to be used used for tagging with this secret.
|
|
265
|
+
* For this to work, the ivsk_m of the sender must be known.
|
|
266
|
+
* @param sender - The address sending the note
|
|
267
|
+
* @param recipient - The address receiving the note
|
|
268
|
+
* @returns A tagging secret that can be used to tag notes.
|
|
269
|
+
*/
|
|
270
|
+
public override async getIndexedTaggingSecretAsSender(
|
|
271
|
+
sender: AztecAddress,
|
|
272
|
+
recipient: AztecAddress,
|
|
273
|
+
): Promise<IndexedTaggingSecret> {
|
|
274
|
+
return await this.executionDataProvider.getIndexedTaggingSecretAsSender(this.contractAddress, sender, recipient);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
public override async fetchTaggedLogs(pendingTaggedLogArrayBaseSlot: Fr) {
|
|
278
|
+
await this.executionDataProvider.syncTaggedLogs(this.contractAddress, pendingTaggedLogArrayBaseSlot, this.scopes);
|
|
279
|
+
|
|
280
|
+
await this.executionDataProvider.removeNullifiedNotes(this.contractAddress);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
public override async deliverNote(
|
|
284
|
+
contractAddress: AztecAddress,
|
|
285
|
+
storageSlot: Fr,
|
|
286
|
+
nonce: Fr,
|
|
287
|
+
content: Fr[],
|
|
288
|
+
noteHash: Fr,
|
|
289
|
+
nullifier: Fr,
|
|
290
|
+
txHash: TxHash,
|
|
291
|
+
recipient: AztecAddress,
|
|
292
|
+
) {
|
|
293
|
+
// TODO(#10727): allow other contracts to deliver notes
|
|
294
|
+
if (!this.contractAddress.equals(contractAddress)) {
|
|
295
|
+
throw new Error(`Got a note delivery request from ${contractAddress}, expected ${this.contractAddress}`);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
await this.executionDataProvider.deliverNote(
|
|
299
|
+
contractAddress,
|
|
300
|
+
storageSlot,
|
|
301
|
+
nonce,
|
|
302
|
+
content,
|
|
303
|
+
noteHash,
|
|
304
|
+
nullifier,
|
|
305
|
+
txHash,
|
|
306
|
+
recipient,
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
public override getLogByTag(tag: Fr): Promise<LogWithTxData | null> {
|
|
311
|
+
return this.executionDataProvider.getLogByTag(tag);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
public override storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[]): Promise<void> {
|
|
315
|
+
if (!contractAddress.equals(this.contractAddress)) {
|
|
316
|
+
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
317
|
+
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
318
|
+
}
|
|
319
|
+
return this.executionDataProvider.storeCapsule(this.contractAddress, slot, capsule);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
public override async loadCapsule(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null> {
|
|
323
|
+
if (!contractAddress.equals(this.contractAddress)) {
|
|
324
|
+
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
325
|
+
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
326
|
+
}
|
|
327
|
+
return (
|
|
328
|
+
// TODO(#12425): On the following line, the pertinent capsule gets overshadowed by the transient one. Tackle this.
|
|
329
|
+
this.capsules.find(c => c.contractAddress.equals(contractAddress) && c.storageSlot.equals(slot))?.data ??
|
|
330
|
+
(await this.executionDataProvider.loadCapsule(this.contractAddress, slot))
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
public override deleteCapsule(contractAddress: AztecAddress, slot: Fr): Promise<void> {
|
|
335
|
+
if (!contractAddress.equals(this.contractAddress)) {
|
|
336
|
+
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
337
|
+
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
338
|
+
}
|
|
339
|
+
return this.executionDataProvider.deleteCapsule(this.contractAddress, slot);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
public override copyCapsule(
|
|
343
|
+
contractAddress: AztecAddress,
|
|
344
|
+
srcSlot: Fr,
|
|
345
|
+
dstSlot: Fr,
|
|
346
|
+
numEntries: number,
|
|
347
|
+
): Promise<void> {
|
|
348
|
+
if (!contractAddress.equals(this.contractAddress)) {
|
|
349
|
+
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
350
|
+
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
351
|
+
}
|
|
352
|
+
return this.executionDataProvider.copyCapsule(this.contractAddress, srcSlot, dstSlot, numEntries);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// TODO(#11849): consider replacing this oracle with a pure Noir implementation of aes decryption.
|
|
356
|
+
public override aes128Decrypt(ciphertext: Buffer, iv: Buffer, symKey: Buffer): Promise<Buffer> {
|
|
357
|
+
const aes128 = new Aes128();
|
|
358
|
+
return aes128.decryptBufferCBC(ciphertext, iv, symKey);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
public override getSharedSecret(address: AztecAddress, ephPk: Point): Promise<Point> {
|
|
362
|
+
return this.executionDataProvider.getSharedSecret(address, ephPk);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
public override storePrivateEventLog(
|
|
366
|
+
contractAddress: AztecAddress,
|
|
367
|
+
recipient: AztecAddress,
|
|
368
|
+
eventSelector: EventSelector,
|
|
369
|
+
msgContent: Fr[],
|
|
370
|
+
txHash: TxHash,
|
|
371
|
+
logIndexInTx: number,
|
|
372
|
+
txIndexInBlock: number,
|
|
373
|
+
): Promise<void> {
|
|
374
|
+
return this.executionDataProvider.storePrivateEventLog(
|
|
375
|
+
contractAddress,
|
|
376
|
+
recipient,
|
|
377
|
+
eventSelector,
|
|
378
|
+
msgContent,
|
|
379
|
+
txHash,
|
|
380
|
+
logIndexInTx,
|
|
381
|
+
txIndexInBlock,
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
}
|