@aztec/txe 3.0.0-nightly.20250925 → 3.0.0-nightly.20250927
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/oracle/interfaces.d.ts +51 -0
- package/dest/oracle/interfaces.d.ts.map +1 -0
- package/dest/oracle/interfaces.js +3 -0
- package/dest/oracle/txe_oracle_public_context.d.ts +5 -3
- package/dest/oracle/txe_oracle_public_context.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_public_context.js +14 -3
- package/dest/oracle/txe_oracle_top_level_context.d.ts +9 -7
- package/dest/oracle/txe_oracle_top_level_context.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_top_level_context.js +24 -24
- package/dest/rpc_translator.d.ts +13 -4
- package/dest/rpc_translator.d.ts.map +1 -1
- package/dest/rpc_translator.js +101 -66
- package/dest/txe_session.d.ts +15 -15
- package/dest/txe_session.d.ts.map +1 -1
- package/dest/txe_session.js +141 -99
- package/dest/utils/tx_effect_creation.d.ts +5 -0
- package/dest/utils/tx_effect_creation.d.ts.map +1 -0
- package/dest/utils/tx_effect_creation.js +16 -0
- package/package.json +15 -15
- package/src/oracle/interfaces.ts +80 -0
- package/src/oracle/txe_oracle_public_context.ts +20 -15
- package/src/oracle/txe_oracle_top_level_context.ts +26 -43
- package/src/rpc_translator.ts +125 -69
- package/src/txe_session.ts +196 -120
- package/src/utils/tx_effect_creation.ts +37 -0
- package/dest/oracle/txe_oracle.d.ts +0 -64
- package/dest/oracle/txe_oracle.d.ts.map +0 -1
- package/dest/oracle/txe_oracle.js +0 -263
- package/dest/oracle/txe_typed_oracle.d.ts +0 -41
- package/dest/oracle/txe_typed_oracle.d.ts.map +0 -1
- package/dest/oracle/txe_typed_oracle.js +0 -89
- package/src/oracle/txe_oracle.ts +0 -419
- package/src/oracle/txe_typed_oracle.ts +0 -147
package/dest/rpc_translator.js
CHANGED
|
@@ -5,6 +5,11 @@ import { FunctionSelector, NoteSelector } from '@aztec/stdlib/abi';
|
|
|
5
5
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
6
|
import { MerkleTreeId } from '@aztec/stdlib/trees';
|
|
7
7
|
import { addressFromSingle, arrayOfArraysToBoundedVecOfArrays, arrayToBoundedVec, bufferToU8Array, fromArray, fromSingle, fromUintArray, fromUintBoundedVec, toArray, toForeignCallResult, toSingle } from './util/encoding.js';
|
|
8
|
+
export class UnavailableOracleError extends Error {
|
|
9
|
+
constructor(oracleName){
|
|
10
|
+
super(`${oracleName} oracles not available with the current handler`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
8
13
|
export class RPCTranslator {
|
|
9
14
|
stateHandler;
|
|
10
15
|
oracleHandler;
|
|
@@ -20,54 +25,84 @@ export class RPCTranslator {
|
|
|
20
25
|
this.stateHandler = stateHandler;
|
|
21
26
|
this.oracleHandler = oracleHandler;
|
|
22
27
|
}
|
|
28
|
+
handlerAsMisc() {
|
|
29
|
+
if (!('isMisc' in this.oracleHandler)) {
|
|
30
|
+
throw new UnavailableOracleError('Misc');
|
|
31
|
+
}
|
|
32
|
+
return this.oracleHandler;
|
|
33
|
+
}
|
|
34
|
+
handlerAsUtility() {
|
|
35
|
+
if (!('isUtility' in this.oracleHandler)) {
|
|
36
|
+
throw new UnavailableOracleError('Utility');
|
|
37
|
+
}
|
|
38
|
+
return this.oracleHandler;
|
|
39
|
+
}
|
|
40
|
+
handlerAsPrivate() {
|
|
41
|
+
if (!('isPrivate' in this.oracleHandler)) {
|
|
42
|
+
throw new UnavailableOracleError('Private');
|
|
43
|
+
}
|
|
44
|
+
return this.oracleHandler;
|
|
45
|
+
}
|
|
46
|
+
handlerAsAvm() {
|
|
47
|
+
if (!('isAvm' in this.oracleHandler)) {
|
|
48
|
+
throw new UnavailableOracleError('Avm');
|
|
49
|
+
}
|
|
50
|
+
return this.oracleHandler;
|
|
51
|
+
}
|
|
52
|
+
handlerAsTxe() {
|
|
53
|
+
if (!('isTxe' in this.oracleHandler)) {
|
|
54
|
+
throw new UnavailableOracleError('Txe');
|
|
55
|
+
}
|
|
56
|
+
return this.oracleHandler;
|
|
57
|
+
}
|
|
23
58
|
// TXE session state transition functions - these get handled by the state handler
|
|
24
59
|
async txeSetTopLevelTXEContext() {
|
|
25
|
-
await this.stateHandler.
|
|
60
|
+
await this.stateHandler.enterTopLevelState();
|
|
26
61
|
return toForeignCallResult([]);
|
|
27
62
|
}
|
|
28
63
|
async txeSetPrivateTXEContext(foreignContractAddressIsSome, foreignContractAddressValue, foreignAnchorBlockNumberIsSome, foreignAnchorBlockNumberValue) {
|
|
29
64
|
const contractAddress = fromSingle(foreignContractAddressIsSome).toBool() ? AztecAddress.fromField(fromSingle(foreignContractAddressValue)) : undefined;
|
|
30
65
|
const anchorBlockNumber = fromSingle(foreignAnchorBlockNumberIsSome).toBool() ? fromSingle(foreignAnchorBlockNumberValue).toNumber() : undefined;
|
|
31
|
-
const privateContextInputs = await this.stateHandler.
|
|
66
|
+
const privateContextInputs = await this.stateHandler.enterPrivateState(contractAddress, anchorBlockNumber);
|
|
32
67
|
return toForeignCallResult(privateContextInputs.toFields().map(toSingle));
|
|
33
68
|
}
|
|
34
69
|
async txeSetPublicTXEContext(foreignContractAddressIsSome, foreignContractAddressValue) {
|
|
35
70
|
const contractAddress = fromSingle(foreignContractAddressIsSome).toBool() ? AztecAddress.fromField(fromSingle(foreignContractAddressValue)) : undefined;
|
|
36
|
-
await this.stateHandler.
|
|
71
|
+
await this.stateHandler.enterPublicState(contractAddress);
|
|
37
72
|
return toForeignCallResult([]);
|
|
38
73
|
}
|
|
39
74
|
async txeSetUtilityTXEContext(foreignContractAddressIsSome, foreignContractAddressValue) {
|
|
40
75
|
const contractAddress = fromSingle(foreignContractAddressIsSome).toBool() ? AztecAddress.fromField(fromSingle(foreignContractAddressValue)) : undefined;
|
|
41
|
-
await this.stateHandler.
|
|
76
|
+
await this.stateHandler.enterUtilityState(contractAddress);
|
|
42
77
|
return toForeignCallResult([]);
|
|
43
78
|
}
|
|
44
79
|
// Other oracles - these get handled by the oracle handler
|
|
45
80
|
// TXE-specific oracles
|
|
46
81
|
async txeGetNextBlockNumber() {
|
|
47
|
-
const nextBlockNumber = await this.
|
|
82
|
+
const nextBlockNumber = await this.handlerAsTxe().txeGetNextBlockNumber();
|
|
48
83
|
return toForeignCallResult([
|
|
49
84
|
toSingle(nextBlockNumber)
|
|
50
85
|
]);
|
|
51
86
|
}
|
|
52
87
|
async txeGetNextBlockTimestamp() {
|
|
53
|
-
const nextBlockTimestamp = await this.
|
|
88
|
+
const nextBlockTimestamp = await this.handlerAsTxe().txeGetNextBlockTimestamp();
|
|
54
89
|
return toForeignCallResult([
|
|
55
90
|
toSingle(nextBlockTimestamp)
|
|
56
91
|
]);
|
|
57
92
|
}
|
|
58
93
|
async txeAdvanceBlocksBy(foreignBlocks) {
|
|
59
94
|
const blocks = fromSingle(foreignBlocks).toNumber();
|
|
60
|
-
await this.
|
|
95
|
+
await this.handlerAsTxe().txeAdvanceBlocksBy(blocks);
|
|
61
96
|
return toForeignCallResult([]);
|
|
62
97
|
}
|
|
63
98
|
txeAdvanceTimestampBy(foreignDuration) {
|
|
64
99
|
const duration = fromSingle(foreignDuration).toBigInt();
|
|
65
|
-
this.
|
|
100
|
+
this.handlerAsTxe().txeAdvanceTimestampBy(duration);
|
|
66
101
|
return toForeignCallResult([]);
|
|
67
102
|
}
|
|
68
103
|
async txeDeploy(artifact, instance, foreignSecret) {
|
|
69
104
|
const secret = fromSingle(foreignSecret);
|
|
70
|
-
await this.
|
|
105
|
+
await this.handlerAsTxe().txeDeploy(artifact, instance, secret);
|
|
71
106
|
return toForeignCallResult([
|
|
72
107
|
toArray([
|
|
73
108
|
instance.salt,
|
|
@@ -80,7 +115,7 @@ export class RPCTranslator {
|
|
|
80
115
|
}
|
|
81
116
|
async txeCreateAccount(foreignSecret) {
|
|
82
117
|
const secret = fromSingle(foreignSecret);
|
|
83
|
-
const completeAddress = await this.
|
|
118
|
+
const completeAddress = await this.handlerAsTxe().txeCreateAccount(secret);
|
|
84
119
|
return toForeignCallResult([
|
|
85
120
|
toSingle(completeAddress.address),
|
|
86
121
|
...completeAddress.publicKeys.toFields().map(toSingle)
|
|
@@ -88,7 +123,7 @@ export class RPCTranslator {
|
|
|
88
123
|
}
|
|
89
124
|
async txeAddAccount(artifact, instance, foreignSecret) {
|
|
90
125
|
const secret = fromSingle(foreignSecret);
|
|
91
|
-
const completeAddress = await this.
|
|
126
|
+
const completeAddress = await this.handlerAsTxe().txeAddAccount(artifact, instance, secret);
|
|
92
127
|
return toForeignCallResult([
|
|
93
128
|
toSingle(completeAddress.address),
|
|
94
129
|
...completeAddress.publicKeys.toFields().map(toSingle)
|
|
@@ -97,29 +132,29 @@ export class RPCTranslator {
|
|
|
97
132
|
async txeAddAuthWitness(foreignAddress, foreignMessageHash) {
|
|
98
133
|
const address = addressFromSingle(foreignAddress);
|
|
99
134
|
const messageHash = fromSingle(foreignMessageHash);
|
|
100
|
-
await this.
|
|
135
|
+
await this.handlerAsTxe().txeAddAuthWitness(address, messageHash);
|
|
101
136
|
return toForeignCallResult([]);
|
|
102
137
|
}
|
|
103
138
|
// PXE oracles
|
|
104
139
|
utilityAssertCompatibleOracleVersion(foreignVersion) {
|
|
105
140
|
const version = fromSingle(foreignVersion).toNumber();
|
|
106
|
-
this.
|
|
141
|
+
this.handlerAsMisc().utilityAssertCompatibleOracleVersion(version);
|
|
107
142
|
return toForeignCallResult([]);
|
|
108
143
|
}
|
|
109
144
|
utilityGetRandomField() {
|
|
110
|
-
const randomField = this.
|
|
145
|
+
const randomField = this.handlerAsMisc().utilityGetRandomField();
|
|
111
146
|
return toForeignCallResult([
|
|
112
147
|
toSingle(randomField)
|
|
113
148
|
]);
|
|
114
149
|
}
|
|
115
150
|
async txeGetLastBlockTimestamp() {
|
|
116
|
-
const timestamp = await this.
|
|
151
|
+
const timestamp = await this.handlerAsTxe().txeGetLastBlockTimestamp();
|
|
117
152
|
return toForeignCallResult([
|
|
118
153
|
toSingle(new Fr(timestamp))
|
|
119
154
|
]);
|
|
120
155
|
}
|
|
121
156
|
async txeGetLastTxEffects() {
|
|
122
|
-
const { txHash, noteHashes, nullifiers } = await this.
|
|
157
|
+
const { txHash, noteHashes, nullifiers } = await this.handlerAsTxe().txeGetLastTxEffects();
|
|
123
158
|
return toForeignCallResult([
|
|
124
159
|
toSingle(txHash.hash),
|
|
125
160
|
...arrayToBoundedVec(toArray(noteHashes), MAX_NOTE_HASHES_PER_TX),
|
|
@@ -130,12 +165,12 @@ export class RPCTranslator {
|
|
|
130
165
|
privateStoreInExecutionCache(_foreignLength, foreignValues, foreignHash) {
|
|
131
166
|
const values = fromArray(foreignValues);
|
|
132
167
|
const hash = fromSingle(foreignHash);
|
|
133
|
-
this.
|
|
168
|
+
this.handlerAsPrivate().privateStoreInExecutionCache(values, hash);
|
|
134
169
|
return toForeignCallResult([]);
|
|
135
170
|
}
|
|
136
171
|
async privateLoadFromExecutionCache(foreignHash) {
|
|
137
172
|
const hash = fromSingle(foreignHash);
|
|
138
|
-
const returns = await this.
|
|
173
|
+
const returns = await this.handlerAsPrivate().privateLoadFromExecutionCache(hash);
|
|
139
174
|
return toForeignCallResult([
|
|
140
175
|
toArray(returns)
|
|
141
176
|
]);
|
|
@@ -144,7 +179,7 @@ export class RPCTranslator {
|
|
|
144
179
|
utilityDebugLog(foreignMessage, _foreignLength, foreignFields) {
|
|
145
180
|
const message = fromArray(foreignMessage).map((field)=>String.fromCharCode(field.toNumber())).join('');
|
|
146
181
|
const fields = fromArray(foreignFields);
|
|
147
|
-
this.
|
|
182
|
+
this.handlerAsMisc().utilityDebugLog(message, fields);
|
|
148
183
|
return toForeignCallResult([]);
|
|
149
184
|
}
|
|
150
185
|
async utilityStorageRead(foreignContractAddress, foreignStartStorageSlot, foreignBlockNumber, foreignNumberOfElements) {
|
|
@@ -152,7 +187,7 @@ export class RPCTranslator {
|
|
|
152
187
|
const startStorageSlot = fromSingle(foreignStartStorageSlot);
|
|
153
188
|
const blockNumber = fromSingle(foreignBlockNumber).toNumber();
|
|
154
189
|
const numberOfElements = fromSingle(foreignNumberOfElements).toNumber();
|
|
155
|
-
const values = await this.
|
|
190
|
+
const values = await this.handlerAsUtility().utilityStorageRead(contractAddress, startStorageSlot, blockNumber, numberOfElements);
|
|
156
191
|
return toForeignCallResult([
|
|
157
192
|
toArray(values)
|
|
158
193
|
]);
|
|
@@ -160,7 +195,7 @@ export class RPCTranslator {
|
|
|
160
195
|
async utilityGetPublicDataWitness(foreignBlockNumber, foreignLeafSlot) {
|
|
161
196
|
const blockNumber = fromSingle(foreignBlockNumber).toNumber();
|
|
162
197
|
const leafSlot = fromSingle(foreignLeafSlot);
|
|
163
|
-
const witness = await this.
|
|
198
|
+
const witness = await this.handlerAsUtility().utilityGetPublicDataWitness(blockNumber, leafSlot);
|
|
164
199
|
if (!witness) {
|
|
165
200
|
throw new Error(`Public data witness not found for slot ${leafSlot} at block ${blockNumber}.`);
|
|
166
201
|
}
|
|
@@ -183,7 +218,7 @@ export class RPCTranslator {
|
|
|
183
218
|
const status = fromSingle(foreignStatus).toNumber();
|
|
184
219
|
const maxNotes = fromSingle(foreignMaxNotes).toNumber();
|
|
185
220
|
const packedRetrievedNoteLength = fromSingle(foreignPackedRetrievedNoteLength).toNumber();
|
|
186
|
-
const noteDatas = await this.
|
|
221
|
+
const noteDatas = await this.handlerAsUtility().utilityGetNotes(storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status);
|
|
187
222
|
const returnDataAsArrayOfArrays = noteDatas.map(packAsRetrievedNote);
|
|
188
223
|
// Now we convert each sub-array to an array of ForeignCallSingles
|
|
189
224
|
const returnDataAsArrayOfForeignCallSingleArrays = returnDataAsArrayOfArrays.map((subArray)=>subArray.map(toSingle));
|
|
@@ -196,31 +231,31 @@ export class RPCTranslator {
|
|
|
196
231
|
const note = fromArray(foreignNote);
|
|
197
232
|
const noteHash = fromSingle(foreignNoteHash);
|
|
198
233
|
const counter = fromSingle(foreignCounter).toNumber();
|
|
199
|
-
this.
|
|
234
|
+
this.handlerAsPrivate().privateNotifyCreatedNote(storageSlot, noteTypeId, note, noteHash, counter);
|
|
200
235
|
return toForeignCallResult([]);
|
|
201
236
|
}
|
|
202
237
|
async privateNotifyNullifiedNote(foreignInnerNullifier, foreignNoteHash, foreignCounter) {
|
|
203
238
|
const innerNullifier = fromSingle(foreignInnerNullifier);
|
|
204
239
|
const noteHash = fromSingle(foreignNoteHash);
|
|
205
240
|
const counter = fromSingle(foreignCounter).toNumber();
|
|
206
|
-
await this.
|
|
241
|
+
await this.handlerAsPrivate().privateNotifyNullifiedNote(innerNullifier, noteHash, counter);
|
|
207
242
|
return toForeignCallResult([]);
|
|
208
243
|
}
|
|
209
244
|
async privateNotifyCreatedNullifier(foreignInnerNullifier) {
|
|
210
245
|
const innerNullifier = fromSingle(foreignInnerNullifier);
|
|
211
|
-
await this.
|
|
246
|
+
await this.handlerAsPrivate().privateNotifyCreatedNullifier(innerNullifier);
|
|
212
247
|
return toForeignCallResult([]);
|
|
213
248
|
}
|
|
214
249
|
async utilityCheckNullifierExists(foreignInnerNullifier) {
|
|
215
250
|
const innerNullifier = fromSingle(foreignInnerNullifier);
|
|
216
|
-
const exists = await this.
|
|
251
|
+
const exists = await this.handlerAsUtility().utilityCheckNullifierExists(innerNullifier);
|
|
217
252
|
return toForeignCallResult([
|
|
218
253
|
toSingle(new Fr(exists))
|
|
219
254
|
]);
|
|
220
255
|
}
|
|
221
256
|
async utilityGetContractInstance(foreignAddress) {
|
|
222
257
|
const address = addressFromSingle(foreignAddress);
|
|
223
|
-
const instance = await this.
|
|
258
|
+
const instance = await this.handlerAsUtility().utilityGetContractInstance(address);
|
|
224
259
|
return toForeignCallResult([
|
|
225
260
|
instance.salt,
|
|
226
261
|
instance.deployer.toField(),
|
|
@@ -231,7 +266,7 @@ export class RPCTranslator {
|
|
|
231
266
|
}
|
|
232
267
|
async utilityGetPublicKeysAndPartialAddress(foreignAddress) {
|
|
233
268
|
const address = addressFromSingle(foreignAddress);
|
|
234
|
-
const { publicKeys, partialAddress } = await this.
|
|
269
|
+
const { publicKeys, partialAddress } = await this.handlerAsUtility().utilityGetPublicKeysAndPartialAddress(address);
|
|
235
270
|
return toForeignCallResult([
|
|
236
271
|
toArray([
|
|
237
272
|
...publicKeys.toFields(),
|
|
@@ -241,7 +276,7 @@ export class RPCTranslator {
|
|
|
241
276
|
}
|
|
242
277
|
async utilityGetKeyValidationRequest(foreignPkMHash) {
|
|
243
278
|
const pkMHash = fromSingle(foreignPkMHash);
|
|
244
|
-
const keyValidationRequest = await this.
|
|
279
|
+
const keyValidationRequest = await this.handlerAsUtility().utilityGetKeyValidationRequest(pkMHash);
|
|
245
280
|
return toForeignCallResult(keyValidationRequest.toFields().map(toSingle));
|
|
246
281
|
}
|
|
247
282
|
privateCallPrivateFunction(_foreignTargetContractAddress, _foreignFunctionSelector, _foreignArgsHash, _foreignSideEffectCounter, _foreignIsStaticCall) {
|
|
@@ -250,7 +285,7 @@ export class RPCTranslator {
|
|
|
250
285
|
async utilityGetNullifierMembershipWitness(foreignBlockNumber, foreignNullifier) {
|
|
251
286
|
const blockNumber = fromSingle(foreignBlockNumber).toNumber();
|
|
252
287
|
const nullifier = fromSingle(foreignNullifier);
|
|
253
|
-
const witness = await this.
|
|
288
|
+
const witness = await this.handlerAsUtility().utilityGetNullifierMembershipWitness(blockNumber, nullifier);
|
|
254
289
|
if (!witness) {
|
|
255
290
|
throw new Error(`Nullifier membership witness not found at block ${blockNumber}.`);
|
|
256
291
|
}
|
|
@@ -258,7 +293,7 @@ export class RPCTranslator {
|
|
|
258
293
|
}
|
|
259
294
|
async utilityGetAuthWitness(foreignMessageHash) {
|
|
260
295
|
const messageHash = fromSingle(foreignMessageHash);
|
|
261
|
-
const authWitness = await this.
|
|
296
|
+
const authWitness = await this.handlerAsUtility().utilityGetAuthWitness(messageHash);
|
|
262
297
|
if (!authWitness) {
|
|
263
298
|
throw new Error(`Auth witness not found for message hash ${messageHash}.`);
|
|
264
299
|
}
|
|
@@ -276,12 +311,12 @@ export class RPCTranslator {
|
|
|
276
311
|
throw new Error('Enqueueing public calls is not supported in TestEnvironment::private_context');
|
|
277
312
|
}
|
|
278
313
|
async utilityGetUtilityContext() {
|
|
279
|
-
const context = await this.
|
|
314
|
+
const context = await this.handlerAsUtility().utilityGetUtilityContext();
|
|
280
315
|
return toForeignCallResult(context.toNoirRepresentation());
|
|
281
316
|
}
|
|
282
317
|
async utilityGetBlockHeader(foreignBlockNumber) {
|
|
283
318
|
const blockNumber = fromSingle(foreignBlockNumber).toNumber();
|
|
284
|
-
const header = await this.
|
|
319
|
+
const header = await this.handlerAsUtility().utilityGetBlockHeader(blockNumber);
|
|
285
320
|
if (!header) {
|
|
286
321
|
throw new Error(`Block header not found for block ${blockNumber}.`);
|
|
287
322
|
}
|
|
@@ -291,7 +326,7 @@ export class RPCTranslator {
|
|
|
291
326
|
const blockNumber = fromSingle(foreignBlockNumber).toNumber();
|
|
292
327
|
const treeId = fromSingle(foreignTreeId).toNumber();
|
|
293
328
|
const leafValue = fromSingle(foreignLeafValue);
|
|
294
|
-
const witness = await this.
|
|
329
|
+
const witness = await this.handlerAsUtility().utilityGetMembershipWitness(blockNumber, treeId, leafValue);
|
|
295
330
|
if (!witness) {
|
|
296
331
|
throw new Error(`Membership witness in tree ${MerkleTreeId[treeId]} not found for value ${leafValue} at block ${blockNumber}.`);
|
|
297
332
|
}
|
|
@@ -303,7 +338,7 @@ export class RPCTranslator {
|
|
|
303
338
|
async utilityGetLowNullifierMembershipWitness(foreignBlockNumber, foreignNullifier) {
|
|
304
339
|
const blockNumber = fromSingle(foreignBlockNumber).toNumber();
|
|
305
340
|
const nullifier = fromSingle(foreignNullifier);
|
|
306
|
-
const witness = await this.
|
|
341
|
+
const witness = await this.handlerAsUtility().utilityGetLowNullifierMembershipWitness(blockNumber, nullifier);
|
|
307
342
|
if (!witness) {
|
|
308
343
|
throw new Error(`Low nullifier witness not found for nullifier ${nullifier} at block ${blockNumber}.`);
|
|
309
344
|
}
|
|
@@ -312,40 +347,40 @@ export class RPCTranslator {
|
|
|
312
347
|
async utilityGetIndexedTaggingSecretAsSender(foreignSender, foreignRecipient) {
|
|
313
348
|
const sender = AztecAddress.fromField(fromSingle(foreignSender));
|
|
314
349
|
const recipient = AztecAddress.fromField(fromSingle(foreignRecipient));
|
|
315
|
-
const secret = await this.
|
|
350
|
+
const secret = await this.handlerAsUtility().utilityGetIndexedTaggingSecretAsSender(sender, recipient);
|
|
316
351
|
return toForeignCallResult(secret.toFields().map(toSingle));
|
|
317
352
|
}
|
|
318
353
|
async utilityFetchTaggedLogs(foreignPendingTaggedLogArrayBaseSlot) {
|
|
319
354
|
const pendingTaggedLogArrayBaseSlot = fromSingle(foreignPendingTaggedLogArrayBaseSlot);
|
|
320
|
-
await this.
|
|
355
|
+
await this.handlerAsUtility().utilityFetchTaggedLogs(pendingTaggedLogArrayBaseSlot);
|
|
321
356
|
return toForeignCallResult([]);
|
|
322
357
|
}
|
|
323
358
|
async utilityValidateEnqueuedNotesAndEvents(foreignContractAddress, foreignNoteValidationRequestsArrayBaseSlot, foreignEventValidationRequestsArrayBaseSlot) {
|
|
324
359
|
const contractAddress = AztecAddress.fromField(fromSingle(foreignContractAddress));
|
|
325
360
|
const noteValidationRequestsArrayBaseSlot = fromSingle(foreignNoteValidationRequestsArrayBaseSlot);
|
|
326
361
|
const eventValidationRequestsArrayBaseSlot = fromSingle(foreignEventValidationRequestsArrayBaseSlot);
|
|
327
|
-
await this.
|
|
362
|
+
await this.handlerAsUtility().utilityValidateEnqueuedNotesAndEvents(contractAddress, noteValidationRequestsArrayBaseSlot, eventValidationRequestsArrayBaseSlot);
|
|
328
363
|
return toForeignCallResult([]);
|
|
329
364
|
}
|
|
330
365
|
async utilityBulkRetrieveLogs(foreignContractAddress, foreignLogRetrievalRequestsArrayBaseSlot, foreignLogRetrievalResponsesArrayBaseSlot) {
|
|
331
366
|
const contractAddress = AztecAddress.fromField(fromSingle(foreignContractAddress));
|
|
332
367
|
const logRetrievalRequestsArrayBaseSlot = fromSingle(foreignLogRetrievalRequestsArrayBaseSlot);
|
|
333
368
|
const logRetrievalResponsesArrayBaseSlot = fromSingle(foreignLogRetrievalResponsesArrayBaseSlot);
|
|
334
|
-
await this.
|
|
369
|
+
await this.handlerAsUtility().utilityBulkRetrieveLogs(contractAddress, logRetrievalRequestsArrayBaseSlot, logRetrievalResponsesArrayBaseSlot);
|
|
335
370
|
return toForeignCallResult([]);
|
|
336
371
|
}
|
|
337
372
|
async utilityStoreCapsule(foreignContractAddress, foreignSlot, foreignCapsule) {
|
|
338
373
|
const contractAddress = AztecAddress.fromField(fromSingle(foreignContractAddress));
|
|
339
374
|
const slot = fromSingle(foreignSlot);
|
|
340
375
|
const capsule = fromArray(foreignCapsule);
|
|
341
|
-
await this.
|
|
376
|
+
await this.handlerAsUtility().utilityStoreCapsule(contractAddress, slot, capsule);
|
|
342
377
|
return toForeignCallResult([]);
|
|
343
378
|
}
|
|
344
379
|
async utilityLoadCapsule(foreignContractAddress, foreignSlot, foreignTSize) {
|
|
345
380
|
const contractAddress = AztecAddress.fromField(fromSingle(foreignContractAddress));
|
|
346
381
|
const slot = fromSingle(foreignSlot);
|
|
347
382
|
const tSize = fromSingle(foreignTSize).toNumber();
|
|
348
|
-
const values = await this.
|
|
383
|
+
const values = await this.handlerAsUtility().utilityLoadCapsule(contractAddress, slot);
|
|
349
384
|
// We are going to return a Noir Option struct to represent the possibility of null values. Options are a struct
|
|
350
385
|
// with two fields: `some` (a boolean) and `value` (a field array in this case).
|
|
351
386
|
if (values === null) {
|
|
@@ -365,7 +400,7 @@ export class RPCTranslator {
|
|
|
365
400
|
async utilityDeleteCapsule(foreignContractAddress, foreignSlot) {
|
|
366
401
|
const contractAddress = AztecAddress.fromField(fromSingle(foreignContractAddress));
|
|
367
402
|
const slot = fromSingle(foreignSlot);
|
|
368
|
-
await this.
|
|
403
|
+
await this.handlerAsUtility().utilityDeleteCapsule(contractAddress, slot);
|
|
369
404
|
return toForeignCallResult([]);
|
|
370
405
|
}
|
|
371
406
|
async utilityCopyCapsule(foreignContractAddress, foreignSrcSlot, foreignDstSlot, foreignNumEntries) {
|
|
@@ -373,7 +408,7 @@ export class RPCTranslator {
|
|
|
373
408
|
const srcSlot = fromSingle(foreignSrcSlot);
|
|
374
409
|
const dstSlot = fromSingle(foreignDstSlot);
|
|
375
410
|
const numEntries = fromSingle(foreignNumEntries).toNumber();
|
|
376
|
-
await this.
|
|
411
|
+
await this.handlerAsUtility().utilityCopyCapsule(contractAddress, srcSlot, dstSlot, numEntries);
|
|
377
412
|
return toForeignCallResult([]);
|
|
378
413
|
}
|
|
379
414
|
// TODO: I forgot to add a corresponding function here, when I introduced an oracle method to txe_oracle.ts.
|
|
@@ -384,7 +419,7 @@ export class RPCTranslator {
|
|
|
384
419
|
const ciphertext = fromUintBoundedVec(foreignCiphertextBVecStorage, foreignCiphertextLength, 8);
|
|
385
420
|
const iv = fromUintArray(foreignIv, 8);
|
|
386
421
|
const symKey = fromUintArray(foreignSymKey, 8);
|
|
387
|
-
const plaintextBuffer = await this.
|
|
422
|
+
const plaintextBuffer = await this.handlerAsUtility().utilityAes128Decrypt(ciphertext, iv, symKey);
|
|
388
423
|
return toForeignCallResult(arrayToBoundedVec(bufferToU8Array(plaintextBuffer), foreignCiphertextBVecStorage.length));
|
|
389
424
|
}
|
|
390
425
|
async utilityGetSharedSecret(foreignAddress, foreignEphPKField0, foreignEphPKField1, foreignEphPKField2) {
|
|
@@ -394,7 +429,7 @@ export class RPCTranslator {
|
|
|
394
429
|
fromSingle(foreignEphPKField1),
|
|
395
430
|
fromSingle(foreignEphPKField2)
|
|
396
431
|
]);
|
|
397
|
-
const secret = await this.
|
|
432
|
+
const secret = await this.handlerAsUtility().utilityGetSharedSecret(address, ephPK);
|
|
398
433
|
return toForeignCallResult(secret.toFields().map(toSingle));
|
|
399
434
|
}
|
|
400
435
|
emitOffchainEffect(_foreignData) {
|
|
@@ -407,7 +442,7 @@ export class RPCTranslator {
|
|
|
407
442
|
}
|
|
408
443
|
async avmOpcodeStorageRead(foreignSlot) {
|
|
409
444
|
const slot = fromSingle(foreignSlot);
|
|
410
|
-
const value = (await this.
|
|
445
|
+
const value = (await this.handlerAsAvm().avmOpcodeStorageRead(slot)).value;
|
|
411
446
|
return toForeignCallResult([
|
|
412
447
|
toSingle(new Fr(value))
|
|
413
448
|
]);
|
|
@@ -415,12 +450,12 @@ export class RPCTranslator {
|
|
|
415
450
|
async avmOpcodeStorageWrite(foreignSlot, foreignValue) {
|
|
416
451
|
const slot = fromSingle(foreignSlot);
|
|
417
452
|
const value = fromSingle(foreignValue);
|
|
418
|
-
await this.
|
|
453
|
+
await this.handlerAsAvm().avmOpcodeStorageWrite(slot, value);
|
|
419
454
|
return toForeignCallResult([]);
|
|
420
455
|
}
|
|
421
456
|
async avmOpcodeGetContractInstanceDeployer(foreignAddress) {
|
|
422
457
|
const address = addressFromSingle(foreignAddress);
|
|
423
|
-
const instance = await this.
|
|
458
|
+
const instance = await this.handlerAsUtility().utilityGetContractInstance(address);
|
|
424
459
|
return toForeignCallResult([
|
|
425
460
|
toSingle(instance.deployer),
|
|
426
461
|
// AVM requires an extra boolean indicating the instance was found
|
|
@@ -429,7 +464,7 @@ export class RPCTranslator {
|
|
|
429
464
|
}
|
|
430
465
|
async avmOpcodeGetContractInstanceClassId(foreignAddress) {
|
|
431
466
|
const address = addressFromSingle(foreignAddress);
|
|
432
|
-
const instance = await this.
|
|
467
|
+
const instance = await this.handlerAsUtility().utilityGetContractInstance(address);
|
|
433
468
|
return toForeignCallResult([
|
|
434
469
|
toSingle(instance.currentContractClassId),
|
|
435
470
|
// AVM requires an extra boolean indicating the instance was found
|
|
@@ -438,69 +473,69 @@ export class RPCTranslator {
|
|
|
438
473
|
}
|
|
439
474
|
async avmOpcodeGetContractInstanceInitializationHash(foreignAddress) {
|
|
440
475
|
const address = addressFromSingle(foreignAddress);
|
|
441
|
-
const instance = await this.
|
|
476
|
+
const instance = await this.handlerAsUtility().utilityGetContractInstance(address);
|
|
442
477
|
return toForeignCallResult([
|
|
443
478
|
toSingle(instance.initializationHash),
|
|
444
479
|
// AVM requires an extra boolean indicating the instance was found
|
|
445
480
|
toSingle(new Fr(1))
|
|
446
481
|
]);
|
|
447
482
|
}
|
|
448
|
-
avmOpcodeSender() {
|
|
449
|
-
const sender = this.
|
|
483
|
+
async avmOpcodeSender() {
|
|
484
|
+
const sender = await this.handlerAsAvm().avmOpcodeSender();
|
|
450
485
|
return toForeignCallResult([
|
|
451
486
|
toSingle(sender)
|
|
452
487
|
]);
|
|
453
488
|
}
|
|
454
489
|
async avmOpcodeEmitNullifier(foreignNullifier) {
|
|
455
490
|
const nullifier = fromSingle(foreignNullifier);
|
|
456
|
-
await this.
|
|
491
|
+
await this.handlerAsAvm().avmOpcodeEmitNullifier(nullifier);
|
|
457
492
|
return toForeignCallResult([]);
|
|
458
493
|
}
|
|
459
494
|
async avmOpcodeEmitNoteHash(foreignNoteHash) {
|
|
460
495
|
const noteHash = fromSingle(foreignNoteHash);
|
|
461
|
-
await this.
|
|
496
|
+
await this.handlerAsAvm().avmOpcodeEmitNoteHash(noteHash);
|
|
462
497
|
return toForeignCallResult([]);
|
|
463
498
|
}
|
|
464
499
|
async avmOpcodeNullifierExists(foreignInnerNullifier, foreignTargetAddress) {
|
|
465
500
|
const innerNullifier = fromSingle(foreignInnerNullifier);
|
|
466
501
|
const targetAddress = AztecAddress.fromField(fromSingle(foreignTargetAddress));
|
|
467
|
-
const exists = await this.
|
|
502
|
+
const exists = await this.handlerAsAvm().avmOpcodeNullifierExists(innerNullifier, targetAddress);
|
|
468
503
|
return toForeignCallResult([
|
|
469
504
|
toSingle(new Fr(exists))
|
|
470
505
|
]);
|
|
471
506
|
}
|
|
472
507
|
async avmOpcodeAddress() {
|
|
473
|
-
const contractAddress = await this.
|
|
508
|
+
const contractAddress = await this.handlerAsAvm().avmOpcodeAddress();
|
|
474
509
|
return toForeignCallResult([
|
|
475
510
|
toSingle(contractAddress.toField())
|
|
476
511
|
]);
|
|
477
512
|
}
|
|
478
513
|
async avmOpcodeBlockNumber() {
|
|
479
|
-
const blockNumber = await this.
|
|
514
|
+
const blockNumber = await this.handlerAsAvm().avmOpcodeBlockNumber();
|
|
480
515
|
return toForeignCallResult([
|
|
481
516
|
toSingle(new Fr(blockNumber))
|
|
482
517
|
]);
|
|
483
518
|
}
|
|
484
519
|
async avmOpcodeTimestamp() {
|
|
485
|
-
const timestamp = await this.
|
|
520
|
+
const timestamp = await this.handlerAsAvm().avmOpcodeTimestamp();
|
|
486
521
|
return toForeignCallResult([
|
|
487
522
|
toSingle(new Fr(timestamp))
|
|
488
523
|
]);
|
|
489
524
|
}
|
|
490
525
|
async avmOpcodeIsStaticCall() {
|
|
491
|
-
const isStaticCall = await this.
|
|
526
|
+
const isStaticCall = await this.handlerAsAvm().avmOpcodeIsStaticCall();
|
|
492
527
|
return toForeignCallResult([
|
|
493
528
|
toSingle(new Fr(isStaticCall ? 1 : 0))
|
|
494
529
|
]);
|
|
495
530
|
}
|
|
496
531
|
async avmOpcodeChainId() {
|
|
497
|
-
const chainId = await this.
|
|
532
|
+
const chainId = await this.handlerAsAvm().avmOpcodeChainId();
|
|
498
533
|
return toForeignCallResult([
|
|
499
534
|
toSingle(chainId)
|
|
500
535
|
]);
|
|
501
536
|
}
|
|
502
537
|
async avmOpcodeVersion() {
|
|
503
|
-
const version = await this.
|
|
538
|
+
const version = await this.handlerAsAvm().avmOpcodeVersion();
|
|
504
539
|
return toForeignCallResult([
|
|
505
540
|
toSingle(version)
|
|
506
541
|
]);
|
|
@@ -527,7 +562,7 @@ export class RPCTranslator {
|
|
|
527
562
|
const args = fromArray(foreignArgs);
|
|
528
563
|
const argsHash = fromSingle(foreignArgsHash);
|
|
529
564
|
const isStaticCall = fromSingle(foreignIsStaticCall).toBool();
|
|
530
|
-
const returnValues = await this.
|
|
565
|
+
const returnValues = await this.handlerAsTxe().txePrivateCallNewFlow(from, targetContractAddress, functionSelector, args, argsHash, isStaticCall);
|
|
531
566
|
return toForeignCallResult([
|
|
532
567
|
toArray(returnValues)
|
|
533
568
|
]);
|
|
@@ -536,7 +571,7 @@ export class RPCTranslator {
|
|
|
536
571
|
const targetContractAddress = addressFromSingle(foreignTargetContractAddress);
|
|
537
572
|
const functionSelector = FunctionSelector.fromField(fromSingle(foreignFunctionSelector));
|
|
538
573
|
const args = fromArray(foreignArgs);
|
|
539
|
-
const returnValues = await this.
|
|
574
|
+
const returnValues = await this.handlerAsTxe().txeSimulateUtilityFunction(targetContractAddress, functionSelector, args);
|
|
540
575
|
return toForeignCallResult([
|
|
541
576
|
toArray(returnValues)
|
|
542
577
|
]);
|
|
@@ -546,13 +581,13 @@ export class RPCTranslator {
|
|
|
546
581
|
const address = addressFromSingle(foreignAddress);
|
|
547
582
|
const calldata = fromArray(foreignCalldata);
|
|
548
583
|
const isStaticCall = fromSingle(foreignIsStaticCall).toBool();
|
|
549
|
-
const returnValues = await this.
|
|
584
|
+
const returnValues = await this.handlerAsTxe().txePublicCallNewFlow(from, address, calldata, isStaticCall);
|
|
550
585
|
return toForeignCallResult([
|
|
551
586
|
toArray(returnValues)
|
|
552
587
|
]);
|
|
553
588
|
}
|
|
554
589
|
async privateGetSenderForTags() {
|
|
555
|
-
const sender = await this.
|
|
590
|
+
const sender = await this.handlerAsPrivate().privateGetSenderForTags();
|
|
556
591
|
// Return a Noir Option struct with `some` and `value` fields
|
|
557
592
|
if (sender === undefined) {
|
|
558
593
|
// No sender found, return Option with some=0 and value=0
|
|
@@ -570,7 +605,7 @@ export class RPCTranslator {
|
|
|
570
605
|
}
|
|
571
606
|
async privateSetSenderForTags(foreignSenderForTags) {
|
|
572
607
|
const senderForTags = AztecAddress.fromField(fromSingle(foreignSenderForTags));
|
|
573
|
-
await this.
|
|
608
|
+
await this.handlerAsPrivate().privateSetSenderForTags(senderForTags);
|
|
574
609
|
return toForeignCallResult([]);
|
|
575
610
|
}
|
|
576
611
|
}
|
package/dest/txe_session.d.ts
CHANGED
|
@@ -3,10 +3,11 @@ import { type Logger } from '@aztec/foundation/log';
|
|
|
3
3
|
import { KeyStore } from '@aztec/key-store';
|
|
4
4
|
import type { ProtocolContract } from '@aztec/protocol-contracts';
|
|
5
5
|
import { AddressDataProvider, PXEOracleInterface } from '@aztec/pxe/server';
|
|
6
|
+
import { type IPrivateExecutionOracle, type IUtilityExecutionOracle } from '@aztec/pxe/simulator';
|
|
6
7
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
8
|
import { PrivateContextInputs } from '@aztec/stdlib/kernel';
|
|
8
9
|
import type { UInt32 } from '@aztec/stdlib/types';
|
|
9
|
-
import type {
|
|
10
|
+
import type { IAvmExecutionOracle, ITxeExecutionOracle } from './oracle/interfaces.js';
|
|
10
11
|
import { RPCTranslator } from './rpc_translator.js';
|
|
11
12
|
import { TXEStateMachine } from './state_machine/index.js';
|
|
12
13
|
import type { ForeignCallArgs, ForeignCallResult } from './util/encoding.js';
|
|
@@ -21,10 +22,10 @@ type MethodNames<T> = {
|
|
|
21
22
|
*/
|
|
22
23
|
export type TXEOracleFunctionName = MethodNames<RPCTranslator>;
|
|
23
24
|
export interface TXESessionStateHandler {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
enterTopLevelState(): Promise<void>;
|
|
26
|
+
enterPublicState(contractAddress?: AztecAddress): Promise<void>;
|
|
27
|
+
enterPrivateState(contractAddress?: AztecAddress, anchorBlockNumber?: UInt32): Promise<PrivateContextInputs>;
|
|
28
|
+
enterUtilityState(contractAddress?: AztecAddress): Promise<void>;
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
* A `TXESession` corresponds to a Noir `#[test]` function, and handles all of its oracle calls, stores test-specific
|
|
@@ -43,7 +44,8 @@ export declare class TXESession implements TXESessionStateHandler {
|
|
|
43
44
|
private nextBlockTimestamp;
|
|
44
45
|
private pxeOracleInterface;
|
|
45
46
|
private state;
|
|
46
|
-
|
|
47
|
+
private authwits;
|
|
48
|
+
constructor(logger: Logger, stateMachine: TXEStateMachine, oracleHandler: IUtilityExecutionOracle | IPrivateExecutionOracle | IAvmExecutionOracle | ITxeExecutionOracle, contractDataProvider: TXEContractDataProvider, keyStore: KeyStore, addressDataProvider: AddressDataProvider, accountDataProvider: TXEAccountDataProvider, chainId: Fr, version: Fr, nextBlockTimestamp: bigint, pxeOracleInterface: PXEOracleInterface);
|
|
47
49
|
static init(protocolContracts: ProtocolContract[]): Promise<TXESession>;
|
|
48
50
|
/**
|
|
49
51
|
* Processes an oracle function invoked by the Noir test associated to this session.
|
|
@@ -52,16 +54,14 @@ export declare class TXESession implements TXESessionStateHandler {
|
|
|
52
54
|
* @returns The oracle return values.
|
|
53
55
|
*/
|
|
54
56
|
processFunction(functionName: TXEOracleFunctionName, inputs: ForeignCallArgs): Promise<ForeignCallResult>;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
private
|
|
60
|
-
private
|
|
61
|
-
private
|
|
57
|
+
enterTopLevelState(): Promise<void>;
|
|
58
|
+
enterPrivateState(contractAddress?: AztecAddress, anchorBlockNumber?: UInt32): Promise<PrivateContextInputs>;
|
|
59
|
+
enterPublicState(contractAddress?: AztecAddress): Promise<void>;
|
|
60
|
+
enterUtilityState(contractAddress?: AztecAddress): Promise<void>;
|
|
61
|
+
private exitTopLevelState;
|
|
62
|
+
private exitPrivateState;
|
|
63
|
+
private exitPublicState;
|
|
62
64
|
private exitUtilityContext;
|
|
63
|
-
private assertState;
|
|
64
|
-
private getPrivateContextInputs;
|
|
65
65
|
}
|
|
66
66
|
export {};
|
|
67
67
|
//# sourceMappingURL=txe_session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"txe_session.d.ts","sourceRoot":"","sources":["../src/txe_session.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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