@aztec/stdlib 0.0.1-commit.6c91f13 → 0.0.1-commit.6d3c34e
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/contract_artifact.d.ts +2 -2
- package/dest/abi/contract_artifact.d.ts.map +1 -1
- package/dest/abi/contract_artifact.js +1 -1
- package/dest/abi/selector.js +3 -1
- package/dest/avm/avm_accumulated_data.js +5 -2
- package/dest/avm/avm_circuit_public_inputs.js +3 -1
- package/dest/avm/public_data_update_request.js +3 -1
- package/dest/avm/public_inner_call_request.js +3 -1
- package/dest/avm/revert_code.js +3 -1
- package/dest/aztec-address/index.js +4 -2
- package/dest/block/attestation_info.d.ts +5 -5
- package/dest/block/attestation_info.d.ts.map +1 -1
- package/dest/block/attestation_info.js +4 -4
- package/dest/block/body.js +3 -1
- package/dest/block/l2_block.d.ts +6 -3
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +6 -4
- package/dest/block/l2_block_code_to_purge.d.ts +2 -3
- package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
- package/dest/block/l2_block_code_to_purge.js +2 -8
- package/dest/block/l2_block_header.d.ts +8 -12
- package/dest/block/l2_block_header.d.ts.map +1 -1
- package/dest/block/l2_block_header.js +25 -18
- package/dest/block/l2_block_new.d.ts +1 -2
- package/dest/block/l2_block_new.d.ts.map +1 -1
- package/dest/block/l2_block_new.js +4 -1
- package/dest/block/l2_block_source.d.ts +245 -41
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +23 -5
- package/dest/block/l2_block_stream/index.d.ts +2 -1
- package/dest/block/l2_block_stream/index.d.ts.map +1 -1
- package/dest/block/l2_block_stream/index.js +1 -0
- package/dest/block/l2_block_stream/interfaces.d.ts +12 -5
- package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +4 -2
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +102 -30
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +24 -16
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_tips_memory_store.js +55 -61
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +49 -0
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -0
- package/dest/block/l2_block_stream/l2_tips_store_base.js +179 -0
- package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
- package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
- package/dest/block/test/l2_tips_store_test_suite.js +483 -38
- package/dest/block/validate_block_result.d.ts +24 -24
- package/dest/block/validate_block_result.d.ts.map +1 -1
- package/dest/block/validate_block_result.js +13 -13
- package/dest/checkpoint/checkpoint.d.ts +1 -1
- package/dest/checkpoint/checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint.js +1 -0
- package/dest/checkpoint/checkpoint_info.d.ts +32 -3
- package/dest/checkpoint/checkpoint_info.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint_info.js +34 -1
- package/dest/checkpoint/index.d.ts +2 -1
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +1 -0
- package/dest/database-version/version_manager.js +3 -1
- package/dest/gas/gas.js +3 -1
- package/dest/gas/gas_fees.js +3 -1
- package/dest/interfaces/api_limit.d.ts +2 -1
- package/dest/interfaces/api_limit.d.ts.map +1 -1
- package/dest/interfaces/api_limit.js +1 -0
- package/dest/interfaces/archiver.d.ts +6 -6
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +6 -4
- package/dest/interfaces/aztec-node-admin.d.ts +12 -6
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +2 -2
- package/dest/interfaces/aztec-node.d.ts +11 -10
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +10 -5
- package/dest/interfaces/configs.d.ts +6 -1
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +2 -1
- package/dest/interfaces/p2p.d.ts +7 -9
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +3 -4
- package/dest/interfaces/proving-job.d.ts +170 -170
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +1 -7
- package/dest/interfaces/server_circuit_prover.d.ts +4 -3
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +41 -7
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +3 -1
- package/dest/kernel/claimed_length_array.js +3 -1
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +6 -5
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_note_hash_read_request_hints.js +5 -6
- package/dest/kernel/hints/transient_data_squashing_hint.js +3 -1
- package/dest/kernel/log_hash.js +3 -1
- package/dest/kernel/private_log_data.js +5 -2
- package/dest/kernel/private_to_avm_accumulated_data.js +5 -2
- package/dest/kernel/private_to_public_accumulated_data.js +3 -1
- package/dest/kernel/private_to_rollup_accumulated_data.js +3 -1
- package/dest/kernel/private_validation_requests.js +3 -1
- package/dest/kernel/public_call_request.js +5 -2
- package/dest/logs/contract_class_log.js +3 -1
- package/dest/logs/private_log.js +3 -1
- package/dest/logs/public_log.js +3 -1
- package/dest/messaging/in_hash.d.ts +4 -2
- package/dest/messaging/in_hash.d.ts.map +1 -1
- package/dest/messaging/in_hash.js +3 -1
- package/dest/messaging/l2_to_l1_membership.d.ts +88 -6
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +158 -42
- package/dest/messaging/out_hash.d.ts +2 -1
- package/dest/messaging/out_hash.d.ts.map +1 -1
- package/dest/messaging/out_hash.js +13 -4
- package/dest/p2p/attestation_utils.d.ts +3 -3
- package/dest/p2p/attestation_utils.d.ts.map +1 -1
- package/dest/p2p/attestation_utils.js +1 -1
- package/dest/p2p/block_proposal.d.ts +85 -21
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +120 -37
- package/dest/p2p/checkpoint_attestation.d.ts +77 -0
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -0
- package/dest/p2p/{block_attestation.js → checkpoint_attestation.js} +22 -19
- package/dest/p2p/checkpoint_proposal.d.ts +154 -0
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -0
- package/dest/p2p/checkpoint_proposal.js +217 -0
- package/dest/p2p/consensus_payload.d.ts +6 -7
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +3 -2
- package/dest/p2p/gossipable.d.ts +4 -3
- package/dest/p2p/gossipable.d.ts.map +1 -1
- package/dest/p2p/gossipable.js +16 -5
- package/dest/p2p/index.d.ts +4 -2
- package/dest/p2p/index.d.ts.map +1 -1
- package/dest/p2p/index.js +3 -1
- package/dest/p2p/signature_utils.d.ts +5 -3
- package/dest/p2p/signature_utils.d.ts.map +1 -1
- package/dest/p2p/signature_utils.js +3 -1
- package/dest/p2p/signed_txs.d.ts +40 -0
- package/dest/p2p/signed_txs.d.ts.map +1 -0
- package/dest/p2p/signed_txs.js +70 -0
- package/dest/p2p/topic_type.d.ts +3 -2
- package/dest/p2p/topic_type.d.ts.map +1 -1
- package/dest/p2p/topic_type.js +8 -2
- package/dest/rollup/block_rollup_public_inputs.d.ts +4 -9
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.js +6 -10
- package/dest/rollup/checkpoint_constant_data.js +3 -1
- package/dest/rollup/checkpoint_header.d.ts +15 -12
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +33 -19
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +6 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.js +6 -2
- package/dest/rollup/root_rollup_public_inputs.d.ts +8 -3
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.js +6 -3
- package/dest/tests/factories.d.ts +15 -7
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +57 -13
- package/dest/tests/mocks.d.ts +59 -10
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +89 -41
- package/dest/trees/append_only_tree_snapshot.js +3 -1
- package/dest/tx/block_header.js +3 -1
- package/dest/tx/call_context.js +3 -1
- package/dest/tx/global_variable_builder.d.ts +2 -2
- package/dest/tx/global_variable_builder.d.ts.map +1 -1
- package/dest/tx/global_variables.js +3 -1
- package/dest/tx/index.d.ts +1 -2
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +0 -1
- package/dest/tx/private_execution_result.d.ts +1 -5
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +3 -20
- package/dest/tx/public_call_request_with_calldata.js +3 -1
- package/dest/tx/state_reference.js +3 -1
- package/dest/tx/tree_snapshots.js +3 -1
- package/dest/tx/tx.d.ts +1 -1
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +3 -1
- package/dest/tx/tx_effect.js +3 -1
- package/dest/tx/tx_execution_request.d.ts +1 -1
- package/dest/tx/tx_execution_request.d.ts.map +1 -1
- package/dest/tx/tx_execution_request.js +6 -2
- package/package.json +8 -8
- package/src/abi/contract_artifact.ts +10 -10
- package/src/block/attestation_info.ts +9 -6
- package/src/block/l2_block.ts +6 -5
- package/src/block/l2_block_code_to_purge.ts +3 -11
- package/src/block/l2_block_header.ts +26 -17
- package/src/block/l2_block_new.ts +5 -1
- package/src/block/l2_block_source.ts +66 -16
- package/src/block/l2_block_stream/index.ts +1 -0
- package/src/block/l2_block_stream/interfaces.ts +12 -4
- package/src/block/l2_block_stream/l2_block_stream.ts +121 -38
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +62 -56
- package/src/block/l2_block_stream/l2_tips_store_base.ts +226 -0
- package/src/block/test/l2_tips_store_test_suite.ts +485 -36
- package/src/block/validate_block_result.ts +35 -31
- package/src/checkpoint/checkpoint.ts +1 -0
- package/src/checkpoint/checkpoint_info.ts +45 -2
- package/src/checkpoint/index.ts +1 -0
- package/src/interfaces/api_limit.ts +1 -0
- package/src/interfaces/archiver.ts +14 -6
- package/src/interfaces/aztec-node-admin.ts +5 -2
- package/src/interfaces/aztec-node.ts +43 -13
- package/src/interfaces/configs.ts +5 -0
- package/src/interfaces/p2p.ts +8 -12
- package/src/interfaces/proving-job.ts +2 -11
- package/src/interfaces/server_circuit_prover.ts +3 -2
- package/src/interfaces/validator.ts +57 -7
- package/src/kernel/hints/build_note_hash_read_request_hints.ts +5 -8
- package/src/messaging/in_hash.ts +3 -1
- package/src/messaging/l2_to_l1_membership.ts +176 -52
- package/src/messaging/out_hash.ts +17 -7
- package/src/p2p/attestation_utils.ts +3 -3
- package/src/p2p/block_proposal.ts +185 -41
- package/src/p2p/{block_attestation.ts → checkpoint_attestation.ts} +31 -25
- package/src/p2p/checkpoint_proposal.ts +337 -0
- package/src/p2p/consensus_payload.ts +5 -2
- package/src/p2p/gossipable.ts +14 -4
- package/src/p2p/index.ts +3 -1
- package/src/p2p/signature_utils.ts +3 -1
- package/src/p2p/signed_txs.ts +83 -0
- package/src/p2p/topic_type.ts +3 -2
- package/src/rollup/block_rollup_public_inputs.ts +3 -9
- package/src/rollup/checkpoint_header.ts +43 -20
- package/src/rollup/checkpoint_rollup_public_inputs.ts +6 -0
- package/src/rollup/root_rollup_public_inputs.ts +6 -0
- package/src/tests/factories.ts +53 -17
- package/src/tests/mocks.ts +166 -64
- package/src/tx/global_variable_builder.ts +1 -1
- package/src/tx/index.ts +0 -1
- package/src/tx/private_execution_result.ts +0 -15
- package/src/tx/tx.ts +2 -0
- package/src/tx/tx_execution_request.ts +2 -0
- package/dest/p2p/block_attestation.d.ts +0 -80
- package/dest/p2p/block_attestation.d.ts.map +0 -1
- package/dest/tx/content_commitment.d.ts +0 -49
- package/dest/tx/content_commitment.d.ts.map +0 -1
- package/dest/tx/content_commitment.js +0 -90
- package/src/tx/content_commitment.ts +0 -113
|
@@ -5,57 +5,61 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
|
5
5
|
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
type CheckpointInfo,
|
|
10
|
+
CheckpointInfoSchema,
|
|
11
|
+
deserializeCheckpointInfo,
|
|
12
|
+
serializeCheckpointInfo,
|
|
13
|
+
} from '../checkpoint/checkpoint_info.js';
|
|
9
14
|
import { CommitteeAttestation } from './proposal/committee_attestation.js';
|
|
10
15
|
|
|
11
|
-
/** Subtype for invalid
|
|
12
|
-
export type
|
|
16
|
+
/** Subtype for invalid checkpoint validation results */
|
|
17
|
+
export type ValidateCheckpointNegativeResult =
|
|
13
18
|
| {
|
|
14
19
|
valid: false;
|
|
15
|
-
/** Identifiers from the invalid
|
|
16
|
-
|
|
17
|
-
/** Committee members at the epoch this
|
|
20
|
+
/** Identifiers from the invalid checkpoint */
|
|
21
|
+
checkpoint: CheckpointInfo;
|
|
22
|
+
/** Committee members at the epoch this checkpoint was proposed */
|
|
18
23
|
committee: EthAddress[];
|
|
19
|
-
/** Epoch in which this
|
|
24
|
+
/** Epoch in which this checkpoint was proposed */
|
|
20
25
|
epoch: EpochNumber;
|
|
21
26
|
/** Proposer selection seed for the epoch */
|
|
22
27
|
seed: bigint;
|
|
23
|
-
/** List of committee members who signed this
|
|
28
|
+
/** List of committee members who signed this checkpoint proposal */
|
|
24
29
|
attestors: EthAddress[];
|
|
25
|
-
/** Committee attestations for this
|
|
30
|
+
/** Committee attestations for this checkpoint as they were posted to L1 */
|
|
26
31
|
attestations: CommitteeAttestation[];
|
|
27
|
-
/** Reason for the
|
|
32
|
+
/** Reason for the checkpoint being invalid: not enough attestations were posted */
|
|
28
33
|
reason: 'insufficient-attestations';
|
|
29
34
|
}
|
|
30
35
|
| {
|
|
31
36
|
valid: false;
|
|
32
|
-
/** Identifiers from the invalid
|
|
33
|
-
|
|
34
|
-
/** Committee members at the epoch this
|
|
37
|
+
/** Identifiers from the invalid checkpoint */
|
|
38
|
+
checkpoint: CheckpointInfo;
|
|
39
|
+
/** Committee members at the epoch this checkpoint was proposed */
|
|
35
40
|
committee: EthAddress[];
|
|
36
|
-
/** Epoch in which this
|
|
41
|
+
/** Epoch in which this checkpoint was proposed */
|
|
37
42
|
epoch: EpochNumber;
|
|
38
43
|
/** Proposer selection seed for the epoch */
|
|
39
44
|
seed: bigint;
|
|
40
|
-
/** List of committee members who signed this
|
|
45
|
+
/** List of committee members who signed this checkpoint proposal */
|
|
41
46
|
attestors: EthAddress[];
|
|
42
|
-
/** Committee attestations for this
|
|
47
|
+
/** Committee attestations for this checkpoint as they were posted to L1 */
|
|
43
48
|
attestations: CommitteeAttestation[];
|
|
44
|
-
/** Reason for the
|
|
49
|
+
/** Reason for the checkpoint being invalid: an invalid attestation was posted */
|
|
45
50
|
reason: 'invalid-attestation';
|
|
46
51
|
/** Index in the attestations array of the invalid attestation posted */
|
|
47
52
|
invalidIndex: number;
|
|
48
53
|
};
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
export type ValidateBlockResult = { valid: true } | ValidateBlockNegativeResult;
|
|
55
|
+
/** Result type for validating checkpoint attestations */
|
|
56
|
+
export type ValidateCheckpointResult = { valid: true } | ValidateCheckpointNegativeResult;
|
|
53
57
|
|
|
54
|
-
export const
|
|
58
|
+
export const ValidateCheckpointResultSchema: ZodFor<ValidateCheckpointResult> = z.union([
|
|
55
59
|
z.object({ valid: z.literal(true) }),
|
|
56
60
|
z.object({
|
|
57
61
|
valid: z.literal(false),
|
|
58
|
-
|
|
62
|
+
checkpoint: CheckpointInfoSchema,
|
|
59
63
|
committee: z.array(schemas.EthAddress),
|
|
60
64
|
epoch: EpochNumberSchema,
|
|
61
65
|
seed: schemas.BigInt,
|
|
@@ -65,7 +69,7 @@ export const ValidateBlockResultSchema: ZodFor<ValidateBlockResult> = z.union([
|
|
|
65
69
|
}),
|
|
66
70
|
z.object({
|
|
67
71
|
valid: z.literal(false),
|
|
68
|
-
|
|
72
|
+
checkpoint: CheckpointInfoSchema,
|
|
69
73
|
committee: z.array(schemas.EthAddress),
|
|
70
74
|
epoch: EpochNumberSchema,
|
|
71
75
|
seed: schemas.BigInt,
|
|
@@ -76,17 +80,17 @@ export const ValidateBlockResultSchema: ZodFor<ValidateBlockResult> = z.union([
|
|
|
76
80
|
}),
|
|
77
81
|
]);
|
|
78
82
|
|
|
79
|
-
export function
|
|
83
|
+
export function serializeValidateCheckpointResult(result: ValidateCheckpointResult): Buffer {
|
|
80
84
|
if (result.valid) {
|
|
81
85
|
return serializeToBuffer(true);
|
|
82
86
|
}
|
|
83
87
|
|
|
84
|
-
const
|
|
88
|
+
const checkpointBuffer = serializeCheckpointInfo(result.checkpoint);
|
|
85
89
|
return serializeToBuffer(
|
|
86
90
|
result.valid,
|
|
87
91
|
result.reason,
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
checkpointBuffer.length,
|
|
93
|
+
checkpointBuffer,
|
|
90
94
|
result.committee.length,
|
|
91
95
|
result.committee,
|
|
92
96
|
result.epoch,
|
|
@@ -99,14 +103,14 @@ export function serializeValidateBlockResult(result: ValidateBlockResult): Buffe
|
|
|
99
103
|
);
|
|
100
104
|
}
|
|
101
105
|
|
|
102
|
-
export function
|
|
106
|
+
export function deserializeValidateCheckpointResult(bufferOrReader: Buffer | BufferReader): ValidateCheckpointResult {
|
|
103
107
|
const reader = BufferReader.asReader(bufferOrReader);
|
|
104
108
|
const valid = reader.readBoolean();
|
|
105
109
|
if (valid) {
|
|
106
110
|
return { valid };
|
|
107
111
|
}
|
|
108
112
|
const reason = reader.readString() as 'insufficient-attestations' | 'invalid-attestation';
|
|
109
|
-
const
|
|
113
|
+
const checkpoint = deserializeCheckpointInfo(reader.readBuffer());
|
|
110
114
|
const committee = reader.readVector(EthAddress);
|
|
111
115
|
const epoch = EpochNumber(reader.readNumber());
|
|
112
116
|
const seed = reader.readBigInt();
|
|
@@ -114,9 +118,9 @@ export function deserializeValidateBlockResult(bufferOrReader: Buffer | BufferRe
|
|
|
114
118
|
const attestations = reader.readVector(CommitteeAttestation);
|
|
115
119
|
const invalidIndex = reader.readNumber();
|
|
116
120
|
if (reason === 'insufficient-attestations') {
|
|
117
|
-
return { valid, reason,
|
|
121
|
+
return { valid, reason, checkpoint, committee, epoch, seed, attestors, attestations };
|
|
118
122
|
} else if (reason === 'invalid-attestation') {
|
|
119
|
-
return { valid, reason,
|
|
123
|
+
return { valid, reason, checkpoint, committee, epoch, seed, attestors, invalidIndex, attestations };
|
|
120
124
|
} else {
|
|
121
125
|
const _: never = reason;
|
|
122
126
|
throw new Error(`Unknown reason: ${reason}`);
|
|
@@ -73,6 +73,7 @@ export class Checkpoint {
|
|
|
73
73
|
public toCheckpointInfo(): CheckpointInfo {
|
|
74
74
|
return {
|
|
75
75
|
archive: this.archive.root,
|
|
76
|
+
lastArchive: this.header.lastArchiveRoot,
|
|
76
77
|
slotNumber: this.header.slotNumber,
|
|
77
78
|
checkpointNumber: this.number,
|
|
78
79
|
timestamp: this.header.timestamp,
|
|
@@ -1,9 +1,52 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
CheckpointNumber,
|
|
3
|
+
CheckpointNumberSchema,
|
|
4
|
+
SlotNumber,
|
|
5
|
+
SlotNumberSchema,
|
|
6
|
+
} from '@aztec/foundation/branded-types';
|
|
7
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
8
|
+
import { schemas } from '@aztec/foundation/schemas';
|
|
9
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
10
|
+
|
|
11
|
+
import { z } from 'zod';
|
|
3
12
|
|
|
4
13
|
export type CheckpointInfo = {
|
|
5
14
|
archive: Fr;
|
|
15
|
+
lastArchive: Fr;
|
|
6
16
|
slotNumber: SlotNumber;
|
|
7
17
|
checkpointNumber: CheckpointNumber;
|
|
8
18
|
timestamp: bigint;
|
|
9
19
|
};
|
|
20
|
+
|
|
21
|
+
export function randomCheckpointInfo(checkpointNumber?: CheckpointNumber | number): CheckpointInfo {
|
|
22
|
+
return {
|
|
23
|
+
archive: Fr.random(),
|
|
24
|
+
lastArchive: Fr.random(),
|
|
25
|
+
slotNumber: SlotNumber(Math.floor(Math.random() * 100000) + 1),
|
|
26
|
+
checkpointNumber: CheckpointNumber(checkpointNumber ?? Math.floor(Math.random() * 100000) + 1),
|
|
27
|
+
timestamp: BigInt(Math.floor(Date.now() / 1000)),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const CheckpointInfoSchema = z.object({
|
|
32
|
+
archive: schemas.Fr,
|
|
33
|
+
lastArchive: schemas.Fr,
|
|
34
|
+
slotNumber: SlotNumberSchema,
|
|
35
|
+
checkpointNumber: CheckpointNumberSchema,
|
|
36
|
+
timestamp: schemas.BigInt,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function serializeCheckpointInfo(info: CheckpointInfo): Buffer {
|
|
40
|
+
return serializeToBuffer(info.archive, info.lastArchive, info.slotNumber, info.checkpointNumber, info.timestamp);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function deserializeCheckpointInfo(buffer: Buffer | BufferReader): CheckpointInfo {
|
|
44
|
+
const reader = BufferReader.asReader(buffer);
|
|
45
|
+
return {
|
|
46
|
+
archive: reader.readObject(Fr),
|
|
47
|
+
lastArchive: reader.readObject(Fr),
|
|
48
|
+
slotNumber: SlotNumber(reader.readNumber()),
|
|
49
|
+
checkpointNumber: CheckpointNumber(reader.readNumber()),
|
|
50
|
+
timestamp: reader.readBigInt(),
|
|
51
|
+
};
|
|
52
|
+
}
|
package/src/checkpoint/index.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { CheckpointedL2Block, PublishedL2Block } from '../block/checkpointed_l2_
|
|
|
8
8
|
import { L2Block } from '../block/l2_block.js';
|
|
9
9
|
import { L2BlockNew } from '../block/l2_block_new.js';
|
|
10
10
|
import { type L2BlockSource, L2TipsSchema } from '../block/l2_block_source.js';
|
|
11
|
-
import {
|
|
11
|
+
import { ValidateCheckpointResultSchema } from '../block/validate_block_result.js';
|
|
12
12
|
import { Checkpoint } from '../checkpoint/checkpoint.js';
|
|
13
13
|
import { PublishedCheckpoint } from '../checkpoint/published_checkpoint.js';
|
|
14
14
|
import {
|
|
@@ -52,14 +52,14 @@ export type ArchiverSpecificConfig = {
|
|
|
52
52
|
/** The maximum possible size of the archiver DB in KB. Overwrites the general dataStoreMapSizeKb. */
|
|
53
53
|
archiverStoreMapSizeKb?: number;
|
|
54
54
|
|
|
55
|
-
/** Whether to skip validating block attestations (use only for testing). */
|
|
56
|
-
skipValidateBlockAttestations?: boolean;
|
|
57
|
-
|
|
58
55
|
/** Maximum allowed drift in seconds between the Ethereum client and current time. */
|
|
59
56
|
maxAllowedEthClientDriftSeconds?: number;
|
|
60
57
|
|
|
61
58
|
/** Whether to allow starting the archiver without debug/trace method support on Ethereum hosts */
|
|
62
59
|
ethereumAllowNoDebugHosts?: boolean;
|
|
60
|
+
|
|
61
|
+
/** Skip validating checkpoint attestations (for testing purposes only) */
|
|
62
|
+
skipValidateCheckpointAttestations?: boolean;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
export const ArchiverSpecificConfigSchema = z.object({
|
|
@@ -68,9 +68,9 @@ export const ArchiverSpecificConfigSchema = z.object({
|
|
|
68
68
|
viemPollingIntervalMS: schemas.Integer.optional(),
|
|
69
69
|
maxLogs: schemas.Integer.optional(),
|
|
70
70
|
archiverStoreMapSizeKb: schemas.Integer.optional(),
|
|
71
|
-
skipValidateBlockAttestations: z.boolean().optional(),
|
|
72
71
|
maxAllowedEthClientDriftSeconds: schemas.Integer.optional(),
|
|
73
72
|
ethereumAllowNoDebugHosts: z.boolean().optional(),
|
|
73
|
+
skipValidateCheckpointAttestations: z.boolean().optional(),
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
export type ArchiverApi = Omit<
|
|
@@ -89,6 +89,10 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
|
|
|
89
89
|
.args(z.union([BlockNumberSchema, z.literal('latest')]))
|
|
90
90
|
.returns(BlockHeader.schema.optional()),
|
|
91
91
|
getCheckpointedBlock: z.function().args(BlockNumberSchema).returns(CheckpointedL2Block.schema.optional()),
|
|
92
|
+
getCheckpointedBlocks: z
|
|
93
|
+
.function()
|
|
94
|
+
.args(BlockNumberSchema, schemas.Integer, optional(z.boolean()))
|
|
95
|
+
.returns(z.array(CheckpointedL2Block.schema)),
|
|
92
96
|
getBlocks: z
|
|
93
97
|
.function()
|
|
94
98
|
.args(BlockNumberSchema, schemas.Integer, optional(z.boolean()))
|
|
@@ -101,6 +105,10 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
|
|
|
101
105
|
.function()
|
|
102
106
|
.args(BlockNumberSchema, schemas.Integer, optional(z.boolean()))
|
|
103
107
|
.returns(z.array(PublishedL2Block.schema)),
|
|
108
|
+
getL2BlocksNew: z
|
|
109
|
+
.function()
|
|
110
|
+
.args(BlockNumberSchema, schemas.Integer, optional(z.boolean()))
|
|
111
|
+
.returns(z.array(L2BlockNew.schema)),
|
|
104
112
|
getPublishedBlockByHash: z.function().args(schemas.Fr).returns(PublishedL2Block.schema.optional()),
|
|
105
113
|
getPublishedBlockByArchive: z.function().args(schemas.Fr).returns(PublishedL2Block.schema.optional()),
|
|
106
114
|
getBlockHeaderByHash: z.function().args(schemas.Fr).returns(BlockHeader.schema.optional()),
|
|
@@ -144,5 +152,5 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
|
|
|
144
152
|
getL1Timestamp: z.function().args().returns(schemas.BigInt.optional()),
|
|
145
153
|
syncImmediate: z.function().args().returns(z.void()),
|
|
146
154
|
isPendingChainInvalid: z.function().args().returns(z.boolean()),
|
|
147
|
-
getPendingChainValidationStatus: z.function().args().returns(
|
|
155
|
+
getPendingChainValidationStatus: z.function().args().returns(ValidateCheckpointResultSchema),
|
|
148
156
|
};
|
|
@@ -56,7 +56,10 @@ export type AztecNodeAdminConfig = ValidatorClientFullConfig &
|
|
|
56
56
|
SequencerConfig &
|
|
57
57
|
ProverConfig &
|
|
58
58
|
SlasherConfig &
|
|
59
|
-
Pick<
|
|
59
|
+
Pick<
|
|
60
|
+
ArchiverSpecificConfig,
|
|
61
|
+
'archiverPollingIntervalMS' | 'archiverBatchSize' | 'skipValidateCheckpointAttestations'
|
|
62
|
+
> & {
|
|
60
63
|
maxPendingTxCount: number;
|
|
61
64
|
};
|
|
62
65
|
|
|
@@ -66,8 +69,8 @@ export const AztecNodeAdminConfigSchema = SequencerConfigSchema.merge(ProverConf
|
|
|
66
69
|
.merge(
|
|
67
70
|
ArchiverSpecificConfigSchema.pick({
|
|
68
71
|
archiverPollingIntervalMS: true,
|
|
69
|
-
skipValidateBlockAttestations: true,
|
|
70
72
|
archiverBatchSize: true,
|
|
73
|
+
skipValidateCheckpointAttestations: true,
|
|
71
74
|
}),
|
|
72
75
|
)
|
|
73
76
|
.merge(z.object({ maxPendingTxCount: z.number() }));
|
|
@@ -10,6 +10,9 @@ import {
|
|
|
10
10
|
BlockNumber,
|
|
11
11
|
BlockNumberPositiveSchema,
|
|
12
12
|
BlockNumberSchema,
|
|
13
|
+
CheckpointNumberPositiveSchema,
|
|
14
|
+
EpochNumber,
|
|
15
|
+
EpochNumberSchema,
|
|
13
16
|
type SlotNumber,
|
|
14
17
|
} from '@aztec/foundation/branded-types';
|
|
15
18
|
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
@@ -21,10 +24,12 @@ import { z } from 'zod';
|
|
|
21
24
|
|
|
22
25
|
import type { AztecAddress } from '../aztec-address/index.js';
|
|
23
26
|
import { type BlockParameter, BlockParameterSchema } from '../block/block_parameter.js';
|
|
24
|
-
import { PublishedL2Block } from '../block/checkpointed_l2_block.js';
|
|
27
|
+
import { CheckpointedL2Block, PublishedL2Block } from '../block/checkpointed_l2_block.js';
|
|
25
28
|
import { type DataInBlock, dataInBlockSchemaFor } from '../block/in_block.js';
|
|
26
29
|
import { L2Block } from '../block/l2_block.js';
|
|
30
|
+
import { L2BlockNew } from '../block/l2_block_new.js';
|
|
27
31
|
import { type L2BlockSource, type L2Tips, L2TipsSchema } from '../block/l2_block_source.js';
|
|
32
|
+
import { PublishedCheckpoint } from '../checkpoint/published_checkpoint.js';
|
|
28
33
|
import {
|
|
29
34
|
type ContractClassPublic,
|
|
30
35
|
ContractClassPublicSchema,
|
|
@@ -57,7 +62,7 @@ import { SingleValidatorStatsSchema, ValidatorsStatsSchema } from '../validators
|
|
|
57
62
|
import type { SingleValidatorStats, ValidatorsStats } from '../validators/types.js';
|
|
58
63
|
import { type ComponentsVersions, getVersioningResponseHandler } from '../versioning/index.js';
|
|
59
64
|
import { type AllowedElement, AllowedElementSchema } from './allowed_element.js';
|
|
60
|
-
import { MAX_RPC_BLOCKS_LEN, MAX_RPC_LEN, MAX_RPC_TXS_LEN } from './api_limit.js';
|
|
65
|
+
import { MAX_RPC_BLOCKS_LEN, MAX_RPC_CHECKPOINTS_LEN, MAX_RPC_LEN, MAX_RPC_TXS_LEN } from './api_limit.js';
|
|
61
66
|
import {
|
|
62
67
|
type GetContractClassLogsResponse,
|
|
63
68
|
GetContractClassLogsResponseSchema,
|
|
@@ -71,7 +76,16 @@ import { type WorldStateSyncStatus, WorldStateSyncStatusSchema } from './world_s
|
|
|
71
76
|
* We will probably implement the additional interfaces by means other than Aztec Node as it's currently a privacy leak
|
|
72
77
|
*/
|
|
73
78
|
export interface AztecNode
|
|
74
|
-
extends Pick<
|
|
79
|
+
extends Pick<
|
|
80
|
+
L2BlockSource,
|
|
81
|
+
| 'getBlocks'
|
|
82
|
+
| 'getL2BlocksNew'
|
|
83
|
+
| 'getPublishedBlocks'
|
|
84
|
+
| 'getPublishedCheckpoints'
|
|
85
|
+
| 'getBlockHeader'
|
|
86
|
+
| 'getL2Tips'
|
|
87
|
+
| 'getCheckpointedBlocks'
|
|
88
|
+
> {
|
|
75
89
|
/**
|
|
76
90
|
* Returns the tips of the L2 chain.
|
|
77
91
|
*/
|
|
@@ -216,11 +230,12 @@ export interface AztecNode
|
|
|
216
230
|
isL1ToL2MessageSynced(l1ToL2Message: Fr): Promise<boolean>;
|
|
217
231
|
|
|
218
232
|
/**
|
|
219
|
-
* Returns all the L2 to L1 messages in
|
|
220
|
-
* @param
|
|
221
|
-
* @returns
|
|
233
|
+
* Returns all the L2 to L1 messages in an epoch.
|
|
234
|
+
* @param epoch - The epoch at which to get the data.
|
|
235
|
+
* @returns A nested array of the L2 to L1 messages in each tx of each block in each checkpoint in the epoch (empty
|
|
236
|
+
* array if the epoch is not found).
|
|
222
237
|
*/
|
|
223
|
-
getL2ToL1Messages(
|
|
238
|
+
getL2ToL1Messages(epoch: EpochNumber): Promise<Fr[][][][]>;
|
|
224
239
|
|
|
225
240
|
/**
|
|
226
241
|
* Get a block specified by its number.
|
|
@@ -277,10 +292,10 @@ export interface AztecNode
|
|
|
277
292
|
getBlocks(from: BlockNumber, limit: number): Promise<L2Block[]>;
|
|
278
293
|
|
|
279
294
|
/**
|
|
280
|
-
* Method to fetch the current
|
|
281
|
-
* @returns The current
|
|
295
|
+
* Method to fetch the current min fees.
|
|
296
|
+
* @returns The current min fees.
|
|
282
297
|
*/
|
|
283
|
-
|
|
298
|
+
getCurrentMinFees(): Promise<GasFees>;
|
|
284
299
|
|
|
285
300
|
/**
|
|
286
301
|
* Method to fetch the current max priority fee of txs in the mempool.
|
|
@@ -552,8 +567,8 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
552
567
|
|
|
553
568
|
getL2ToL1Messages: z
|
|
554
569
|
.function()
|
|
555
|
-
.args(
|
|
556
|
-
.returns(z.array(z.array(schemas.Fr))
|
|
570
|
+
.args(EpochNumberSchema)
|
|
571
|
+
.returns(z.array(z.array(z.array(z.array(schemas.Fr))))),
|
|
557
572
|
|
|
558
573
|
getBlock: z.function().args(BlockParameterSchema).returns(L2Block.schema.optional()),
|
|
559
574
|
|
|
@@ -579,7 +594,22 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
579
594
|
.args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
|
|
580
595
|
.returns(z.array(PublishedL2Block.schema)),
|
|
581
596
|
|
|
582
|
-
|
|
597
|
+
getPublishedCheckpoints: z
|
|
598
|
+
.function()
|
|
599
|
+
.args(CheckpointNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_CHECKPOINTS_LEN))
|
|
600
|
+
.returns(z.array(PublishedCheckpoint.schema)),
|
|
601
|
+
|
|
602
|
+
getL2BlocksNew: z
|
|
603
|
+
.function()
|
|
604
|
+
.args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
|
|
605
|
+
.returns(z.array(L2BlockNew.schema)),
|
|
606
|
+
|
|
607
|
+
getCheckpointedBlocks: z
|
|
608
|
+
.function()
|
|
609
|
+
.args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN), optional(z.boolean()))
|
|
610
|
+
.returns(z.array(CheckpointedL2Block.schema)),
|
|
611
|
+
|
|
612
|
+
getCurrentMinFees: z.function().returns(GasFees.schema),
|
|
583
613
|
|
|
584
614
|
getMaxPriorityFees: z.function().returns(GasFees.schema),
|
|
585
615
|
|
|
@@ -67,6 +67,10 @@ export interface SequencerConfig {
|
|
|
67
67
|
blockDurationMs?: number;
|
|
68
68
|
/** Have sequencer build and publish an empty checkpoint if there are no txs */
|
|
69
69
|
buildCheckpointIfEmpty?: boolean;
|
|
70
|
+
|
|
71
|
+
// TODO(palla/mbps): Change default to false once block sync is stable
|
|
72
|
+
/** Skip pushing proposed blocks to archiver (default: true) */
|
|
73
|
+
skipPushProposedBlocksToArchiver?: boolean;
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
export const SequencerConfigSchema = zodFor<SequencerConfig>()(
|
|
@@ -100,6 +104,7 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
|
|
|
100
104
|
shuffleAttestationOrdering: z.boolean().optional(),
|
|
101
105
|
blockDurationMs: z.number().positive().optional(),
|
|
102
106
|
buildCheckpointIfEmpty: z.boolean().optional(),
|
|
107
|
+
skipPushProposedBlocksToArchiver: z.boolean().optional(),
|
|
103
108
|
}),
|
|
104
109
|
);
|
|
105
110
|
|
package/src/interfaces/p2p.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { SlotNumber } from '@aztec/foundation/branded-types';
|
|
|
2
2
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { CheckpointAttestation } from '../p2p/checkpoint_attestation.js';
|
|
6
6
|
import type { P2PClientType } from '../p2p/client_type.js';
|
|
7
7
|
import { type ApiSchemaFor, optional, schemas } from '../schemas/index.js';
|
|
8
8
|
import { Tx } from '../tx/tx.js';
|
|
@@ -52,21 +52,18 @@ export interface P2PApiWithoutAttestations {
|
|
|
52
52
|
|
|
53
53
|
export interface P2PApiWithAttestations extends P2PApiWithoutAttestations {
|
|
54
54
|
/**
|
|
55
|
-
* Queries the Attestation pool for attestations for the given slot
|
|
55
|
+
* Queries the Attestation pool for checkpoint attestations for the given slot
|
|
56
56
|
*
|
|
57
57
|
* @param slot - the slot to query
|
|
58
58
|
* @param proposalId - the proposal id to query, or undefined to query all proposals for the slot
|
|
59
|
-
* @returns
|
|
59
|
+
* @returns CheckpointAttestations
|
|
60
60
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/** Deletes a given attestation manually from the p2p client attestation pool. */
|
|
64
|
-
deleteAttestation(attestation: BlockAttestation): Promise<void>;
|
|
61
|
+
getCheckpointAttestationsForSlot(slot: SlotNumber, proposalId?: string): Promise<CheckpointAttestation[]>;
|
|
65
62
|
}
|
|
66
63
|
|
|
67
64
|
export interface P2PClient extends P2PApiWithAttestations {
|
|
68
|
-
/** Manually adds
|
|
69
|
-
|
|
65
|
+
/** Manually adds checkpoint attestations to the p2p client attestation pool. */
|
|
66
|
+
addCheckpointAttestations(attestations: CheckpointAttestation[]): Promise<void>;
|
|
70
67
|
}
|
|
71
68
|
|
|
72
69
|
export type P2PApi<T extends P2PClientType = P2PClientType.Full> = T extends P2PClientType.Full
|
|
@@ -78,10 +75,10 @@ export type P2PApiFull<T extends P2PClientType = P2PClientType.Full> = T extends
|
|
|
78
75
|
: P2PApiWithoutAttestations;
|
|
79
76
|
|
|
80
77
|
export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
|
|
81
|
-
|
|
78
|
+
getCheckpointAttestationsForSlot: z
|
|
82
79
|
.function()
|
|
83
80
|
.args(schemas.SlotNumber, optional(z.string()))
|
|
84
|
-
.returns(z.array(
|
|
81
|
+
.returns(z.array(CheckpointAttestation.schema)),
|
|
85
82
|
getPendingTxs: z
|
|
86
83
|
.function()
|
|
87
84
|
.args(optional(z.number().gte(1).lte(MAX_RPC_TXS_LEN).default(MAX_RPC_TXS_LEN)), optional(TxHash.schema))
|
|
@@ -90,5 +87,4 @@ export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
|
|
|
90
87
|
getPendingTxCount: z.function().returns(schemas.Integer),
|
|
91
88
|
getEncodedEnr: z.function().returns(z.string().optional()),
|
|
92
89
|
getPeers: z.function().args(optional(z.boolean())).returns(z.array(PeerInfoSchema)),
|
|
93
|
-
deleteAttestation: z.function().args(BlockAttestation.schema).returns(z.void()),
|
|
94
90
|
};
|
|
@@ -47,15 +47,6 @@ export type ProofAndVerificationKey<N extends number> = {
|
|
|
47
47
|
verificationKey: VerificationKeyData;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
function schemaForRecursiveProofAndVerificationKey<N extends number>(
|
|
51
|
-
proofLength: N,
|
|
52
|
-
): ZodFor<ProofAndVerificationKey<N>> {
|
|
53
|
-
return z.object({
|
|
54
|
-
proof: RecursiveProof.schemaFor(proofLength),
|
|
55
|
-
verificationKey: VerificationKeyData.schema,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
50
|
export function makeProofAndVerificationKey<N extends number>(
|
|
60
51
|
proof: RecursiveProof<N>,
|
|
61
52
|
verificationKey: VerificationKeyData,
|
|
@@ -213,7 +204,7 @@ export type ProvingJobInputsMap = {
|
|
|
213
204
|
export const ProvingJobResult = z.discriminatedUnion('type', [
|
|
214
205
|
z.object({
|
|
215
206
|
type: z.literal(ProvingRequestType.PUBLIC_VM),
|
|
216
|
-
result:
|
|
207
|
+
result: RecursiveProof.schemaFor(AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED),
|
|
217
208
|
}),
|
|
218
209
|
z.object({
|
|
219
210
|
type: z.literal(ProvingRequestType.PUBLIC_CHONK_VERIFIER),
|
|
@@ -328,7 +319,7 @@ export const ProvingJobResult = z.discriminatedUnion('type', [
|
|
|
328
319
|
]);
|
|
329
320
|
export type ProvingJobResult = z.infer<typeof ProvingJobResult>;
|
|
330
321
|
export type ProvingJobResultsMap = {
|
|
331
|
-
[ProvingRequestType.PUBLIC_VM]:
|
|
322
|
+
[ProvingRequestType.PUBLIC_VM]: RecursiveProof<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>;
|
|
332
323
|
[ProvingRequestType.PUBLIC_CHONK_VERIFIER]: PublicInputsAndRecursiveProof<
|
|
333
324
|
PublicChonkVerifierPublicInputs,
|
|
334
325
|
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
@@ -9,6 +9,7 @@ import type { AvmCircuitInputs } from '../avm/avm.js';
|
|
|
9
9
|
import type { ParityBasePrivateInputs } from '../parity/parity_base_private_inputs.js';
|
|
10
10
|
import type { ParityPublicInputs } from '../parity/parity_public_inputs.js';
|
|
11
11
|
import type { ParityRootPrivateInputs } from '../parity/parity_root_private_inputs.js';
|
|
12
|
+
import type { RecursiveProof } from '../proofs/recursive_proof.js';
|
|
12
13
|
import type { BlockMergeRollupPrivateInputs } from '../rollup/block_merge_rollup_private_inputs.js';
|
|
13
14
|
import type { BlockRollupPublicInputs } from '../rollup/block_rollup_public_inputs.js';
|
|
14
15
|
import type {
|
|
@@ -34,7 +35,7 @@ import type { RootRollupPublicInputs } from '../rollup/root_rollup_public_inputs
|
|
|
34
35
|
import type { TxMergeRollupPrivateInputs } from '../rollup/tx_merge_rollup_private_inputs.js';
|
|
35
36
|
import type { TxRollupPublicInputs } from '../rollup/tx_rollup_public_inputs.js';
|
|
36
37
|
import type { Tx } from '../tx/tx.js';
|
|
37
|
-
import type {
|
|
38
|
+
import type { PublicInputsAndRecursiveProof } from './proving-job.js';
|
|
38
39
|
|
|
39
40
|
/**
|
|
40
41
|
* Generates proofs for parity and rollup circuits.
|
|
@@ -188,7 +189,7 @@ export interface ServerCircuitProver {
|
|
|
188
189
|
inputs: AvmCircuitInputs,
|
|
189
190
|
signal?: AbortSignal,
|
|
190
191
|
epochNumber?: number,
|
|
191
|
-
): Promise<
|
|
192
|
+
): Promise<RecursiveProof<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>>;
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
export type IVCProofVerificationResult = {
|