@aztec/prover-client 3.0.0-nightly.20251025 → 3.0.0-nightly.20251030-2
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/block-factory/light.js +1 -1
- package/dest/config.js +1 -1
- package/dest/mocks/fixtures.js +1 -1
- package/dest/mocks/test_context.d.ts.map +1 -1
- package/dest/mocks/test_context.js +8 -9
- package/dest/orchestrator/block-building-helpers.d.ts +9 -11
- package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
- package/dest/orchestrator/block-building-helpers.js +35 -45
- package/dest/orchestrator/block-proving-state.d.ts +1 -1
- package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/block-proving-state.js +2 -3
- package/dest/orchestrator/checkpoint-proving-state.d.ts +3 -2
- package/dest/orchestrator/checkpoint-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/checkpoint-proving-state.js +12 -9
- package/dest/orchestrator/epoch-proving-state.d.ts +2 -2
- package/dest/orchestrator/epoch-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/epoch-proving-state.js +4 -4
- package/dest/orchestrator/orchestrator.d.ts +5 -5
- package/dest/orchestrator/orchestrator.d.ts.map +1 -1
- package/dest/orchestrator/orchestrator.js +34 -35
- package/dest/orchestrator/tx-proving-state.d.ts +4 -4
- package/dest/orchestrator/tx-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/tx-proving-state.js +12 -12
- package/dest/prover-client/server-epoch-prover.d.ts +1 -1
- package/dest/prover-client/server-epoch-prover.d.ts.map +1 -1
- package/dest/prover-client/server-epoch-prover.js +2 -2
- package/dest/proving_broker/broker_prover_facade.d.ts +2 -2
- package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
- package/dest/proving_broker/broker_prover_facade.js +2 -2
- package/dest/proving_broker/proving_broker.js +2 -2
- package/dest/proving_broker/proving_job_controller.js +2 -2
- package/dest/test/mock_prover.d.ts +2 -2
- package/dest/test/mock_prover.d.ts.map +1 -1
- package/dest/test/mock_prover.js +3 -3
- package/package.json +15 -15
- package/src/block-factory/light.ts +1 -1
- package/src/config.ts +1 -1
- package/src/mocks/fixtures.ts +1 -1
- package/src/mocks/test_context.ts +8 -9
- package/src/orchestrator/block-building-helpers.ts +43 -52
- package/src/orchestrator/block-proving-state.ts +2 -3
- package/src/orchestrator/checkpoint-proving-state.ts +14 -10
- package/src/orchestrator/epoch-proving-state.ts +7 -5
- package/src/orchestrator/orchestrator.ts +50 -42
- package/src/orchestrator/tx-proving-state.ts +20 -16
- package/src/prover-client/server-epoch-prover.ts +2 -2
- package/src/proving_broker/broker_prover_facade.ts +9 -7
- package/src/proving_broker/proving_broker.ts +2 -2
- package/src/proving_broker/proving_job_controller.ts +2 -2
- package/src/test/mock_prover.ts +9 -7
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
PrivateBaseRollupHints,
|
|
15
15
|
PrivateTxBaseRollupPrivateInputs,
|
|
16
16
|
PublicBaseRollupHints,
|
|
17
|
-
|
|
17
|
+
PublicChonkVerifierPublicInputs,
|
|
18
18
|
PublicTxBaseRollupPrivateInputs,
|
|
19
19
|
} from '@aztec/stdlib/rollup';
|
|
20
20
|
import type { CircuitName } from '@aztec/stdlib/stats';
|
|
@@ -22,7 +22,11 @@ import type { AppendOnlyTreeSnapshot, MerkleTreeId } from '@aztec/stdlib/trees';
|
|
|
22
22
|
import type { ProcessedTx } from '@aztec/stdlib/tx';
|
|
23
23
|
import { VerificationKeyData, VkData } from '@aztec/stdlib/vks';
|
|
24
24
|
|
|
25
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
getChonkProofFromTx,
|
|
27
|
+
getPublicChonkVerifierPrivateInputsFromTx,
|
|
28
|
+
toProofData,
|
|
29
|
+
} from './block-building-helpers.js';
|
|
26
30
|
|
|
27
31
|
/**
|
|
28
32
|
* Helper class to manage the proving cycle of a transaction
|
|
@@ -30,8 +34,8 @@ import { getCivcProofFromTx, getPublicTubePrivateInputsFromTx, toProofData } fro
|
|
|
30
34
|
* Also stores the inputs to the base rollup for this transaction and the tree snapshots
|
|
31
35
|
*/
|
|
32
36
|
export class TxProvingState {
|
|
33
|
-
private
|
|
34
|
-
|
|
37
|
+
private publicChonkVerifier?: PublicInputsAndRecursiveProof<
|
|
38
|
+
PublicChonkVerifierPublicInputs,
|
|
35
39
|
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
36
40
|
>;
|
|
37
41
|
private avm?: ProofAndVerificationKey<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>;
|
|
@@ -48,15 +52,15 @@ export class TxProvingState {
|
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
public ready() {
|
|
51
|
-
return !this.requireAvmProof || (!!this.avm && !!this.
|
|
55
|
+
return !this.requireAvmProof || (!!this.avm && !!this.publicChonkVerifier);
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
public getAvmInputs(): AvmCircuitInputs {
|
|
55
59
|
return this.processedTx.avmProvingRequest!.inputs;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
|
-
public
|
|
59
|
-
return
|
|
62
|
+
public getPublicChonkVerifierPrivateInputs() {
|
|
63
|
+
return getPublicChonkVerifierPrivateInputsFromTx(this.processedTx, this.proverId);
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
public getBaseRollupTypeAndInputs() {
|
|
@@ -73,13 +77,13 @@ export class TxProvingState {
|
|
|
73
77
|
}
|
|
74
78
|
}
|
|
75
79
|
|
|
76
|
-
public
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
public setPublicChonkVerifierProof(
|
|
81
|
+
publicChonkVerifierProofAndVk: PublicInputsAndRecursiveProof<
|
|
82
|
+
PublicChonkVerifierPublicInputs,
|
|
79
83
|
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
80
84
|
>,
|
|
81
85
|
) {
|
|
82
|
-
this.
|
|
86
|
+
this.publicChonkVerifier = publicChonkVerifierProofAndVk;
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
public setAvmProof(avmProofAndVk: ProofAndVerificationKey<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>) {
|
|
@@ -93,7 +97,7 @@ export class TxProvingState {
|
|
|
93
97
|
|
|
94
98
|
const privateTailProofData = new ProofData(
|
|
95
99
|
this.processedTx.data.toPrivateToRollupKernelCircuitPublicInputs(),
|
|
96
|
-
|
|
100
|
+
getChonkProofFromTx(this.processedTx),
|
|
97
101
|
getVkData('HidingKernelToRollup'),
|
|
98
102
|
);
|
|
99
103
|
|
|
@@ -104,8 +108,8 @@ export class TxProvingState {
|
|
|
104
108
|
if (!this.processedTx.avmProvingRequest) {
|
|
105
109
|
throw new Error('Should create private base rollup for a tx not requiring avm proof.');
|
|
106
110
|
}
|
|
107
|
-
if (!this.
|
|
108
|
-
throw new Error('Tx not ready for proving base rollup: public
|
|
111
|
+
if (!this.publicChonkVerifier) {
|
|
112
|
+
throw new Error('Tx not ready for proving base rollup: public chonk verifier proof undefined');
|
|
109
113
|
}
|
|
110
114
|
if (!this.avm) {
|
|
111
115
|
throw new Error('Tx not ready for proving base rollup: avm proof undefined');
|
|
@@ -114,7 +118,7 @@ export class TxProvingState {
|
|
|
114
118
|
throw new Error('Mismatched base rollup hints, expected public base rollup hints');
|
|
115
119
|
}
|
|
116
120
|
|
|
117
|
-
const
|
|
121
|
+
const publicChonkVerifierProofData = toProofData(this.publicChonkVerifier);
|
|
118
122
|
|
|
119
123
|
const avmProofData = new ProofData(
|
|
120
124
|
this.processedTx.avmProvingRequest.inputs.publicInputs,
|
|
@@ -122,7 +126,7 @@ export class TxProvingState {
|
|
|
122
126
|
this.#getVkData(this.avm!.verificationKey, AVM_VK_INDEX),
|
|
123
127
|
);
|
|
124
128
|
|
|
125
|
-
return new PublicTxBaseRollupPrivateInputs(
|
|
129
|
+
return new PublicTxBaseRollupPrivateInputs(publicChonkVerifierProofData, avmProofData, this.baseRollupHints);
|
|
126
130
|
}
|
|
127
131
|
|
|
128
132
|
#getVkData(verificationKey: VerificationKeyData, vkIndex: number) {
|
|
@@ -42,8 +42,8 @@ export class ServerEpochProver implements EpochProver {
|
|
|
42
42
|
headerOfLastBlockInPreviousCheckpoint,
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
return this.orchestrator.
|
|
45
|
+
startChonkVerifierCircuits(txs: Tx[]): Promise<void> {
|
|
46
|
+
return this.orchestrator.startChonkVerifierCircuits(txs);
|
|
47
47
|
}
|
|
48
48
|
setBlockCompleted(blockNumber: number, expectedBlockHeader?: BlockHeader): Promise<BlockHeader> {
|
|
49
49
|
return this.orchestrator.setBlockCompleted(blockNumber, expectedBlockHeader);
|
|
@@ -38,8 +38,8 @@ import type {
|
|
|
38
38
|
CheckpointRootRollupPrivateInputs,
|
|
39
39
|
CheckpointRootSingleBlockRollupPrivateInputs,
|
|
40
40
|
PrivateTxBaseRollupPrivateInputs,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
PublicChonkVerifierPrivateInputs,
|
|
42
|
+
PublicChonkVerifierPublicInputs,
|
|
43
43
|
PublicTxBaseRollupPrivateInputs,
|
|
44
44
|
RootRollupPrivateInputs,
|
|
45
45
|
RootRollupPublicInputs,
|
|
@@ -445,14 +445,16 @@ export class BrokerCircuitProverFacade implements ServerCircuitProver {
|
|
|
445
445
|
);
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
-
|
|
449
|
-
inputs:
|
|
448
|
+
getPublicChonkVerifierProof(
|
|
449
|
+
inputs: PublicChonkVerifierPrivateInputs,
|
|
450
450
|
signal?: AbortSignal,
|
|
451
451
|
epochNumber?: number,
|
|
452
|
-
): Promise<
|
|
452
|
+
): Promise<
|
|
453
|
+
PublicInputsAndRecursiveProof<PublicChonkVerifierPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
454
|
+
> {
|
|
453
455
|
return this.enqueueJob(
|
|
454
|
-
this.generateId(ProvingRequestType.
|
|
455
|
-
ProvingRequestType.
|
|
456
|
+
this.generateId(ProvingRequestType.PUBLIC_CHONK_VERIFIER, inputs, epochNumber),
|
|
457
|
+
ProvingRequestType.PUBLIC_CHONK_VERIFIER,
|
|
456
458
|
inputs,
|
|
457
459
|
epochNumber,
|
|
458
460
|
signal,
|
|
@@ -44,7 +44,7 @@ type EnqueuedProvingJob = Pick<ProvingJob, 'id' | 'epochNumber'>;
|
|
|
44
44
|
export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Traceable {
|
|
45
45
|
private queues: ProvingQueues = {
|
|
46
46
|
[ProvingRequestType.PUBLIC_VM]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
47
|
-
[ProvingRequestType.
|
|
47
|
+
[ProvingRequestType.PUBLIC_CHONK_VERIFIER]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
48
48
|
|
|
49
49
|
[ProvingRequestType.PRIVATE_TX_BASE_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
50
50
|
[ProvingRequestType.PUBLIC_TX_BASE_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
|
|
@@ -700,7 +700,7 @@ export const PROOF_TYPES_IN_PRIORITY_ORDER: ProvingRequestType[] = [
|
|
|
700
700
|
ProvingRequestType.PUBLIC_TX_BASE_ROLLUP,
|
|
701
701
|
ProvingRequestType.PRIVATE_TX_BASE_ROLLUP,
|
|
702
702
|
ProvingRequestType.PUBLIC_VM,
|
|
703
|
-
ProvingRequestType.
|
|
703
|
+
ProvingRequestType.PUBLIC_CHONK_VERIFIER,
|
|
704
704
|
ProvingRequestType.PARITY_ROOT,
|
|
705
705
|
ProvingRequestType.PARITY_BASE,
|
|
706
706
|
];
|
|
@@ -128,8 +128,8 @@ export class ProvingJobController {
|
|
|
128
128
|
return await this.circuitProver.getAvmProof(inputs, undefined, signal, this.epochNumber);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
case ProvingRequestType.
|
|
132
|
-
return await this.circuitProver.
|
|
131
|
+
case ProvingRequestType.PUBLIC_CHONK_VERIFIER: {
|
|
132
|
+
return await this.circuitProver.getPublicChonkVerifierProof(inputs, signal, this.epochNumber);
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
case ProvingRequestType.PRIVATE_TX_BASE_ROLLUP: {
|
package/src/test/mock_prover.ts
CHANGED
|
@@ -33,8 +33,8 @@ import type {
|
|
|
33
33
|
CheckpointRootRollupPrivateInputs,
|
|
34
34
|
CheckpointRootSingleBlockRollupPrivateInputs,
|
|
35
35
|
PrivateTxBaseRollupPrivateInputs,
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
PublicChonkVerifierPrivateInputs,
|
|
37
|
+
PublicChonkVerifierPublicInputs,
|
|
38
38
|
PublicTxBaseRollupPrivateInputs,
|
|
39
39
|
RootRollupPrivateInputs,
|
|
40
40
|
RootRollupPublicInputs,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
makeBlockRollupPublicInputs,
|
|
46
46
|
makeCheckpointRollupPublicInputs,
|
|
47
47
|
makeParityPublicInputs,
|
|
48
|
-
|
|
48
|
+
makePublicChonkVerifierPublicInputs,
|
|
49
49
|
makeRootRollupPublicInputs,
|
|
50
50
|
makeTxRollupPublicInputs,
|
|
51
51
|
} from '@aztec/stdlib/testing';
|
|
@@ -139,14 +139,16 @@ export class MockProver implements ServerCircuitProver {
|
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
_inputs:
|
|
142
|
+
getPublicChonkVerifierProof(
|
|
143
|
+
_inputs: PublicChonkVerifierPrivateInputs,
|
|
144
144
|
_signal?: AbortSignal,
|
|
145
145
|
_epochNumber?: number,
|
|
146
|
-
): Promise<
|
|
146
|
+
): Promise<
|
|
147
|
+
PublicInputsAndRecursiveProof<PublicChonkVerifierPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
148
|
+
> {
|
|
147
149
|
return Promise.resolve(
|
|
148
150
|
makePublicInputsAndRecursiveProof(
|
|
149
|
-
|
|
151
|
+
makePublicChonkVerifierPublicInputs(),
|
|
150
152
|
makeRecursiveProof(NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH),
|
|
151
153
|
VerificationKeyData.makeFakeRollupHonk(),
|
|
152
154
|
),
|