@aztec/stdlib 0.87.3-nightly.20250529 → 0.87.4
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/abi.d.ts +0 -3
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +0 -38
- package/dest/avm/avm.d.ts +12 -696
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +8 -16
- package/dest/avm/avm_accumulated_data.d.ts +0 -77
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +0 -67
- package/dest/avm/avm_circuit_public_inputs.d.ts +3 -73
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.js +9 -19
- package/dest/avm/avm_proving_request.d.ts +0 -366
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/block/body.d.ts +1 -1
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +2 -2
- package/dest/block/index.d.ts +0 -1
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +0 -1
- package/dest/block/l2_block.d.ts +2 -3
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +5 -10
- package/dest/block/l2_block_source.d.ts +4 -9
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +0 -1
- package/dest/block/published_l2_block.d.ts +69 -99
- package/dest/block/published_l2_block.d.ts.map +1 -1
- package/dest/block/published_l2_block.js +12 -38
- package/dest/block/test/l2_tips_store_test_suite.js +1 -1
- package/dest/interfaces/archiver.js +2 -2
- package/dest/interfaces/aztec-node.js +2 -2
- package/dest/interfaces/p2p.d.ts +2 -5
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +2 -1
- package/dest/interfaces/proving-job.d.ts +4 -370
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +2 -2
- package/dest/interfaces/server_circuit_prover.d.ts +2 -3
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +1 -1
- package/dest/kernel/hints/key_validation_hint.d.ts +6 -2
- package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_hint.js +7 -5
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +7 -7
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.js +4 -8
- package/dest/kernel/hints/read_request_hints.d.ts +8 -8
- package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
- package/dest/kernel/index.d.ts +0 -1
- package/dest/kernel/index.d.ts.map +1 -1
- package/dest/kernel/index.js +0 -1
- package/dest/kernel/private_kernel_data.d.ts +25 -6
- package/dest/kernel/private_kernel_data.d.ts.map +1 -1
- package/dest/kernel/private_kernel_data.js +19 -8
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +4 -7
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.js +6 -10
- package/dest/kernel/private_kernel_reset_dimensions.d.ts +10 -10
- package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_dimensions.js +29 -29
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +1 -10
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +3 -8
- package/dest/kernel/public_call_request.d.ts +0 -54
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/public_call_request.js +0 -58
- package/dest/logs/contract_class_log.d.ts +4 -0
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +33 -0
- package/dest/logs/log_with_tx_data.d.ts +3 -3
- package/dest/logs/log_with_tx_data.d.ts.map +1 -1
- package/dest/logs/log_with_tx_data.js +13 -9
- package/dest/logs/private_log.d.ts +0 -1
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/private_log.js +0 -3
- package/dest/logs/public_log.d.ts +0 -1
- package/dest/logs/public_log.d.ts.map +1 -1
- package/dest/logs/public_log.js +0 -3
- package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
- package/dest/logs/tx_scoped_l2_log.js +0 -1
- package/dest/rollup/avm_proof_data.d.ts +5 -7
- package/dest/rollup/avm_proof_data.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.js +4 -12
- package/dest/rollup/base_rollup_hints.d.ts +4 -4
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +8 -8
- package/dest/rollup/previous_rollup_block_data.d.ts +15 -6
- package/dest/rollup/previous_rollup_block_data.d.ts.map +1 -1
- package/dest/rollup/previous_rollup_block_data.js +13 -8
- package/dest/rollup/previous_rollup_data.d.ts +15 -6
- package/dest/rollup/previous_rollup_data.d.ts.map +1 -1
- package/dest/rollup/previous_rollup_data.js +13 -8
- package/dest/rollup/private_tube_data.d.ts +3 -3
- package/dest/rollup/private_tube_data.d.ts.map +1 -1
- package/dest/rollup/private_tube_data.js +3 -3
- package/dest/rollup/public_tube_data.d.ts +3 -3
- package/dest/rollup/public_tube_data.d.ts.map +1 -1
- package/dest/rollup/public_tube_data.js +3 -3
- package/dest/rollup/root_rollup.d.ts +10 -9
- package/dest/rollup/root_rollup.d.ts.map +1 -1
- package/dest/rollup/root_rollup.js +20 -9
- package/dest/tests/factories.d.ts +1 -2
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +19 -25
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +3 -4
- package/dest/tx/processed_tx.d.ts.map +1 -1
- package/dest/tx/processed_tx.js +5 -2
- package/dest/tx/tx.d.ts +25 -10
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +50 -25
- package/dest/tx/tx_effect.d.ts +1 -1
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +2 -2
- package/dest/validators/types.d.ts +0 -4
- package/dest/validators/types.d.ts.map +1 -1
- package/dest/vks/index.d.ts +1 -1
- package/dest/vks/index.d.ts.map +1 -1
- package/dest/vks/index.js +1 -1
- package/dest/vks/{vk_data.d.ts → vk_witness_data.d.ts} +8 -8
- package/dest/vks/vk_witness_data.d.ts.map +1 -0
- package/dest/vks/{vk_data.js → vk_witness_data.js} +10 -10
- package/package.json +7 -7
- package/src/abi/abi.ts +0 -37
- package/src/avm/avm.ts +0 -14
- package/src/avm/avm_accumulated_data.ts +0 -93
- package/src/avm/avm_circuit_public_inputs.ts +2 -22
- package/src/block/body.ts +2 -7
- package/src/block/index.ts +0 -1
- package/src/block/l2_block.ts +3 -8
- package/src/block/l2_block_source.ts +3 -9
- package/src/block/published_l2_block.ts +24 -38
- package/src/block/test/l2_tips_store_test_suite.ts +1 -1
- package/src/interfaces/archiver.ts +2 -2
- package/src/interfaces/aztec-node.ts +2 -2
- package/src/interfaces/p2p.ts +3 -8
- package/src/interfaces/proving-job.ts +3 -3
- package/src/interfaces/server_circuit_prover.ts +2 -3
- package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +3 -3
- package/src/kernel/hints/key_validation_hint.ts +6 -4
- package/src/kernel/hints/private_kernel_reset_hints.ts +43 -34
- package/src/kernel/hints/read_request_hints.ts +15 -27
- package/src/kernel/index.ts +0 -1
- package/src/kernel/private_kernel_data.ts +29 -7
- package/src/kernel/private_kernel_reset_circuit_private_inputs.ts +13 -16
- package/src/kernel/private_kernel_reset_dimensions.ts +27 -27
- package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -10
- package/src/kernel/public_call_request.ts +0 -66
- package/src/logs/contract_class_log.ts +36 -0
- package/src/logs/log_with_tx_data.ts +11 -7
- package/src/logs/private_log.ts +0 -4
- package/src/logs/public_log.ts +0 -4
- package/src/logs/tx_scoped_l2_log.ts +0 -1
- package/src/rollup/avm_proof_data.ts +7 -14
- package/src/rollup/base_rollup_hints.ts +4 -4
- package/src/rollup/previous_rollup_block_data.ts +12 -6
- package/src/rollup/previous_rollup_data.ts +12 -6
- package/src/rollup/private_tube_data.ts +4 -4
- package/src/rollup/public_tube_data.ts +4 -4
- package/src/rollup/root_rollup.ts +19 -6
- package/src/tests/factories.ts +32 -36
- package/src/tests/mocks.ts +3 -6
- package/src/tx/processed_tx.ts +5 -4
- package/src/tx/tx.ts +54 -28
- package/src/tx/tx_effect.ts +5 -23
- package/src/validators/types.ts +0 -2
- package/src/vks/index.ts +1 -1
- package/src/vks/{vk_data.ts → vk_witness_data.ts} +6 -6
- package/dest/block/proposal/committee_attestation.d.ts +0 -34
- package/dest/block/proposal/committee_attestation.d.ts.map +0 -1
- package/dest/block/proposal/committee_attestation.js +0 -59
- package/dest/block/proposal/index.d.ts +0 -2
- package/dest/block/proposal/index.d.ts.map +0 -1
- package/dest/block/proposal/index.js +0 -1
- package/dest/kernel/padded_side_effects.d.ts +0 -26
- package/dest/kernel/padded_side_effects.d.ts.map +0 -1
- package/dest/kernel/padded_side_effects.js +0 -51
- package/dest/vks/vk_data.d.ts.map +0 -1
- package/src/block/proposal/committee_attestation.ts +0 -70
- package/src/block/proposal/index.ts +0 -1
- package/src/kernel/padded_side_effects.ts +0 -73
|
@@ -4,28 +4,28 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
4
4
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
5
|
import { bufferToHex } from '@aztec/foundation/string';
|
|
6
6
|
import { VerificationKeyData } from './verification_key.js';
|
|
7
|
-
export class
|
|
7
|
+
export class VkWitnessData {
|
|
8
8
|
vk;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
vkIndex;
|
|
10
|
+
vkPath;
|
|
11
11
|
constructor(vk, /**
|
|
12
12
|
* Index of the vk in the vk tree.
|
|
13
|
-
*/
|
|
13
|
+
*/ vkIndex, /**
|
|
14
14
|
* Sibling path of the vk in the vk tree.
|
|
15
|
-
*/
|
|
15
|
+
*/ vkPath){
|
|
16
16
|
this.vk = vk;
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
17
|
+
this.vkIndex = vkIndex;
|
|
18
|
+
this.vkPath = vkPath;
|
|
19
19
|
}
|
|
20
20
|
static empty() {
|
|
21
|
-
return new
|
|
21
|
+
return new VkWitnessData(VerificationKeyData.empty(), 0, makeTuple(VK_TREE_HEIGHT, Fr.zero));
|
|
22
22
|
}
|
|
23
23
|
static fromBuffer(buffer) {
|
|
24
24
|
const reader = BufferReader.asReader(buffer);
|
|
25
|
-
return new
|
|
25
|
+
return new VkWitnessData(reader.readObject(VerificationKeyData), reader.readNumber(), reader.readArray(VK_TREE_HEIGHT, Fr));
|
|
26
26
|
}
|
|
27
27
|
toBuffer() {
|
|
28
|
-
return serializeToBuffer(this.vk, this.
|
|
28
|
+
return serializeToBuffer(this.vk, this.vkIndex, this.vkPath);
|
|
29
29
|
}
|
|
30
30
|
toString() {
|
|
31
31
|
return bufferToHex(this.toBuffer());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "0.87.
|
|
3
|
+
"version": "0.87.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@aztec/bb.js": "0.87.
|
|
71
|
-
"@aztec/blob-lib": "0.87.
|
|
72
|
-
"@aztec/constants": "0.87.
|
|
73
|
-
"@aztec/ethereum": "0.87.
|
|
74
|
-
"@aztec/foundation": "0.87.
|
|
75
|
-
"@aztec/noir-noirc_abi": "0.87.
|
|
70
|
+
"@aztec/bb.js": "0.87.4",
|
|
71
|
+
"@aztec/blob-lib": "0.87.4",
|
|
72
|
+
"@aztec/constants": "0.87.4",
|
|
73
|
+
"@aztec/ethereum": "0.87.4",
|
|
74
|
+
"@aztec/foundation": "0.87.4",
|
|
75
|
+
"@aztec/noir-noirc_abi": "0.87.4",
|
|
76
76
|
"@google-cloud/storage": "^7.15.0",
|
|
77
77
|
"axios": "^1.9.0",
|
|
78
78
|
"json-stringify-deterministic": "1.0.12",
|
package/src/abi/abi.ts
CHANGED
|
@@ -533,40 +533,3 @@ export function getInitializer(
|
|
|
533
533
|
return initializerNameOrArtifact;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
|
|
537
|
-
export function emptyFunctionAbi(): FunctionAbi {
|
|
538
|
-
return {
|
|
539
|
-
name: '',
|
|
540
|
-
functionType: FunctionType.PRIVATE,
|
|
541
|
-
isInternal: false,
|
|
542
|
-
isStatic: false,
|
|
543
|
-
parameters: [],
|
|
544
|
-
returnTypes: [],
|
|
545
|
-
errorTypes: {},
|
|
546
|
-
isInitializer: false,
|
|
547
|
-
};
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
export function emptyFunctionArtifact(): FunctionArtifact {
|
|
551
|
-
const abi = emptyFunctionAbi();
|
|
552
|
-
return {
|
|
553
|
-
...abi,
|
|
554
|
-
bytecode: Buffer.from([]),
|
|
555
|
-
debugSymbols: '',
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
export function emptyContractArtifact(): ContractArtifact {
|
|
560
|
-
return {
|
|
561
|
-
name: '',
|
|
562
|
-
functions: [emptyFunctionArtifact()],
|
|
563
|
-
nonDispatchPublicFunctions: [emptyFunctionAbi()],
|
|
564
|
-
outputs: {
|
|
565
|
-
structs: {},
|
|
566
|
-
globals: {},
|
|
567
|
-
},
|
|
568
|
-
storageLayout: {},
|
|
569
|
-
fileMap: {},
|
|
570
|
-
notes: {},
|
|
571
|
-
};
|
|
572
|
-
}
|
package/src/avm/avm.ts
CHANGED
|
@@ -5,8 +5,6 @@ import { schemas } from '@aztec/foundation/schemas';
|
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
7
7
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
8
|
-
import { Gas } from '../gas/gas.js';
|
|
9
|
-
import { GasSettings } from '../gas/gas_settings.js';
|
|
10
8
|
import { PublicKeys } from '../keys/public_keys.js';
|
|
11
9
|
import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
12
10
|
import { MerkleTreeId } from '../trees/merkle_tree_id.js';
|
|
@@ -408,7 +406,6 @@ export class AvmTxHint {
|
|
|
408
406
|
constructor(
|
|
409
407
|
public readonly hash: string,
|
|
410
408
|
public readonly globalVariables: GlobalVariables,
|
|
411
|
-
public readonly gasSettings: GasSettings,
|
|
412
409
|
public readonly nonRevertibleAccumulatedData: {
|
|
413
410
|
noteHashes: Fr[];
|
|
414
411
|
nullifiers: Fr[];
|
|
@@ -424,7 +421,6 @@ export class AvmTxHint {
|
|
|
424
421
|
// We need this to be null and not undefined because that's what
|
|
425
422
|
// MessagePack expects for an std::optional.
|
|
426
423
|
public readonly teardownEnqueuedCall: AvmEnqueuedCallHint | null,
|
|
427
|
-
public readonly gasUsedByPrivate: Gas,
|
|
428
424
|
) {}
|
|
429
425
|
|
|
430
426
|
static async fromTx(tx: Tx): Promise<AvmTxHint> {
|
|
@@ -438,7 +434,6 @@ export class AvmTxHint {
|
|
|
438
434
|
return new AvmTxHint(
|
|
439
435
|
txHash.hash.toString(),
|
|
440
436
|
tx.data.constants.historicalHeader.globalVariables,
|
|
441
|
-
tx.data.constants.txContext.gasSettings,
|
|
442
437
|
{
|
|
443
438
|
noteHashes: tx.data.forPublic!.nonRevertibleAccumulatedData.noteHashes.filter(x => !x.isZero()),
|
|
444
439
|
nullifiers: tx.data.forPublic!.nonRevertibleAccumulatedData.nullifiers.filter(x => !x.isZero()),
|
|
@@ -473,7 +468,6 @@ export class AvmTxHint {
|
|
|
473
468
|
teardownCallRequest.request.isStaticCall,
|
|
474
469
|
)
|
|
475
470
|
: null,
|
|
476
|
-
tx.data.gasUsed,
|
|
477
471
|
);
|
|
478
472
|
}
|
|
479
473
|
|
|
@@ -481,13 +475,11 @@ export class AvmTxHint {
|
|
|
481
475
|
return new AvmTxHint(
|
|
482
476
|
'',
|
|
483
477
|
GlobalVariables.empty(),
|
|
484
|
-
GasSettings.empty(),
|
|
485
478
|
{ noteHashes: [], nullifiers: [] },
|
|
486
479
|
{ noteHashes: [], nullifiers: [] },
|
|
487
480
|
[],
|
|
488
481
|
[],
|
|
489
482
|
null,
|
|
490
|
-
Gas.empty(),
|
|
491
483
|
);
|
|
492
484
|
}
|
|
493
485
|
|
|
@@ -496,7 +488,6 @@ export class AvmTxHint {
|
|
|
496
488
|
.object({
|
|
497
489
|
hash: z.string(),
|
|
498
490
|
globalVariables: GlobalVariables.schema,
|
|
499
|
-
gasSettings: GasSettings.schema,
|
|
500
491
|
nonRevertibleAccumulatedData: z.object({
|
|
501
492
|
noteHashes: schemas.Fr.array(),
|
|
502
493
|
nullifiers: schemas.Fr.array(),
|
|
@@ -508,30 +499,25 @@ export class AvmTxHint {
|
|
|
508
499
|
setupEnqueuedCalls: AvmEnqueuedCallHint.schema.array(),
|
|
509
500
|
appLogicEnqueuedCalls: AvmEnqueuedCallHint.schema.array(),
|
|
510
501
|
teardownEnqueuedCall: AvmEnqueuedCallHint.schema.nullable(),
|
|
511
|
-
gasUsedByPrivate: Gas.schema,
|
|
512
502
|
})
|
|
513
503
|
.transform(
|
|
514
504
|
({
|
|
515
505
|
hash,
|
|
516
506
|
globalVariables,
|
|
517
|
-
gasSettings,
|
|
518
507
|
nonRevertibleAccumulatedData,
|
|
519
508
|
revertibleAccumulatedData,
|
|
520
509
|
setupEnqueuedCalls,
|
|
521
510
|
appLogicEnqueuedCalls,
|
|
522
511
|
teardownEnqueuedCall,
|
|
523
|
-
gasUsedByPrivate,
|
|
524
512
|
}) =>
|
|
525
513
|
new AvmTxHint(
|
|
526
514
|
hash,
|
|
527
515
|
globalVariables,
|
|
528
|
-
gasSettings,
|
|
529
516
|
nonRevertibleAccumulatedData,
|
|
530
517
|
revertibleAccumulatedData,
|
|
531
518
|
setupEnqueuedCalls,
|
|
532
519
|
appLogicEnqueuedCalls,
|
|
533
520
|
teardownEnqueuedCall,
|
|
534
|
-
gasUsedByPrivate,
|
|
535
521
|
),
|
|
536
522
|
);
|
|
537
523
|
}
|
|
@@ -185,96 +185,3 @@ export class AvmAccumulatedData {
|
|
|
185
185
|
}`;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Represents the lengths of arrays in AVM accumulated data
|
|
191
|
-
*/
|
|
192
|
-
export class AvmAccumulatedDataArrayLengths {
|
|
193
|
-
constructor(
|
|
194
|
-
/**
|
|
195
|
-
* Number of note hashes
|
|
196
|
-
*/
|
|
197
|
-
public noteHashes: number,
|
|
198
|
-
/**
|
|
199
|
-
* Number of nullifiers
|
|
200
|
-
*/
|
|
201
|
-
public nullifiers: number,
|
|
202
|
-
/**
|
|
203
|
-
* Number of L2 to L1 messages
|
|
204
|
-
*/
|
|
205
|
-
public l2ToL1Msgs: number,
|
|
206
|
-
/**
|
|
207
|
-
* Number of public logs
|
|
208
|
-
*/
|
|
209
|
-
public publicLogs: number,
|
|
210
|
-
/**
|
|
211
|
-
* Number of public data writes
|
|
212
|
-
*/
|
|
213
|
-
public publicDataWrites: number,
|
|
214
|
-
) {}
|
|
215
|
-
|
|
216
|
-
static get schema() {
|
|
217
|
-
return z
|
|
218
|
-
.object({
|
|
219
|
-
noteHashes: z.number(),
|
|
220
|
-
nullifiers: z.number(),
|
|
221
|
-
l2ToL1Msgs: z.number(),
|
|
222
|
-
publicLogs: z.number(),
|
|
223
|
-
publicDataWrites: z.number(),
|
|
224
|
-
})
|
|
225
|
-
.transform(
|
|
226
|
-
({ noteHashes, nullifiers, l2ToL1Msgs, publicLogs, publicDataWrites }) =>
|
|
227
|
-
new AvmAccumulatedDataArrayLengths(noteHashes, nullifiers, l2ToL1Msgs, publicLogs, publicDataWrites),
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
232
|
-
const reader = BufferReader.asReader(buffer);
|
|
233
|
-
return new AvmAccumulatedDataArrayLengths(
|
|
234
|
-
reader.readNumber(),
|
|
235
|
-
reader.readNumber(),
|
|
236
|
-
reader.readNumber(),
|
|
237
|
-
reader.readNumber(),
|
|
238
|
-
reader.readNumber(),
|
|
239
|
-
);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
toBuffer() {
|
|
243
|
-
return serializeToBuffer(this.noteHashes, this.nullifiers, this.l2ToL1Msgs, this.publicLogs, this.publicDataWrites);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
static fromFields(fields: Fr[] | FieldReader) {
|
|
247
|
-
const reader = FieldReader.asReader(fields);
|
|
248
|
-
return new AvmAccumulatedDataArrayLengths(
|
|
249
|
-
Number(reader.readField()),
|
|
250
|
-
Number(reader.readField()),
|
|
251
|
-
Number(reader.readField()),
|
|
252
|
-
Number(reader.readField()),
|
|
253
|
-
Number(reader.readField()),
|
|
254
|
-
);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
toFields(): Fr[] {
|
|
258
|
-
return [
|
|
259
|
-
new Fr(this.noteHashes),
|
|
260
|
-
new Fr(this.nullifiers),
|
|
261
|
-
new Fr(this.l2ToL1Msgs),
|
|
262
|
-
new Fr(this.publicLogs),
|
|
263
|
-
new Fr(this.publicDataWrites),
|
|
264
|
-
];
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
static empty() {
|
|
268
|
-
return new AvmAccumulatedDataArrayLengths(0, 0, 0, 0, 0);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
[inspect.custom]() {
|
|
272
|
-
return `AvmAccumulatedDataArrayLengths {
|
|
273
|
-
noteHashes: ${this.noteHashes},
|
|
274
|
-
nullifiers: ${this.nullifiers},
|
|
275
|
-
l2ToL1Msgs: ${this.l2ToL1Msgs},
|
|
276
|
-
publicLogs: ${this.publicLogs},
|
|
277
|
-
publicDataWrites: ${this.publicDataWrites},
|
|
278
|
-
}`;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
PrivateToAvmAccumulatedData,
|
|
15
15
|
PrivateToAvmAccumulatedDataArrayLengths,
|
|
16
16
|
} from '../kernel/private_to_avm_accumulated_data.js';
|
|
17
|
-
import { PublicCallRequest
|
|
17
|
+
import { PublicCallRequest } from '../kernel/public_call_request.js';
|
|
18
18
|
import { GlobalVariables } from '../tx/global_variables.js';
|
|
19
19
|
import { TreeSnapshots } from '../tx/tree_snapshots.js';
|
|
20
|
-
import { AvmAccumulatedData
|
|
20
|
+
import { AvmAccumulatedData } from './avm_accumulated_data.js';
|
|
21
21
|
import { serializeWithMessagePack } from './message_pack.js';
|
|
22
22
|
|
|
23
23
|
// Note: the {from,to}{Buffer,Fields,String} methods are needed by AvmProofData and PublicBaseRollupInputs.
|
|
@@ -31,7 +31,6 @@ export class AvmCircuitPublicInputs {
|
|
|
31
31
|
public startGasUsed: Gas,
|
|
32
32
|
public gasSettings: GasSettings,
|
|
33
33
|
public feePayer: AztecAddress,
|
|
34
|
-
public publicCallRequestArrayLengths: PublicCallRequestArrayLengths,
|
|
35
34
|
public publicSetupCallRequests: Tuple<PublicCallRequest, typeof MAX_ENQUEUED_CALLS_PER_TX>,
|
|
36
35
|
public publicAppLogicCallRequests: Tuple<PublicCallRequest, typeof MAX_ENQUEUED_CALLS_PER_TX>,
|
|
37
36
|
public publicTeardownCallRequest: PublicCallRequest,
|
|
@@ -43,7 +42,6 @@ export class AvmCircuitPublicInputs {
|
|
|
43
42
|
// Outputs.
|
|
44
43
|
public endTreeSnapshots: TreeSnapshots,
|
|
45
44
|
public endGasUsed: Gas,
|
|
46
|
-
public accumulatedDataArrayLengths: AvmAccumulatedDataArrayLengths,
|
|
47
45
|
public accumulatedData: AvmAccumulatedData,
|
|
48
46
|
public transactionFee: Fr,
|
|
49
47
|
public reverted: boolean,
|
|
@@ -57,7 +55,6 @@ export class AvmCircuitPublicInputs {
|
|
|
57
55
|
startGasUsed: Gas.schema,
|
|
58
56
|
gasSettings: GasSettings.schema,
|
|
59
57
|
feePayer: AztecAddress.schema,
|
|
60
|
-
publicCallRequestArrayLengths: PublicCallRequestArrayLengths.schema,
|
|
61
58
|
publicSetupCallRequests: PublicCallRequest.schema.array().max(MAX_ENQUEUED_CALLS_PER_TX),
|
|
62
59
|
publicAppLogicCallRequests: PublicCallRequest.schema.array().max(MAX_ENQUEUED_CALLS_PER_TX),
|
|
63
60
|
publicTeardownCallRequest: PublicCallRequest.schema,
|
|
@@ -67,7 +64,6 @@ export class AvmCircuitPublicInputs {
|
|
|
67
64
|
previousRevertibleAccumulatedData: PrivateToAvmAccumulatedData.schema,
|
|
68
65
|
endTreeSnapshots: TreeSnapshots.schema,
|
|
69
66
|
endGasUsed: Gas.schema,
|
|
70
|
-
accumulatedDataArrayLengths: AvmAccumulatedDataArrayLengths.schema,
|
|
71
67
|
accumulatedData: AvmAccumulatedData.schema,
|
|
72
68
|
transactionFee: schemas.Fr,
|
|
73
69
|
reverted: z.boolean(),
|
|
@@ -79,7 +75,6 @@ export class AvmCircuitPublicInputs {
|
|
|
79
75
|
startGasUsed,
|
|
80
76
|
gasSettings,
|
|
81
77
|
feePayer,
|
|
82
|
-
publicCallRequestArrayLengths,
|
|
83
78
|
publicSetupCallRequests,
|
|
84
79
|
publicAppLogicCallRequests,
|
|
85
80
|
publicTeardownCallRequest,
|
|
@@ -89,7 +84,6 @@ export class AvmCircuitPublicInputs {
|
|
|
89
84
|
previousRevertibleAccumulatedData,
|
|
90
85
|
endTreeSnapshots,
|
|
91
86
|
endGasUsed,
|
|
92
|
-
accumulatedDataArrayLengths,
|
|
93
87
|
accumulatedData,
|
|
94
88
|
transactionFee,
|
|
95
89
|
reverted,
|
|
@@ -100,7 +94,6 @@ export class AvmCircuitPublicInputs {
|
|
|
100
94
|
startGasUsed,
|
|
101
95
|
gasSettings,
|
|
102
96
|
feePayer,
|
|
103
|
-
publicCallRequestArrayLengths,
|
|
104
97
|
assertLength(publicSetupCallRequests, MAX_ENQUEUED_CALLS_PER_TX),
|
|
105
98
|
assertLength(publicAppLogicCallRequests, MAX_ENQUEUED_CALLS_PER_TX),
|
|
106
99
|
publicTeardownCallRequest,
|
|
@@ -110,7 +103,6 @@ export class AvmCircuitPublicInputs {
|
|
|
110
103
|
previousRevertibleAccumulatedData,
|
|
111
104
|
endTreeSnapshots,
|
|
112
105
|
endGasUsed,
|
|
113
|
-
accumulatedDataArrayLengths,
|
|
114
106
|
accumulatedData,
|
|
115
107
|
transactionFee,
|
|
116
108
|
reverted,
|
|
@@ -126,7 +118,6 @@ export class AvmCircuitPublicInputs {
|
|
|
126
118
|
reader.readObject(Gas),
|
|
127
119
|
reader.readObject(GasSettings),
|
|
128
120
|
reader.readObject(AztecAddress),
|
|
129
|
-
reader.readObject(PublicCallRequestArrayLengths),
|
|
130
121
|
reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest),
|
|
131
122
|
reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest),
|
|
132
123
|
reader.readObject(PublicCallRequest),
|
|
@@ -136,7 +127,6 @@ export class AvmCircuitPublicInputs {
|
|
|
136
127
|
reader.readObject(PrivateToAvmAccumulatedData),
|
|
137
128
|
reader.readObject(TreeSnapshots),
|
|
138
129
|
reader.readObject(Gas),
|
|
139
|
-
reader.readObject(AvmAccumulatedDataArrayLengths),
|
|
140
130
|
reader.readObject(AvmAccumulatedData),
|
|
141
131
|
reader.readObject(Fr),
|
|
142
132
|
reader.readBoolean(),
|
|
@@ -150,7 +140,6 @@ export class AvmCircuitPublicInputs {
|
|
|
150
140
|
this.startGasUsed,
|
|
151
141
|
this.gasSettings,
|
|
152
142
|
this.feePayer,
|
|
153
|
-
this.publicCallRequestArrayLengths,
|
|
154
143
|
this.publicSetupCallRequests,
|
|
155
144
|
this.publicAppLogicCallRequests,
|
|
156
145
|
this.publicTeardownCallRequest,
|
|
@@ -160,7 +149,6 @@ export class AvmCircuitPublicInputs {
|
|
|
160
149
|
this.previousRevertibleAccumulatedData,
|
|
161
150
|
this.endTreeSnapshots,
|
|
162
151
|
this.endGasUsed,
|
|
163
|
-
this.accumulatedDataArrayLengths,
|
|
164
152
|
this.accumulatedData,
|
|
165
153
|
this.transactionFee,
|
|
166
154
|
this.reverted,
|
|
@@ -183,7 +171,6 @@ export class AvmCircuitPublicInputs {
|
|
|
183
171
|
Gas.fromFields(reader),
|
|
184
172
|
GasSettings.fromFields(reader),
|
|
185
173
|
AztecAddress.fromFields(reader),
|
|
186
|
-
PublicCallRequestArrayLengths.fromFields(reader),
|
|
187
174
|
reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest),
|
|
188
175
|
reader.readArray(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest),
|
|
189
176
|
PublicCallRequest.fromFields(reader),
|
|
@@ -193,7 +180,6 @@ export class AvmCircuitPublicInputs {
|
|
|
193
180
|
PrivateToAvmAccumulatedData.fromFields(reader),
|
|
194
181
|
TreeSnapshots.fromFields(reader),
|
|
195
182
|
Gas.fromFields(reader),
|
|
196
|
-
AvmAccumulatedDataArrayLengths.fromFields(reader),
|
|
197
183
|
AvmAccumulatedData.fromFields(reader),
|
|
198
184
|
reader.readField(),
|
|
199
185
|
reader.readBoolean(),
|
|
@@ -207,7 +193,6 @@ export class AvmCircuitPublicInputs {
|
|
|
207
193
|
...this.startGasUsed.toFields(),
|
|
208
194
|
...this.gasSettings.toFields(),
|
|
209
195
|
this.feePayer,
|
|
210
|
-
...this.publicCallRequestArrayLengths.toFields(),
|
|
211
196
|
...this.publicSetupCallRequests.map(request => request.toFields()),
|
|
212
197
|
...this.publicAppLogicCallRequests.map(request => request.toFields()),
|
|
213
198
|
...this.publicTeardownCallRequest.toFields(),
|
|
@@ -217,7 +202,6 @@ export class AvmCircuitPublicInputs {
|
|
|
217
202
|
...this.previousRevertibleAccumulatedData.toFields(),
|
|
218
203
|
...this.endTreeSnapshots.toFields(),
|
|
219
204
|
...this.endGasUsed.toFields(),
|
|
220
|
-
...this.accumulatedDataArrayLengths.toFields(),
|
|
221
205
|
...this.accumulatedData.toFields(),
|
|
222
206
|
this.transactionFee,
|
|
223
207
|
this.reverted,
|
|
@@ -231,7 +215,6 @@ export class AvmCircuitPublicInputs {
|
|
|
231
215
|
Gas.empty(),
|
|
232
216
|
GasSettings.empty(),
|
|
233
217
|
AztecAddress.zero(),
|
|
234
|
-
PublicCallRequestArrayLengths.empty(),
|
|
235
218
|
makeTuple(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest.empty),
|
|
236
219
|
makeTuple(MAX_ENQUEUED_CALLS_PER_TX, PublicCallRequest.empty),
|
|
237
220
|
PublicCallRequest.empty(),
|
|
@@ -241,7 +224,6 @@ export class AvmCircuitPublicInputs {
|
|
|
241
224
|
PrivateToAvmAccumulatedData.empty(),
|
|
242
225
|
TreeSnapshots.empty(),
|
|
243
226
|
Gas.empty(),
|
|
244
|
-
AvmAccumulatedDataArrayLengths.empty(),
|
|
245
227
|
AvmAccumulatedData.empty(),
|
|
246
228
|
Fr.zero(),
|
|
247
229
|
false,
|
|
@@ -259,7 +241,6 @@ export class AvmCircuitPublicInputs {
|
|
|
259
241
|
startGasUsed: ${inspect(this.startGasUsed)},
|
|
260
242
|
gasSettings: ${inspect(this.gasSettings)},
|
|
261
243
|
feePayer: ${inspect(this.feePayer)},
|
|
262
|
-
publicCallRequestArrayLengths: ${inspect(this.publicCallRequestArrayLengths)},
|
|
263
244
|
publicSetupCallRequests: [${this.publicSetupCallRequests
|
|
264
245
|
.filter(x => !x.isEmpty())
|
|
265
246
|
.map(h => inspect(h))
|
|
@@ -277,7 +258,6 @@ export class AvmCircuitPublicInputs {
|
|
|
277
258
|
previousRevertibleAccumulatedData: ${inspect(this.previousRevertibleAccumulatedData)},
|
|
278
259
|
endTreeSnapshots: ${inspect(this.endTreeSnapshots)},
|
|
279
260
|
endGasUsed: ${inspect(this.endGasUsed)},
|
|
280
|
-
accumulatedDataArrayLengths: ${inspect(this.accumulatedDataArrayLengths)},
|
|
281
261
|
accumulatedData: ${inspect(this.accumulatedData)},
|
|
282
262
|
transactionFee: ${inspect(this.transactionFee)},
|
|
283
263
|
reverted: ${this.reverted},
|
package/src/block/body.ts
CHANGED
|
@@ -87,14 +87,9 @@ export class Body {
|
|
|
87
87
|
}`;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
static async random(
|
|
91
|
-
txsPerBlock = 4,
|
|
92
|
-
numPublicCallsPerTx = 3,
|
|
93
|
-
numPublicLogsPerCall = 1,
|
|
94
|
-
maxEffects: number | undefined = undefined,
|
|
95
|
-
) {
|
|
90
|
+
static async random(txsPerBlock = 4, numPublicCallsPerTx = 3, numPublicLogsPerCall = 1) {
|
|
96
91
|
const txEffects = await timesParallel(txsPerBlock, () =>
|
|
97
|
-
TxEffect.random(numPublicCallsPerTx, numPublicLogsPerCall
|
|
92
|
+
TxEffect.random(numPublicCallsPerTx, numPublicLogsPerCall),
|
|
98
93
|
);
|
|
99
94
|
|
|
100
95
|
return new Body(txEffects);
|
package/src/block/index.ts
CHANGED
package/src/block/l2_block.ts
CHANGED
|
@@ -20,7 +20,6 @@ export class L2Block {
|
|
|
20
20
|
public header: BlockHeader,
|
|
21
21
|
/** L2 block body. */
|
|
22
22
|
public body: Body,
|
|
23
|
-
private blockHash: Fr | undefined = undefined,
|
|
24
23
|
) {}
|
|
25
24
|
|
|
26
25
|
static get schema() {
|
|
@@ -87,9 +86,8 @@ export class L2Block {
|
|
|
87
86
|
numPublicLogsPerCall = 1,
|
|
88
87
|
inHash: Buffer | undefined = undefined,
|
|
89
88
|
slotNumber: number | undefined = undefined,
|
|
90
|
-
maxEffects: number | undefined = undefined,
|
|
91
89
|
): Promise<L2Block> {
|
|
92
|
-
const body = await Body.random(txsPerBlock, numPublicCallsPerTx, numPublicLogsPerCall
|
|
90
|
+
const body = await Body.random(txsPerBlock, numPublicCallsPerTx, numPublicLogsPerCall);
|
|
93
91
|
|
|
94
92
|
return new L2Block(
|
|
95
93
|
makeAppendOnlyTreeSnapshot(l2BlockNum + 1),
|
|
@@ -114,11 +112,8 @@ export class L2Block {
|
|
|
114
112
|
* Returns the block's hash (hash of block header).
|
|
115
113
|
* @returns The block's hash.
|
|
116
114
|
*/
|
|
117
|
-
public
|
|
118
|
-
|
|
119
|
-
this.blockHash = await this.header.hash();
|
|
120
|
-
}
|
|
121
|
-
return this.blockHash;
|
|
115
|
+
public hash(): Promise<Fr> {
|
|
116
|
+
return this.header.hash();
|
|
122
117
|
}
|
|
123
118
|
|
|
124
119
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
-
import type { TypedEventEmitter } from '@aztec/foundation/types';
|
|
3
2
|
|
|
3
|
+
import type { EventEmitter } from 'events';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
6
|
import type { L1RollupConstants } from '../epoch-helpers/index.js';
|
|
@@ -127,12 +127,7 @@ export interface L2BlockSource {
|
|
|
127
127
|
* L2BlockSource that emits events upon pending / proven chain changes.
|
|
128
128
|
* see L2BlockSourceEvents for the events emitted.
|
|
129
129
|
*/
|
|
130
|
-
|
|
131
|
-
export type ArchiverEmitter = TypedEventEmitter<{
|
|
132
|
-
[L2BlockSourceEvents.L2PruneDetected]: (args: L2BlockSourceEvent) => void;
|
|
133
|
-
[L2BlockSourceEvents.L2BlockProven]: (args: L2BlockSourceEvent) => void;
|
|
134
|
-
}>;
|
|
135
|
-
export interface L2BlockSourceEventEmitter extends L2BlockSource, ArchiverEmitter {}
|
|
130
|
+
export interface L2BlockSourceEventEmitter extends L2BlockSource, EventEmitter {}
|
|
136
131
|
|
|
137
132
|
/**
|
|
138
133
|
* Identifier for L2 block tags.
|
|
@@ -176,11 +171,10 @@ export const L2TipsSchema = z.object({
|
|
|
176
171
|
|
|
177
172
|
export enum L2BlockSourceEvents {
|
|
178
173
|
L2PruneDetected = 'l2PruneDetected',
|
|
179
|
-
L2BlockProven = 'l2BlockProven',
|
|
180
174
|
}
|
|
181
175
|
|
|
182
176
|
export type L2BlockSourceEvent = {
|
|
183
|
-
type: 'l2PruneDetected'
|
|
177
|
+
type: 'l2PruneDetected';
|
|
184
178
|
blockNumber: bigint;
|
|
185
179
|
slotNumber: bigint;
|
|
186
180
|
epochNumber: bigint;
|
|
@@ -1,51 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
import { Signature } from '@aztec/foundation/eth-signature';
|
|
2
2
|
import { schemas } from '@aztec/foundation/schemas';
|
|
3
|
+
import { L2Block } from '@aztec/stdlib/block';
|
|
3
4
|
|
|
4
5
|
import { z } from 'zod';
|
|
5
6
|
|
|
6
7
|
import { BlockAttestation } from '../p2p/block_attestation.js';
|
|
7
8
|
import { ConsensusPayload } from '../p2p/consensus_payload.js';
|
|
8
|
-
import { L2Block } from './l2_block.js';
|
|
9
|
-
import { CommitteeAttestation } from './proposal/committee_attestation.js';
|
|
10
9
|
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
) {}
|
|
10
|
+
export type L1PublishedData = {
|
|
11
|
+
blockNumber: bigint;
|
|
12
|
+
timestamp: bigint;
|
|
13
|
+
blockHash: string;
|
|
14
|
+
};
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export class PublishedL2Block {
|
|
28
|
-
constructor(
|
|
29
|
-
public block: L2Block,
|
|
30
|
-
public l1: L1PublishedData,
|
|
31
|
-
public attestations: CommitteeAttestation[],
|
|
32
|
-
) {}
|
|
16
|
+
export type PublishedL2Block = {
|
|
17
|
+
block: L2Block;
|
|
18
|
+
l1: L1PublishedData;
|
|
19
|
+
signatures: Signature[];
|
|
20
|
+
};
|
|
33
21
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
22
|
+
export const PublishedL2BlockSchema = z.object({
|
|
23
|
+
block: L2Block.schema,
|
|
24
|
+
l1: z.object({
|
|
25
|
+
blockNumber: schemas.BigInt,
|
|
26
|
+
timestamp: schemas.BigInt,
|
|
27
|
+
blockHash: z.string(),
|
|
28
|
+
}),
|
|
29
|
+
signatures: z.array(Signature.schema),
|
|
30
|
+
});
|
|
42
31
|
|
|
43
32
|
export function getAttestationsFromPublishedL2Block(block: PublishedL2Block) {
|
|
44
33
|
const payload = ConsensusPayload.fromBlock(block.block);
|
|
45
|
-
return block.
|
|
46
|
-
.filter(
|
|
47
|
-
.map(
|
|
48
|
-
attestation =>
|
|
49
|
-
new BlockAttestation(block.block.header.globalVariables.blockNumber, payload, attestation.signature),
|
|
50
|
-
);
|
|
34
|
+
return block.signatures
|
|
35
|
+
.filter(sig => !sig.isEmpty)
|
|
36
|
+
.map(signature => new BlockAttestation(block.block.header.globalVariables.blockNumber, payload, signature));
|
|
51
37
|
}
|
|
@@ -17,7 +17,7 @@ export function testL2TipsStore(makeTipsStore: () => Promise<L2TipsStore>) {
|
|
|
17
17
|
const makeBlock = (number: number): PublishedL2Block => ({
|
|
18
18
|
block: { number, header: { hash: () => Promise.resolve(new Fr(number)) } as BlockHeader } as L2Block,
|
|
19
19
|
l1: { blockNumber: BigInt(number), blockHash: `0x${number}`, timestamp: BigInt(number) },
|
|
20
|
-
|
|
20
|
+
signatures: [],
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
const makeBlockId = (number: number): L2BlockId => ({
|
|
@@ -4,7 +4,7 @@ import { z } from 'zod';
|
|
|
4
4
|
|
|
5
5
|
import { L2Block } from '../block/l2_block.js';
|
|
6
6
|
import { type L2BlockSource, L2TipsSchema } from '../block/l2_block_source.js';
|
|
7
|
-
import {
|
|
7
|
+
import { PublishedL2BlockSchema } from '../block/published_l2_block.js';
|
|
8
8
|
import {
|
|
9
9
|
ContractClassPublicSchema,
|
|
10
10
|
type ContractDataSource,
|
|
@@ -45,7 +45,7 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
|
|
|
45
45
|
getPublishedBlocks: z
|
|
46
46
|
.function()
|
|
47
47
|
.args(schemas.Integer, schemas.Integer, optional(z.boolean()))
|
|
48
|
-
.returns(z.array(
|
|
48
|
+
.returns(z.array(PublishedL2BlockSchema)),
|
|
49
49
|
getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
|
|
50
50
|
getSettledTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema.optional()),
|
|
51
51
|
getL2SlotNumber: z.function().args().returns(schemas.BigInt),
|
|
@@ -17,7 +17,7 @@ import { type InBlock, inBlockSchemaFor } from '../block/in_block.js';
|
|
|
17
17
|
import { L2Block } from '../block/l2_block.js';
|
|
18
18
|
import { type L2BlockNumber, L2BlockNumberSchema } from '../block/l2_block_number.js';
|
|
19
19
|
import { type L2BlockSource, type L2Tips, L2TipsSchema } from '../block/l2_block_source.js';
|
|
20
|
-
import {
|
|
20
|
+
import { PublishedL2BlockSchema } from '../block/published_l2_block.js';
|
|
21
21
|
import {
|
|
22
22
|
type ContractClassPublic,
|
|
23
23
|
ContractClassPublicSchema,
|
|
@@ -484,7 +484,7 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
484
484
|
|
|
485
485
|
getBlocks: z.function().args(z.number(), z.number()).returns(z.array(L2Block.schema)),
|
|
486
486
|
|
|
487
|
-
getPublishedBlocks: z.function().args(z.number(), z.number()).returns(z.array(
|
|
487
|
+
getPublishedBlocks: z.function().args(z.number(), z.number()).returns(z.array(PublishedL2BlockSchema)),
|
|
488
488
|
|
|
489
489
|
getCurrentBaseFees: z.function().returns(GasFees.schema),
|
|
490
490
|
|