@aztec/stdlib 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/abi/event_metadata_definition.d.ts +8 -0
- package/dest/abi/event_metadata_definition.d.ts.map +1 -0
- package/dest/abi/event_metadata_definition.js +1 -0
- package/dest/abi/index.d.ts +1 -0
- package/dest/abi/index.d.ts.map +1 -1
- package/dest/abi/index.js +1 -0
- package/dest/avm/avm_accumulated_data.d.ts +1 -0
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +4 -0
- package/dest/avm/index.d.ts +0 -1
- package/dest/avm/index.d.ts.map +1 -1
- package/dest/avm/index.js +0 -1
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +0 -5
- package/dest/contract/contract_class_metadata.d.ts +8 -0
- package/dest/contract/contract_class_metadata.d.ts.map +1 -0
- package/dest/contract/contract_class_metadata.js +1 -0
- package/dest/contract/contract_metadata.d.ts +7 -0
- package/dest/contract/contract_metadata.d.ts.map +1 -0
- package/dest/contract/contract_metadata.js +1 -0
- package/dest/contract/index.d.ts +2 -0
- package/dest/contract/index.d.ts.map +1 -1
- package/dest/contract/index.js +2 -0
- package/dest/file-store/factory.d.ts.map +1 -1
- package/dest/file-store/factory.js +18 -0
- package/dest/file-store/s3.d.ts +25 -0
- package/dest/file-store/s3.d.ts.map +1 -0
- package/dest/file-store/s3.js +187 -0
- package/dest/interfaces/aztec-node-admin.d.ts +6 -0
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/client.d.ts +0 -1
- package/dest/interfaces/client.d.ts.map +1 -1
- package/dest/interfaces/client.js +0 -1
- package/dest/interfaces/proving-job.d.ts +5 -5
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +3 -3
- package/dest/interfaces/server_circuit_prover.d.ts +2 -2
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/slasher.d.ts +4 -0
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +1 -0
- package/dest/interfaces/validator.d.ts +6 -1
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +2 -1
- package/dest/logs/contract_class_log.d.ts +1 -1
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +1 -3
- package/dest/rollup/avm_proof_data.d.ts +2 -12
- package/dest/rollup/avm_proof_data.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.js +0 -24
- package/dest/rollup/base_rollup_hints.d.ts +16 -25
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +26 -32
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +13 -13
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup_private_inputs.js +20 -20
- package/dest/rollup/index.d.ts +2 -1
- package/dest/rollup/index.d.ts.map +1 -1
- package/dest/rollup/index.js +2 -1
- package/dest/rollup/public_tube_private_inputs.d.ts +4 -2
- package/dest/rollup/public_tube_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_tube_private_inputs.js +7 -3
- package/dest/rollup/public_tube_public_inputs.d.ts +20 -0
- package/dest/rollup/public_tube_public_inputs.d.ts.map +1 -0
- package/dest/rollup/public_tube_public_inputs.js +41 -0
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +5 -5
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.js +3 -3
- package/dest/rollup/{state_diff_hints.d.ts → tree_snapshot_diff_hints.d.ts} +22 -38
- package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -0
- package/dest/rollup/tree_snapshot_diff_hints.js +75 -0
- package/dest/rollup/tx_rollup_public_inputs.d.ts +4 -4
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.js +7 -7
- package/dest/tests/factories.d.ts +6 -4
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +26 -28
- package/dest/tx/tx_effect.d.ts +3 -33
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +58 -191
- package/package.json +9 -8
- package/src/abi/event_metadata_definition.ts +8 -0
- package/src/abi/index.ts +1 -0
- package/src/avm/avm_accumulated_data.ts +10 -0
- package/src/avm/index.ts +0 -1
- package/src/block/body.ts +1 -7
- package/src/contract/contract_class_metadata.ts +8 -0
- package/src/contract/contract_metadata.ts +7 -0
- package/src/contract/index.ts +2 -0
- package/src/file-store/factory.ts +15 -0
- package/src/file-store/s3.ts +186 -0
- package/src/interfaces/client.ts +0 -1
- package/src/interfaces/proving-job.ts +4 -4
- package/src/interfaces/server_circuit_prover.ts +2 -7
- package/src/interfaces/slasher.ts +2 -0
- package/src/interfaces/validator.ts +5 -1
- package/src/logs/contract_class_log.ts +2 -3
- package/src/rollup/avm_proof_data.ts +2 -31
- package/src/rollup/base_rollup_hints.ts +20 -28
- package/src/rollup/block_root_rollup_private_inputs.ts +14 -14
- package/src/rollup/index.ts +2 -1
- package/src/rollup/public_tube_private_inputs.ts +10 -3
- package/src/rollup/public_tube_public_inputs.ts +52 -0
- package/src/rollup/public_tx_base_rollup_private_inputs.ts +6 -5
- package/src/rollup/{state_diff_hints.ts → tree_snapshot_diff_hints.ts} +26 -41
- package/src/rollup/tx_rollup_public_inputs.ts +4 -4
- package/src/tests/factories.ts +31 -43
- package/src/tx/tx_effect.ts +59 -204
- package/dest/avm/public_data_hint.d.ts +0 -16
- package/dest/avm/public_data_hint.d.ts.map +0 -1
- package/dest/avm/public_data_hint.js +0 -27
- package/dest/interfaces/pxe.d.ts +0 -235
- package/dest/interfaces/pxe.d.ts.map +0 -1
- package/dest/interfaces/pxe.js +0 -13
- package/dest/rollup/state_diff_hints.d.ts.map +0 -1
- package/dest/rollup/state_diff_hints.js +0 -85
- package/src/avm/public_data_hint.ts +0 -38
- package/src/interfaces/pxe.ts +0 -284
package/src/tx/tx_effect.ts
CHANGED
|
@@ -1,24 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { decodeTxStartMarker, encodeTxStartMarker, isValidTxStartMarker } from '@aztec/blob-lib/encoding';
|
|
2
2
|
import {
|
|
3
|
-
CONTRACT_CLASS_LOGS_PREFIX,
|
|
4
|
-
L2_L1_MSGS_PREFIX,
|
|
5
3
|
MAX_CONTRACT_CLASS_LOGS_PER_TX,
|
|
6
4
|
MAX_L2_TO_L1_MSGS_PER_TX,
|
|
7
5
|
MAX_NOTE_HASHES_PER_TX,
|
|
8
6
|
MAX_NULLIFIERS_PER_TX,
|
|
9
7
|
MAX_PRIVATE_LOGS_PER_TX,
|
|
10
8
|
MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX,
|
|
11
|
-
NOTES_PREFIX,
|
|
12
|
-
NULLIFIERS_PREFIX,
|
|
13
|
-
PRIVATE_LOGS_PREFIX,
|
|
14
|
-
PUBLIC_DATA_UPDATE_REQUESTS_PREFIX,
|
|
15
|
-
PUBLIC_LOGS_PREFIX,
|
|
16
|
-
REVERT_CODE_PREFIX,
|
|
17
|
-
TX_FEE_PREFIX,
|
|
18
|
-
TX_START_PREFIX,
|
|
19
9
|
} from '@aztec/constants';
|
|
20
10
|
import { type FieldsOf, makeTuple, makeTupleAsync } from '@aztec/foundation/array';
|
|
21
|
-
import { toBufferBE } from '@aztec/foundation/bigint-buffer';
|
|
22
11
|
import { Fr } from '@aztec/foundation/fields';
|
|
23
12
|
import { type ZodFor, schemas } from '@aztec/foundation/schemas';
|
|
24
13
|
import {
|
|
@@ -248,224 +237,90 @@ export class TxEffect {
|
|
|
248
237
|
return new TxEffect(RevertCode.OK, TxHash.zero(), Fr.ZERO, [], [], [], [], [], [], []);
|
|
249
238
|
}
|
|
250
239
|
|
|
251
|
-
isEmpty(): boolean {
|
|
252
|
-
return this.nullifiers.length === 0;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
240
|
/** Returns a hex representation of the TxEffect object. */
|
|
256
241
|
toString() {
|
|
257
242
|
return bufferToHex(this.toBuffer());
|
|
258
243
|
}
|
|
259
244
|
|
|
260
245
|
/**
|
|
261
|
-
* Returns
|
|
262
|
-
*
|
|
263
|
-
*/
|
|
264
|
-
private toPrefix(type: number, length: number): Fr {
|
|
265
|
-
const buf = Buffer.alloc(4);
|
|
266
|
-
buf.writeUint8(type);
|
|
267
|
-
buf.writeUInt16BE(length, 2);
|
|
268
|
-
return new Fr(buf);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Decodes the prefix as used in a blob to tx effect type and length.
|
|
273
|
-
*/
|
|
274
|
-
static fromPrefix(prefix: Fr) {
|
|
275
|
-
const buf = prefix.toBuffer().subarray(-4);
|
|
276
|
-
return { type: buf[0], length: new Fr(buf.subarray(-2)).toNumber() };
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Encodes the first field of a tx effect as used in a blob:
|
|
281
|
-
* TX_START_PREFIX | 0 | txlen[0] txlen[1] | 0 | REVERT_CODE_PREFIX | 0 | revert_code
|
|
282
|
-
*/
|
|
283
|
-
private encodeFirstField(length: number, revertCode: RevertCode) {
|
|
284
|
-
const lengthBuf = Buffer.alloc(2);
|
|
285
|
-
lengthBuf.writeUInt16BE(length, 0);
|
|
286
|
-
return new Fr(
|
|
287
|
-
Buffer.concat([
|
|
288
|
-
toBufferBE(TX_START_PREFIX, TX_START_PREFIX_BYTES_LENGTH),
|
|
289
|
-
Buffer.alloc(1),
|
|
290
|
-
lengthBuf,
|
|
291
|
-
Buffer.alloc(1),
|
|
292
|
-
Buffer.from([REVERT_CODE_PREFIX]),
|
|
293
|
-
Buffer.alloc(1),
|
|
294
|
-
revertCode.toBuffer(),
|
|
295
|
-
]),
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Decodes the first field of a tx effect as used in a blob:
|
|
301
|
-
* TX_START_PREFIX | 0 | txlen[0] txlen[1] | 0 | REVERT_CODE_PREFIX | 0 | revert_code
|
|
302
|
-
* Assumes that isFirstField has been called already.
|
|
303
|
-
*/
|
|
304
|
-
static decodeFirstField(field: Fr) {
|
|
305
|
-
const buf = field.toBuffer().subarray(-TX_EFFECT_PREFIX_BYTE_LENGTH);
|
|
306
|
-
return {
|
|
307
|
-
length: new Fr(buf.subarray(TX_START_PREFIX_BYTES_LENGTH + 1, TX_START_PREFIX_BYTES_LENGTH + 3)).toNumber(),
|
|
308
|
-
revertCode: buf[buf.length - 1],
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Determines whether a field is the first field of a tx effect
|
|
314
|
-
*/
|
|
315
|
-
static isFirstField(field: Fr) {
|
|
316
|
-
const buf = field.toBuffer();
|
|
317
|
-
if (
|
|
318
|
-
!buf
|
|
319
|
-
.subarray(0, field.size - TX_EFFECT_PREFIX_BYTE_LENGTH)
|
|
320
|
-
.equals(Buffer.alloc(field.size - TX_EFFECT_PREFIX_BYTE_LENGTH))
|
|
321
|
-
) {
|
|
322
|
-
return false;
|
|
323
|
-
}
|
|
324
|
-
const sliced = buf.subarray(-TX_EFFECT_PREFIX_BYTE_LENGTH);
|
|
325
|
-
if (
|
|
326
|
-
// Checking we start with the correct prefix...
|
|
327
|
-
!new Fr(sliced.subarray(0, TX_START_PREFIX_BYTES_LENGTH)).equals(new Fr(TX_START_PREFIX)) ||
|
|
328
|
-
// ...and include the revert code prefix..
|
|
329
|
-
sliced[sliced.length - 3] !== REVERT_CODE_PREFIX ||
|
|
330
|
-
// ...and the following revert code is valid.
|
|
331
|
-
sliced[sliced.length - 1] > 4
|
|
332
|
-
) {
|
|
333
|
-
return false;
|
|
334
|
-
}
|
|
335
|
-
return true;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* Returns a flat packed array of prefixed fields of all tx effects, used for blobs.
|
|
246
|
+
* Returns a flat packed array of fields of all tx effects, to be appended to blobs.
|
|
247
|
+
* Must match the implementation in noir-protocol-circuits/crates/rollup-lib/src/tx_base/components/tx_blob_data.nr
|
|
340
248
|
*/
|
|
341
249
|
toBlobFields(): Fr[] {
|
|
342
|
-
if (this.isEmpty()) {
|
|
343
|
-
return [];
|
|
344
|
-
}
|
|
345
250
|
const flattened: Fr[] = [];
|
|
346
|
-
|
|
251
|
+
|
|
252
|
+
// We reassign the first field at the end when we know the length of all effects to create the tx start marker.
|
|
347
253
|
flattened.push(Fr.ZERO);
|
|
348
254
|
|
|
349
255
|
flattened.push(this.txHash.hash);
|
|
350
|
-
|
|
351
|
-
flattened.push(
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
);
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
flattened.
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
372
|
-
if (this.privateLogs.length) {
|
|
373
|
-
flattened.push(this.toPrefix(PRIVATE_LOGS_PREFIX, this.privateLogs.length));
|
|
374
|
-
flattened.push(...this.privateLogs.flatMap(l => l.toBlobFields()));
|
|
375
|
-
}
|
|
376
|
-
if (this.publicLogs.length) {
|
|
377
|
-
const flattenedPublicLogs = FlatPublicLogs.fromLogs(this.publicLogs);
|
|
378
|
-
flattened.push(this.toPrefix(PUBLIC_LOGS_PREFIX, flattenedPublicLogs.length));
|
|
379
|
-
flattened.push(...flattenedPublicLogs.toBlobFields());
|
|
380
|
-
}
|
|
381
|
-
if (this.contractClassLogs.length) {
|
|
382
|
-
flattened.push(this.toPrefix(CONTRACT_CLASS_LOGS_PREFIX, this.contractClassLogs.length));
|
|
383
|
-
flattened.push(...this.contractClassLogs.flatMap(l => l.toBlobFields()));
|
|
384
|
-
}
|
|
256
|
+
flattened.push(this.transactionFee);
|
|
257
|
+
flattened.push(...this.noteHashes);
|
|
258
|
+
flattened.push(...this.nullifiers);
|
|
259
|
+
flattened.push(...this.l2ToL1Msgs);
|
|
260
|
+
flattened.push(...this.publicDataWrites.flatMap(w => w.toBlobFields()));
|
|
261
|
+
flattened.push(...this.privateLogs.flatMap(l => l.toBlobFields()));
|
|
262
|
+
const flattenedPublicLogs = FlatPublicLogs.fromLogs(this.publicLogs);
|
|
263
|
+
flattened.push(...flattenedPublicLogs.toBlobFields());
|
|
264
|
+
flattened.push(...this.contractClassLogs.flatMap(l => l.toBlobFields()));
|
|
265
|
+
|
|
266
|
+
flattened[0] = encodeTxStartMarker({
|
|
267
|
+
revertCode: this.revertCode.getCode(),
|
|
268
|
+
numBlobFields: flattened.length,
|
|
269
|
+
numNoteHashes: this.noteHashes.length,
|
|
270
|
+
numNullifiers: this.nullifiers.length,
|
|
271
|
+
numL2ToL1Msgs: this.l2ToL1Msgs.length,
|
|
272
|
+
numPublicDataWrites: this.publicDataWrites.length,
|
|
273
|
+
numPrivateLogs: this.privateLogs.length,
|
|
274
|
+
publicLogsLength: flattenedPublicLogs.length,
|
|
275
|
+
contractClassLogLength: this.contractClassLogs[0]?.emittedLength ?? 0,
|
|
276
|
+
});
|
|
385
277
|
|
|
386
|
-
// The first value appended to each list of fields representing a tx effect is:
|
|
387
|
-
// TX_START_PREFIX | 0 | txlen[0] txlen[1] | 0 | REVERT_CODE_PREFIX | 0 | revert_code
|
|
388
|
-
// Tx start and len are to aid decomposing/ identifying when we reach a new tx effect
|
|
389
|
-
// The remaining bytes are used for revert code, since that only requires 3 bytes
|
|
390
|
-
flattened[0] = this.encodeFirstField(flattened.length, this.revertCode);
|
|
391
278
|
return flattened;
|
|
392
279
|
}
|
|
393
280
|
|
|
394
281
|
/**
|
|
395
|
-
* Decodes a flat packed array of
|
|
282
|
+
* Decodes a flat packed array of fields to TxEffect.
|
|
396
283
|
*/
|
|
397
284
|
static fromBlobFields(fields: Fr[] | FieldReader) {
|
|
398
|
-
const ensureEmpty = <T>(arr: Array<T>) => {
|
|
399
|
-
if (arr.length) {
|
|
400
|
-
throw new Error('Invalid fields given to TxEffect.fromBlobFields(): Attempted to assign property twice.');
|
|
401
|
-
}
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
const effect = this.empty();
|
|
405
285
|
const reader = FieldReader.asReader(fields);
|
|
406
286
|
const totalFields = reader.remainingFields();
|
|
407
287
|
if (!totalFields) {
|
|
408
|
-
|
|
288
|
+
throw new Error('Cannot process empty blob fields.');
|
|
409
289
|
}
|
|
410
290
|
|
|
411
|
-
const
|
|
412
|
-
if (!
|
|
413
|
-
throw new Error('Invalid fields given to TxEffect.fromBlobFields():
|
|
291
|
+
const txStartMarker = decodeTxStartMarker(reader.readField());
|
|
292
|
+
if (!isValidTxStartMarker(txStartMarker)) {
|
|
293
|
+
throw new Error('Invalid fields given to TxEffect.fromBlobFields(): invalid TxStartMarker');
|
|
414
294
|
}
|
|
415
295
|
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
const
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
effect.publicDataWrites = Array.from({ length }, () => PublicDataWrite.fromBlobFields(reader));
|
|
445
|
-
break;
|
|
446
|
-
}
|
|
447
|
-
case PRIVATE_LOGS_PREFIX: {
|
|
448
|
-
ensureEmpty(effect.privateLogs);
|
|
449
|
-
effect.privateLogs = Array.from({ length }, () => PrivateLog.fromBlobFields(reader));
|
|
450
|
-
break;
|
|
451
|
-
}
|
|
452
|
-
case PUBLIC_LOGS_PREFIX: {
|
|
453
|
-
ensureEmpty(effect.publicLogs);
|
|
454
|
-
effect.publicLogs = FlatPublicLogs.fromBlobFields(length, reader).toLogs();
|
|
455
|
-
break;
|
|
456
|
-
}
|
|
457
|
-
case CONTRACT_CLASS_LOGS_PREFIX: {
|
|
458
|
-
ensureEmpty(effect.contractClassLogs);
|
|
459
|
-
effect.contractClassLogs = Array.from({ length }, () => ContractClassLog.fromBlobFields(reader));
|
|
460
|
-
break;
|
|
461
|
-
}
|
|
462
|
-
case REVERT_CODE_PREFIX:
|
|
463
|
-
default:
|
|
464
|
-
throw new Error(`Too many fields to decode given to TxEffect.fromBlobFields()`);
|
|
465
|
-
}
|
|
466
|
-
fieldsProcessed = totalFields - reader.remainingFields();
|
|
467
|
-
}
|
|
468
|
-
return effect;
|
|
296
|
+
const revertCode = RevertCode.fromField(new Fr(txStartMarker.revertCode));
|
|
297
|
+
const txHash = new TxHash(reader.readField());
|
|
298
|
+
const transactionFee = reader.readField();
|
|
299
|
+
const noteHashes = reader.readFieldArray(txStartMarker.numNoteHashes);
|
|
300
|
+
const nullifiers = reader.readFieldArray(txStartMarker.numNullifiers);
|
|
301
|
+
const l2ToL1Msgs = reader.readFieldArray(txStartMarker.numL2ToL1Msgs);
|
|
302
|
+
const publicDataWrites = Array.from({ length: txStartMarker.numPublicDataWrites }, () =>
|
|
303
|
+
PublicDataWrite.fromBlobFields(reader),
|
|
304
|
+
);
|
|
305
|
+
const privateLogs = Array.from({ length: txStartMarker.numPrivateLogs }, () => PrivateLog.fromBlobFields(reader));
|
|
306
|
+
const publicLogs = FlatPublicLogs.fromBlobFields(txStartMarker.publicLogsLength, reader).toLogs();
|
|
307
|
+
const contractClassLogs =
|
|
308
|
+
txStartMarker.contractClassLogLength > 0
|
|
309
|
+
? [ContractClassLog.fromBlobFields(txStartMarker.contractClassLogLength, reader)]
|
|
310
|
+
: [];
|
|
311
|
+
|
|
312
|
+
return TxEffect.from({
|
|
313
|
+
revertCode,
|
|
314
|
+
txHash,
|
|
315
|
+
transactionFee,
|
|
316
|
+
noteHashes,
|
|
317
|
+
nullifiers,
|
|
318
|
+
l2ToL1Msgs,
|
|
319
|
+
publicDataWrites,
|
|
320
|
+
privateLogs,
|
|
321
|
+
publicLogs,
|
|
322
|
+
contractClassLogs,
|
|
323
|
+
});
|
|
469
324
|
}
|
|
470
325
|
|
|
471
326
|
static from(fields: FieldsOf<TxEffect>) {
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PUBLIC_DATA_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
-
import { BufferReader } from '@aztec/foundation/serialize';
|
|
4
|
-
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
5
|
-
import { PublicDataTreeLeafPreimage } from '../trees/index.js';
|
|
6
|
-
export declare class PublicDataHint {
|
|
7
|
-
leafSlot: Fr;
|
|
8
|
-
value: Fr;
|
|
9
|
-
membershipWitness: MembershipWitness<typeof PUBLIC_DATA_TREE_HEIGHT>;
|
|
10
|
-
leafPreimage: PublicDataTreeLeafPreimage;
|
|
11
|
-
constructor(leafSlot: Fr, value: Fr, membershipWitness: MembershipWitness<typeof PUBLIC_DATA_TREE_HEIGHT>, leafPreimage: PublicDataTreeLeafPreimage);
|
|
12
|
-
static empty(): PublicDataHint;
|
|
13
|
-
static fromBuffer(buffer: Buffer | BufferReader): PublicDataHint;
|
|
14
|
-
toBuffer(): Buffer<ArrayBufferLike>;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=public_data_hint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public_data_hint.d.ts","sourceRoot":"","sources":["../../src/avm/public_data_hint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAE/D,qBAAa,cAAc;IAEhB,QAAQ,EAAE,EAAE;IACZ,KAAK,EAAE,EAAE;IACT,iBAAiB,EAAE,iBAAiB,CAAC,OAAO,uBAAuB,CAAC;IACpE,YAAY,EAAE,0BAA0B;gBAHxC,QAAQ,EAAE,EAAE,EACZ,KAAK,EAAE,EAAE,EACT,iBAAiB,EAAE,iBAAiB,CAAC,OAAO,uBAAuB,CAAC,EACpE,YAAY,EAAE,0BAA0B;IAGjD,MAAM,CAAC,KAAK;IASZ,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAU/C,QAAQ;CAGT"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { PUBLIC_DATA_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
-
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
|
-
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
5
|
-
import { PublicDataTreeLeafPreimage } from '../trees/index.js';
|
|
6
|
-
export class PublicDataHint {
|
|
7
|
-
leafSlot;
|
|
8
|
-
value;
|
|
9
|
-
membershipWitness;
|
|
10
|
-
leafPreimage;
|
|
11
|
-
constructor(leafSlot, value, membershipWitness, leafPreimage){
|
|
12
|
-
this.leafSlot = leafSlot;
|
|
13
|
-
this.value = value;
|
|
14
|
-
this.membershipWitness = membershipWitness;
|
|
15
|
-
this.leafPreimage = leafPreimage;
|
|
16
|
-
}
|
|
17
|
-
static empty() {
|
|
18
|
-
return new PublicDataHint(Fr.ZERO, Fr.ZERO, MembershipWitness.empty(PUBLIC_DATA_TREE_HEIGHT), PublicDataTreeLeafPreimage.empty());
|
|
19
|
-
}
|
|
20
|
-
static fromBuffer(buffer) {
|
|
21
|
-
const reader = BufferReader.asReader(buffer);
|
|
22
|
-
return new PublicDataHint(reader.readObject(Fr), reader.readObject(Fr), MembershipWitness.fromBuffer(reader, PUBLIC_DATA_TREE_HEIGHT), reader.readObject(PublicDataTreeLeafPreimage));
|
|
23
|
-
}
|
|
24
|
-
toBuffer() {
|
|
25
|
-
return serializeToBuffer(this.leafSlot, this.value, this.membershipWitness, this.leafPreimage);
|
|
26
|
-
}
|
|
27
|
-
}
|
package/dest/interfaces/pxe.d.ts
DELETED
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import type { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { type AbiType, type ContractArtifact } from '../abi/abi.js';
|
|
4
|
-
import type { EventSelector } from '../abi/event_selector.js';
|
|
5
|
-
import { AuthWitness } from '../auth_witness/auth_witness.js';
|
|
6
|
-
import type { AztecAddress } from '../aztec-address/index.js';
|
|
7
|
-
import { CompleteAddress, type ContractClassWithId, type ContractInstanceWithAddress, type PartialAddress, type ProtocolContractAddresses } from '../contract/index.js';
|
|
8
|
-
import { UniqueNote } from '../note/extended_note.js';
|
|
9
|
-
import type { NotesFilter } from '../note/notes_filter.js';
|
|
10
|
-
import { SimulationOverrides, TxExecutionRequest, TxSimulationResult } from '../tx/index.js';
|
|
11
|
-
import { TxProfileResult, UtilitySimulationResult } from '../tx/profiling.js';
|
|
12
|
-
import { TxProvingResult } from '../tx/proven_tx.js';
|
|
13
|
-
/**
|
|
14
|
-
* Private eXecution Environment (PXE) runs locally for each user, providing functionality for all the operations
|
|
15
|
-
* needed to interact with the Aztec network, including account management, private data management,
|
|
16
|
-
* transaction local simulation, and access to an Aztec node. This interface, as part of a Wallet,
|
|
17
|
-
* is exposed to dapps for interacting with the network on behalf of the user.
|
|
18
|
-
*/
|
|
19
|
-
export interface PXE {
|
|
20
|
-
/**
|
|
21
|
-
* Registers a user account in PXE given its master encryption private key.
|
|
22
|
-
* Once a new account is registered, the PXE Service will trial-decrypt all published notes on
|
|
23
|
-
* the chain and store those that correspond to the registered account. Will do nothing if the
|
|
24
|
-
* account is already registered.
|
|
25
|
-
*
|
|
26
|
-
* @param secretKey - Secret key of the corresponding user master public key.
|
|
27
|
-
* @param partialAddress - The partial address of the account contract corresponding to the account being registered.
|
|
28
|
-
* @returns The complete address of the account.
|
|
29
|
-
*/
|
|
30
|
-
registerAccount(secretKey: Fr, partialAddress: PartialAddress): Promise<CompleteAddress>;
|
|
31
|
-
/**
|
|
32
|
-
* Retrieves the user accounts registered on this PXE Service.
|
|
33
|
-
* @returns An array of the accounts registered on this PXE Service.
|
|
34
|
-
*/
|
|
35
|
-
getRegisteredAccounts(): Promise<CompleteAddress[]>;
|
|
36
|
-
/**
|
|
37
|
-
* Registers a user contact in PXE.
|
|
38
|
-
*
|
|
39
|
-
* Once a new contact is registered, the PXE Service will be able to receive notes tagged from this contact.
|
|
40
|
-
* Will do nothing if the account is already registered.
|
|
41
|
-
*
|
|
42
|
-
* @param address - Address of the user to add to the address book
|
|
43
|
-
* @returns The address address of the account.
|
|
44
|
-
*/
|
|
45
|
-
registerSender(address: AztecAddress): Promise<AztecAddress>;
|
|
46
|
-
/**
|
|
47
|
-
* Retrieves the addresses stored as senders on this PXE Service.
|
|
48
|
-
* @returns An array of the senders on this PXE Service.
|
|
49
|
-
*/
|
|
50
|
-
getSenders(): Promise<AztecAddress[]>;
|
|
51
|
-
/**
|
|
52
|
-
* Removes a sender in the address book.
|
|
53
|
-
*/
|
|
54
|
-
removeSender(address: AztecAddress): Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* Registers a contract class in the PXE without registering any associated contract instance with it.
|
|
57
|
-
*
|
|
58
|
-
* @param artifact - The build artifact for the contract class.
|
|
59
|
-
*/
|
|
60
|
-
registerContractClass(artifact: ContractArtifact): Promise<void>;
|
|
61
|
-
/**
|
|
62
|
-
* Adds deployed contracts to the PXE Service. Deployed contract information is used to access the
|
|
63
|
-
* contract code when simulating local transactions. This is automatically called by aztec.js when
|
|
64
|
-
* deploying a contract. Dapps that wish to interact with contracts already deployed should register
|
|
65
|
-
* these contracts in their users' PXE Service through this method.
|
|
66
|
-
*
|
|
67
|
-
* @param contract - A contract instance to register, with an optional artifact which can be omitted if the contract class has already been registered.
|
|
68
|
-
*/
|
|
69
|
-
registerContract(contract: {
|
|
70
|
-
instance: ContractInstanceWithAddress;
|
|
71
|
-
artifact?: ContractArtifact;
|
|
72
|
-
}): Promise<void>;
|
|
73
|
-
/**
|
|
74
|
-
* Updates a deployed contract in the PXE Service. This is used to update the contract artifact when
|
|
75
|
-
* an update has happened, so the new code can be used in the simulation of local transactions.
|
|
76
|
-
* This is called by aztec.js when instantiating a contract in a given address with a mismatching artifact.
|
|
77
|
-
* @param contractAddress - The address of the contract to update.
|
|
78
|
-
* @param artifact - The updated artifact for the contract.
|
|
79
|
-
* @throws If the artifact's contract class is not found in the PXE or if the contract class is different from
|
|
80
|
-
* the current one (current one from the point of view of the node to which the PXE is connected).
|
|
81
|
-
*/
|
|
82
|
-
updateContract(contractAddress: AztecAddress, artifact: ContractArtifact): Promise<void>;
|
|
83
|
-
/**
|
|
84
|
-
* Retrieves the addresses of contracts added to this PXE Service.
|
|
85
|
-
* @returns An array of contracts addresses registered on this PXE Service.
|
|
86
|
-
*/
|
|
87
|
-
getContracts(): Promise<AztecAddress[]>;
|
|
88
|
-
/**
|
|
89
|
-
* Proves the private portion of a simulated transaction, ready to send to the network
|
|
90
|
-
* (where validators prove the public portion).
|
|
91
|
-
*
|
|
92
|
-
* @param txRequest - An authenticated tx request ready for proving
|
|
93
|
-
* @returns A result containing the proof and public inputs of the tail circuit.
|
|
94
|
-
* @throws If contract code not found, or public simulation reverts.
|
|
95
|
-
* Also throws if simulatePublic is true and public simulation reverts.
|
|
96
|
-
*/
|
|
97
|
-
proveTx(txRequest: TxExecutionRequest): Promise<TxProvingResult>;
|
|
98
|
-
/**
|
|
99
|
-
* Simulates a transaction based on the provided preauthenticated execution request.
|
|
100
|
-
* This will run a local simulation of private execution (and optionally of public as well), run the
|
|
101
|
-
* kernel circuits to ensure adherence to protocol rules (without generating a proof), and return the
|
|
102
|
-
* simulation results .
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* Note that this is used with `ContractFunctionInteraction::simulateTx` to bypass certain checks.
|
|
106
|
-
* In that case, the transaction returned is only potentially ready to be sent to the network for execution.
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* @param txRequest - An authenticated tx request ready for simulation
|
|
110
|
-
* @param simulatePublic - Whether to simulate the public part of the transaction.
|
|
111
|
-
* @param skipTxValidation - (Optional) If false, this function throws if the transaction is unable to be included in a block at the current state.
|
|
112
|
-
* @param skipFeeEnforcement - (Optional) If false, fees are enforced.
|
|
113
|
-
* @param overrides - (Optional) State overrides for the simulation, such as msgSender, contract instances and artifacts.
|
|
114
|
-
* @param scopes - (Optional) The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
115
|
-
* @returns A simulated transaction result object that includes public and private return values.
|
|
116
|
-
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
117
|
-
* Also throws if simulatePublic is true and public simulation reverts.
|
|
118
|
-
*/
|
|
119
|
-
simulateTx(txRequest: TxExecutionRequest, simulatePublic: boolean, skipTxValidation?: boolean, skipFeeEnforcement?: boolean, overrides?: SimulationOverrides, scopes?: AztecAddress[]): Promise<TxSimulationResult>;
|
|
120
|
-
/**
|
|
121
|
-
* Profiles a transaction, reporting gate counts (unless disabled) and returns an execution trace.
|
|
122
|
-
*
|
|
123
|
-
* @param txRequest - An authenticated tx request ready for simulation
|
|
124
|
-
* @param msgSender - (Optional) The message sender to use for the simulation.
|
|
125
|
-
* @param skipTxValidation - (Optional) If false, this function throws if the transaction is unable to be included in a block at the current state.
|
|
126
|
-
* @returns A trace of the program execution with gate counts.
|
|
127
|
-
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
128
|
-
*/
|
|
129
|
-
profileTx(txRequest: TxExecutionRequest, profileMode: 'gates' | 'execution-steps' | 'full', skipProofGeneration?: boolean, msgSender?: AztecAddress): Promise<TxProfileResult>;
|
|
130
|
-
/**
|
|
131
|
-
* Gets notes registered in this PXE based on the provided filter.
|
|
132
|
-
* @param filter - The filter to apply to the notes.
|
|
133
|
-
* @returns The requested notes.
|
|
134
|
-
*/
|
|
135
|
-
getNotes(filter: NotesFilter): Promise<UniqueNote[]>;
|
|
136
|
-
/**
|
|
137
|
-
* Simulate the execution of a contract utility function.
|
|
138
|
-
*
|
|
139
|
-
* @param functionName - The name of the utility contract function to be called.
|
|
140
|
-
* @param args - The arguments to be provided to the function.
|
|
141
|
-
* @param to - The address of the contract to be called.
|
|
142
|
-
* @param authwits - (Optional) The authentication witnesses required for the function call.
|
|
143
|
-
* @param from - (Optional) The msg sender to set for the call.
|
|
144
|
-
* @param scopes - (Optional) The accounts whose notes we can access in this call. Currently optional and will
|
|
145
|
-
* default to all.
|
|
146
|
-
* @returns The result of the utility function call, structured based on the function ABI.
|
|
147
|
-
*/
|
|
148
|
-
simulateUtility(functionName: string, args: any[], to: AztecAddress, authwits?: AuthWitness[], from?: AztecAddress, scopes?: AztecAddress[]): Promise<UtilitySimulationResult>;
|
|
149
|
-
/**
|
|
150
|
-
* Returns information about this PXE.
|
|
151
|
-
*/
|
|
152
|
-
getPXEInfo(): Promise<PXEInfo>;
|
|
153
|
-
/**
|
|
154
|
-
* Returns the contract metadata given an address.
|
|
155
|
-
* The metadata consists of its contract instance, which includes the contract class identifier,
|
|
156
|
-
* initialization hash, deployment salt, and public keys hash; whether the contract instance has been initialized;
|
|
157
|
-
* and whether the contract instance with the given address has been publicly deployed.
|
|
158
|
-
* @remark - it queries the node to check whether the contract instance has been initialized / publicly deployed through a node.
|
|
159
|
-
* This query is not dependent on the PXE.
|
|
160
|
-
* @param address - The address that the contract instance resides at.
|
|
161
|
-
* @returns - It returns the contract metadata
|
|
162
|
-
* TODO(@spalladino): Should we return the public keys in plain as well here?
|
|
163
|
-
*/
|
|
164
|
-
getContractMetadata(address: AztecAddress): Promise<ContractMetadata>;
|
|
165
|
-
/**
|
|
166
|
-
* Returns the contract class metadata given a contract class id.
|
|
167
|
-
* The metadata consists of its contract class, whether it has been publicly registered, and its artifact.
|
|
168
|
-
* @remark - it queries the node to check whether the contract class with the given id has been publicly registered.
|
|
169
|
-
* @param id - Identifier of the class.
|
|
170
|
-
* @param includeArtifact - Identifier of the class.
|
|
171
|
-
* @returns - It returns the contract class metadata, with the artifact field being optional, and will only be returned if true is passed in
|
|
172
|
-
* for `includeArtifact`
|
|
173
|
-
* TODO(@spalladino): The PXE actually holds artifacts and not classes, what should we return? Also,
|
|
174
|
-
* should the pxe query the node for contract public info, and merge it with its own definitions?
|
|
175
|
-
* TODO(@spalladino): This method is strictly needed to decide whether to publicly register a class or not
|
|
176
|
-
* during a public deployment. We probably want a nicer and more general API for this, but it'll have to
|
|
177
|
-
* do for the time being.
|
|
178
|
-
*/
|
|
179
|
-
getContractClassMetadata(id: Fr, includeArtifact?: boolean): Promise<ContractClassMetadata>;
|
|
180
|
-
/**
|
|
181
|
-
* Returns the private events given search parameters.
|
|
182
|
-
* @param contractAddress - The address of the contract to get events from.
|
|
183
|
-
* @param eventMetadata - Metadata of the event. This should be the class generated from the contract. e.g. Contract.events.Event
|
|
184
|
-
* @param from - The block number to search from.
|
|
185
|
-
* @param numBlocks - The amount of blocks to search.
|
|
186
|
-
* @param recipients - The addresses that decrypted the logs.
|
|
187
|
-
* @returns - The deserialized events.
|
|
188
|
-
*/
|
|
189
|
-
getPrivateEvents<T>(contractAddress: AztecAddress, eventMetadata: EventMetadataDefinition, from: number, numBlocks: number, recipients: AztecAddress[]): Promise<T[]>;
|
|
190
|
-
/**
|
|
191
|
-
* Stops the PXE's job queue.
|
|
192
|
-
*/
|
|
193
|
-
stop(): Promise<void>;
|
|
194
|
-
}
|
|
195
|
-
export type EventMetadataDefinition = {
|
|
196
|
-
eventSelector: EventSelector;
|
|
197
|
-
abiType: AbiType;
|
|
198
|
-
fieldNames: string[];
|
|
199
|
-
};
|
|
200
|
-
export declare const EventMetadataDefinitionSchema: z.ZodObject<{
|
|
201
|
-
eventSelector: z.ZodType<EventSelector, any, string>;
|
|
202
|
-
abiType: z.ZodType<AbiType, z.ZodTypeDef, AbiType>;
|
|
203
|
-
fieldNames: z.ZodArray<z.ZodString, "many">;
|
|
204
|
-
}, "strip", z.ZodTypeAny, {
|
|
205
|
-
eventSelector: EventSelector;
|
|
206
|
-
abiType: AbiType;
|
|
207
|
-
fieldNames: string[];
|
|
208
|
-
}, {
|
|
209
|
-
eventSelector: string;
|
|
210
|
-
abiType: AbiType;
|
|
211
|
-
fieldNames: string[];
|
|
212
|
-
}>;
|
|
213
|
-
/** This is used in getting events via the filter */
|
|
214
|
-
export declare enum EventType {
|
|
215
|
-
Encrypted = "Encrypted",
|
|
216
|
-
Unencrypted = "Unencrypted"
|
|
217
|
-
}
|
|
218
|
-
/** Provides basic information about the running PXE. */
|
|
219
|
-
export interface PXEInfo {
|
|
220
|
-
/** Version as tracked in the aztec-packages repository. */
|
|
221
|
-
pxeVersion: string;
|
|
222
|
-
/** Protocol contract addresses */
|
|
223
|
-
protocolContractAddresses: ProtocolContractAddresses;
|
|
224
|
-
}
|
|
225
|
-
export interface ContractMetadata {
|
|
226
|
-
contractInstance?: ContractInstanceWithAddress | undefined;
|
|
227
|
-
isContractInitialized: boolean;
|
|
228
|
-
isContractPublished: boolean;
|
|
229
|
-
}
|
|
230
|
-
export interface ContractClassMetadata {
|
|
231
|
-
contractClass?: ContractClassWithId | undefined;
|
|
232
|
-
isContractClassPubliclyRegistered: boolean;
|
|
233
|
-
artifact?: ContractArtifact | undefined;
|
|
234
|
-
}
|
|
235
|
-
//# sourceMappingURL=pxe.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":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MAAM,WAAW,gBAAgB;IAC/B,gBAAgB,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;IAC3D,qBAAqB,EAAE,OAAO,CAAC;IAC/B,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAChD,iCAAiC,EAAE,OAAO,CAAC;IAC3C,QAAQ,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CACzC"}
|
package/dest/interfaces/pxe.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { AbiTypeSchema } from '../abi/abi.js';
|
|
3
|
-
import { schemas } from '../schemas/schemas.js';
|
|
4
|
-
export const EventMetadataDefinitionSchema = z.object({
|
|
5
|
-
eventSelector: schemas.EventSelector,
|
|
6
|
-
abiType: AbiTypeSchema,
|
|
7
|
-
fieldNames: z.array(z.string())
|
|
8
|
-
});
|
|
9
|
-
/** This is used in getting events via the filter */ export var EventType = /*#__PURE__*/ function(EventType) {
|
|
10
|
-
EventType["Encrypted"] = "Encrypted";
|
|
11
|
-
EventType["Unencrypted"] = "Unencrypted";
|
|
12
|
-
return EventType;
|
|
13
|
-
}({});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"state_diff_hints.d.ts","sourceRoot":"","sources":["../../src/rollup/state_diff_hints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,qCAAqC,EACrC,qCAAqC,EACrC,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,KAAK,KAAK,EAAqB,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,M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