@aztec/prover-client 0.0.1-fake-c83136db25 → 0.0.1-fake-ceab37513c
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/bin/get-proof-inputs.d.ts +2 -0
- package/dest/bin/get-proof-inputs.d.ts.map +1 -0
- package/dest/bin/get-proof-inputs.js +51 -0
- package/dest/block-factory/light.d.ts +3 -5
- package/dest/block-factory/light.d.ts.map +1 -1
- package/dest/block-factory/light.js +9 -16
- package/dest/config.js +1 -1
- package/dest/mocks/fixtures.d.ts +1 -4
- package/dest/mocks/fixtures.d.ts.map +1 -1
- package/dest/mocks/fixtures.js +3 -31
- package/dest/mocks/test_context.d.ts +9 -32
- package/dest/mocks/test_context.d.ts.map +1 -1
- package/dest/mocks/test_context.js +22 -78
- package/dest/orchestrator/block-building-helpers.d.ts +31 -33
- package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
- package/dest/orchestrator/block-building-helpers.js +137 -126
- package/dest/orchestrator/block-proving-state.d.ts +53 -60
- package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/block-proving-state.js +187 -214
- package/dest/orchestrator/epoch-proving-state.d.ts +28 -34
- package/dest/orchestrator/epoch-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/epoch-proving-state.js +84 -128
- package/dest/orchestrator/orchestrator.d.ts +30 -31
- package/dest/orchestrator/orchestrator.d.ts.map +1 -1
- package/dest/orchestrator/orchestrator.js +236 -368
- package/dest/orchestrator/tx-proving-state.d.ts +9 -11
- package/dest/orchestrator/tx-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/tx-proving-state.js +23 -26
- package/dest/prover-client/server-epoch-prover.d.ts +8 -9
- package/dest/prover-client/server-epoch-prover.d.ts.map +1 -1
- package/dest/prover-client/server-epoch-prover.js +9 -9
- package/dest/proving_broker/broker_prover_facade.d.ts +15 -20
- package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
- package/dest/proving_broker/broker_prover_facade.js +21 -36
- package/dest/proving_broker/fixtures.js +1 -1
- package/dest/proving_broker/proof_store/index.d.ts +0 -1
- package/dest/proving_broker/proof_store/index.d.ts.map +1 -1
- package/dest/proving_broker/proof_store/index.js +0 -1
- package/dest/proving_broker/proving_broker.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker.js +18 -29
- package/dest/proving_broker/proving_job_controller.d.ts.map +1 -1
- package/dest/proving_broker/proving_job_controller.js +18 -38
- package/dest/test/mock_prover.d.ts +17 -22
- package/dest/test/mock_prover.d.ts.map +1 -1
- package/dest/test/mock_prover.js +20 -35
- package/package.json +17 -16
- package/src/bin/get-proof-inputs.ts +59 -0
- package/src/block-factory/light.ts +9 -35
- package/src/config.ts +1 -1
- package/src/mocks/fixtures.ts +11 -39
- package/src/mocks/test_context.ts +31 -137
- package/src/orchestrator/block-building-helpers.ts +211 -211
- package/src/orchestrator/block-proving-state.ts +245 -235
- package/src/orchestrator/epoch-proving-state.ts +127 -172
- package/src/orchestrator/orchestrator.ts +303 -545
- package/src/orchestrator/tx-proving-state.ts +43 -49
- package/src/prover-client/server-epoch-prover.ts +18 -28
- package/src/proving_broker/broker_prover_facade.ts +86 -157
- package/src/proving_broker/fixtures.ts +1 -1
- package/src/proving_broker/proof_store/index.ts +0 -1
- package/src/proving_broker/proving_broker.ts +18 -36
- package/src/proving_broker/proving_job_controller.ts +18 -38
- package/src/test/mock_prover.ts +60 -142
- package/dest/orchestrator/checkpoint-proving-state.d.ts +0 -63
- package/dest/orchestrator/checkpoint-proving-state.d.ts.map +0 -1
- package/dest/orchestrator/checkpoint-proving-state.js +0 -211
- package/src/orchestrator/checkpoint-proving-state.ts +0 -299
|
@@ -1,50 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED,
|
|
3
3
|
AVM_VK_INDEX,
|
|
4
|
-
|
|
4
|
+
PRIVATE_TUBE_VK_INDEX,
|
|
5
|
+
PUBLIC_TUBE_VK_INDEX,
|
|
6
|
+
type TUBE_PROOF_LENGTH,
|
|
5
7
|
} from '@aztec/constants';
|
|
6
|
-
import type { Fr } from '@aztec/foundation/fields';
|
|
7
|
-
import { getVkData } from '@aztec/noir-protocol-circuits-types/server/vks';
|
|
8
8
|
import { getVKSiblingPath } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
9
9
|
import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
|
|
10
|
-
import type { ProofAndVerificationKey
|
|
11
|
-
import { ProofData } from '@aztec/stdlib/proofs';
|
|
10
|
+
import type { ProofAndVerificationKey } from '@aztec/stdlib/interfaces/server';
|
|
12
11
|
import {
|
|
12
|
+
AvmProofData,
|
|
13
13
|
type BaseRollupHints,
|
|
14
14
|
PrivateBaseRollupHints,
|
|
15
|
-
|
|
15
|
+
PrivateBaseRollupInputs,
|
|
16
|
+
PrivateTubeData,
|
|
16
17
|
PublicBaseRollupHints,
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
PublicBaseRollupInputs,
|
|
19
|
+
PublicTubeData,
|
|
20
|
+
TubeInputs,
|
|
19
21
|
} from '@aztec/stdlib/rollup';
|
|
20
22
|
import type { CircuitName } from '@aztec/stdlib/stats';
|
|
21
23
|
import type { AppendOnlyTreeSnapshot, MerkleTreeId } from '@aztec/stdlib/trees';
|
|
22
24
|
import type { ProcessedTx } from '@aztec/stdlib/tx';
|
|
23
25
|
import { VerificationKeyData, VkData } from '@aztec/stdlib/vks';
|
|
24
26
|
|
|
25
|
-
import {
|
|
26
|
-
getChonkProofFromTx,
|
|
27
|
-
getPublicChonkVerifierPrivateInputsFromTx,
|
|
28
|
-
toProofData,
|
|
29
|
-
} from './block-building-helpers.js';
|
|
30
|
-
|
|
31
27
|
/**
|
|
32
28
|
* Helper class to manage the proving cycle of a transaction
|
|
33
29
|
* This includes the public VMs and the public kernels
|
|
34
30
|
* Also stores the inputs to the base rollup for this transaction and the tree snapshots
|
|
35
31
|
*/
|
|
36
32
|
export class TxProvingState {
|
|
37
|
-
private
|
|
38
|
-
PublicChonkVerifierPublicInputs,
|
|
39
|
-
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
40
|
-
>;
|
|
33
|
+
private tube?: ProofAndVerificationKey<typeof TUBE_PROOF_LENGTH>;
|
|
41
34
|
private avm?: ProofAndVerificationKey<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>;
|
|
42
35
|
|
|
43
36
|
constructor(
|
|
44
37
|
public readonly processedTx: ProcessedTx,
|
|
45
38
|
private readonly baseRollupHints: BaseRollupHints,
|
|
46
39
|
public readonly treeSnapshots: Map<MerkleTreeId, AppendOnlyTreeSnapshot>,
|
|
47
|
-
private readonly proverId: Fr,
|
|
48
40
|
) {}
|
|
49
41
|
|
|
50
42
|
get requireAvmProof() {
|
|
@@ -52,38 +44,33 @@ export class TxProvingState {
|
|
|
52
44
|
}
|
|
53
45
|
|
|
54
46
|
public ready() {
|
|
55
|
-
return
|
|
47
|
+
return !!this.tube && (!this.requireAvmProof || !!this.avm);
|
|
56
48
|
}
|
|
57
49
|
|
|
58
|
-
public
|
|
59
|
-
return this.processedTx.
|
|
50
|
+
public getTubeInputs() {
|
|
51
|
+
return new TubeInputs(!!this.processedTx.data.forPublic, this.processedTx.clientIvcProof);
|
|
60
52
|
}
|
|
61
53
|
|
|
62
|
-
public
|
|
63
|
-
return
|
|
54
|
+
public getAvmInputs(): AvmCircuitInputs {
|
|
55
|
+
return this.processedTx.avmProvingRequest!.inputs;
|
|
64
56
|
}
|
|
65
57
|
|
|
66
58
|
public getBaseRollupTypeAndInputs() {
|
|
67
59
|
if (this.requireAvmProof) {
|
|
68
60
|
return {
|
|
69
|
-
rollupType: '
|
|
61
|
+
rollupType: 'public-base-rollup' satisfies CircuitName,
|
|
70
62
|
inputs: this.#getPublicBaseInputs(),
|
|
71
63
|
};
|
|
72
64
|
} else {
|
|
73
65
|
return {
|
|
74
|
-
rollupType: '
|
|
66
|
+
rollupType: 'private-base-rollup' satisfies CircuitName,
|
|
75
67
|
inputs: this.#getPrivateBaseInputs(),
|
|
76
68
|
};
|
|
77
69
|
}
|
|
78
70
|
}
|
|
79
71
|
|
|
80
|
-
public
|
|
81
|
-
|
|
82
|
-
PublicChonkVerifierPublicInputs,
|
|
83
|
-
typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
|
|
84
|
-
>,
|
|
85
|
-
) {
|
|
86
|
-
this.publicChonkVerifier = publicChonkVerifierProofAndVk;
|
|
72
|
+
public setTubeProof(tubeProofAndVk: ProofAndVerificationKey<typeof TUBE_PROOF_LENGTH>) {
|
|
73
|
+
this.tube = tubeProofAndVk;
|
|
87
74
|
}
|
|
88
75
|
|
|
89
76
|
public setAvmProof(avmProofAndVk: ProofAndVerificationKey<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>) {
|
|
@@ -91,47 +78,54 @@ export class TxProvingState {
|
|
|
91
78
|
}
|
|
92
79
|
|
|
93
80
|
#getPrivateBaseInputs() {
|
|
94
|
-
if (!
|
|
95
|
-
throw new Error('
|
|
81
|
+
if (!this.tube) {
|
|
82
|
+
throw new Error('Tx not ready for proving base rollup.');
|
|
96
83
|
}
|
|
97
84
|
|
|
98
|
-
const
|
|
85
|
+
const vkData = this.#getVkData(this.tube!.verificationKey, PRIVATE_TUBE_VK_INDEX);
|
|
86
|
+
const tubeData = new PrivateTubeData(
|
|
99
87
|
this.processedTx.data.toPrivateToRollupKernelCircuitPublicInputs(),
|
|
100
|
-
|
|
101
|
-
|
|
88
|
+
this.tube.proof,
|
|
89
|
+
vkData,
|
|
102
90
|
);
|
|
103
91
|
|
|
104
|
-
|
|
92
|
+
if (!(this.baseRollupHints instanceof PrivateBaseRollupHints)) {
|
|
93
|
+
throw new Error('Mismatched base rollup hints, expected private base rollup hints');
|
|
94
|
+
}
|
|
95
|
+
return new PrivateBaseRollupInputs(tubeData, this.baseRollupHints);
|
|
105
96
|
}
|
|
106
97
|
|
|
107
98
|
#getPublicBaseInputs() {
|
|
108
99
|
if (!this.processedTx.avmProvingRequest) {
|
|
109
100
|
throw new Error('Should create private base rollup for a tx not requiring avm proof.');
|
|
110
101
|
}
|
|
111
|
-
if (!this.
|
|
112
|
-
throw new Error('Tx not ready for proving base rollup:
|
|
102
|
+
if (!this.tube) {
|
|
103
|
+
throw new Error('Tx not ready for proving base rollup: tube proof undefined');
|
|
113
104
|
}
|
|
114
105
|
if (!this.avm) {
|
|
115
106
|
throw new Error('Tx not ready for proving base rollup: avm proof undefined');
|
|
116
107
|
}
|
|
117
|
-
if (!(this.baseRollupHints instanceof PublicBaseRollupHints)) {
|
|
118
|
-
throw new Error('Mismatched base rollup hints, expected public base rollup hints');
|
|
119
|
-
}
|
|
120
108
|
|
|
121
|
-
const
|
|
109
|
+
const tubeData = new PublicTubeData(
|
|
110
|
+
this.processedTx.data.toPrivateToPublicKernelCircuitPublicInputs(),
|
|
111
|
+
this.tube.proof,
|
|
112
|
+
this.#getVkData(this.tube!.verificationKey, PUBLIC_TUBE_VK_INDEX),
|
|
113
|
+
);
|
|
122
114
|
|
|
123
|
-
const avmProofData = new
|
|
115
|
+
const avmProofData = new AvmProofData(
|
|
124
116
|
this.processedTx.avmProvingRequest.inputs.publicInputs,
|
|
125
117
|
this.avm.proof,
|
|
126
118
|
this.#getVkData(this.avm!.verificationKey, AVM_VK_INDEX),
|
|
127
119
|
);
|
|
128
120
|
|
|
129
|
-
|
|
121
|
+
if (!(this.baseRollupHints instanceof PublicBaseRollupHints)) {
|
|
122
|
+
throw new Error('Mismatched base rollup hints, expected public base rollup hints');
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return new PublicBaseRollupInputs(tubeData, avmProofData, this.baseRollupHints);
|
|
130
126
|
}
|
|
131
127
|
|
|
132
128
|
#getVkData(verificationKey: VerificationKeyData, vkIndex: number) {
|
|
133
|
-
// TODO(#17162): Add avm vk hash to the tree and call `getVkData('AVM')` instead.
|
|
134
|
-
// Below will return a path to an empty leaf.
|
|
135
129
|
const vkPath = getVKSiblingPath(vkIndex);
|
|
136
130
|
return new VkData(verificationKey, vkIndex, vkPath);
|
|
137
131
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { BatchedBlob, FinalBlobBatchingChallenges } from '@aztec/blob-lib';
|
|
2
2
|
import type { Fr } from '@aztec/foundation/fields';
|
|
3
|
-
import type { EthAddress } from '@aztec/stdlib/block';
|
|
3
|
+
import type { EthAddress, L2Block } from '@aztec/stdlib/block';
|
|
4
4
|
import type { EpochProver } from '@aztec/stdlib/interfaces/server';
|
|
5
5
|
import type { Proof } from '@aztec/stdlib/proofs';
|
|
6
|
-
import type {
|
|
7
|
-
import type { BlockHeader, ProcessedTx, Tx } from '@aztec/stdlib/tx';
|
|
8
|
-
import type { UInt64 } from '@aztec/stdlib/types';
|
|
6
|
+
import type { RootRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
7
|
+
import type { BlockHeader, GlobalVariables, ProcessedTx, Tx } from '@aztec/stdlib/tx';
|
|
9
8
|
|
|
10
9
|
import type { ProvingOrchestrator } from '../orchestrator/orchestrator.js';
|
|
11
10
|
import type { BrokerCircuitProverFacade } from '../proving_broker/broker_prover_facade.js';
|
|
@@ -19,33 +18,17 @@ export class ServerEpochProver implements EpochProver {
|
|
|
19
18
|
|
|
20
19
|
startNewEpoch(
|
|
21
20
|
epochNumber: number,
|
|
22
|
-
|
|
21
|
+
firstBlockNumber: number,
|
|
22
|
+
totalNumBlocks: number,
|
|
23
23
|
finalBlobBatchingChallenges: FinalBlobBatchingChallenges,
|
|
24
24
|
): void {
|
|
25
|
-
this.orchestrator.startNewEpoch(epochNumber,
|
|
25
|
+
this.orchestrator.startNewEpoch(epochNumber, firstBlockNumber, totalNumBlocks, finalBlobBatchingChallenges);
|
|
26
26
|
this.facade.start();
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
constants: CheckpointConstantData,
|
|
31
|
-
l1ToL2Messages: Fr[],
|
|
32
|
-
totalNumBlocks: number,
|
|
33
|
-
totalNumBlobFields: number,
|
|
34
|
-
headerOfLastBlockInPreviousCheckpoint: BlockHeader,
|
|
35
|
-
): Promise<void> {
|
|
36
|
-
return this.orchestrator.startNewCheckpoint(
|
|
37
|
-
checkpointIndex,
|
|
38
|
-
constants,
|
|
39
|
-
l1ToL2Messages,
|
|
40
|
-
totalNumBlocks,
|
|
41
|
-
totalNumBlobFields,
|
|
42
|
-
headerOfLastBlockInPreviousCheckpoint,
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
startChonkVerifierCircuits(txs: Tx[]): Promise<void> {
|
|
46
|
-
return this.orchestrator.startChonkVerifierCircuits(txs);
|
|
28
|
+
startTubeCircuits(txs: Tx[]): Promise<void> {
|
|
29
|
+
return this.orchestrator.startTubeCircuits(txs);
|
|
47
30
|
}
|
|
48
|
-
setBlockCompleted(blockNumber: number, expectedBlockHeader?: BlockHeader): Promise<
|
|
31
|
+
setBlockCompleted(blockNumber: number, expectedBlockHeader?: BlockHeader): Promise<L2Block> {
|
|
49
32
|
return this.orchestrator.setBlockCompleted(blockNumber, expectedBlockHeader);
|
|
50
33
|
}
|
|
51
34
|
finalizeEpoch(): Promise<{ publicInputs: RootRollupPublicInputs; proof: Proof; batchedBlobInputs: BatchedBlob }> {
|
|
@@ -57,12 +40,19 @@ export class ServerEpochProver implements EpochProver {
|
|
|
57
40
|
getProverId(): EthAddress {
|
|
58
41
|
return this.orchestrator.getProverId();
|
|
59
42
|
}
|
|
43
|
+
getBlock(index: number): L2Block {
|
|
44
|
+
return this.orchestrator.getBlock(index);
|
|
45
|
+
}
|
|
60
46
|
async stop(): Promise<void> {
|
|
61
47
|
await this.facade.stop();
|
|
62
48
|
await this.orchestrator.stop();
|
|
63
49
|
}
|
|
64
|
-
startNewBlock(
|
|
65
|
-
|
|
50
|
+
startNewBlock(
|
|
51
|
+
globalVariables: GlobalVariables,
|
|
52
|
+
l1ToL2Messages: Fr[],
|
|
53
|
+
previousBlockHeader: BlockHeader,
|
|
54
|
+
): Promise<void> {
|
|
55
|
+
return this.orchestrator.startNewBlock(globalVariables, l1ToL2Messages, previousBlockHeader);
|
|
66
56
|
}
|
|
67
57
|
addTxs(txs: ProcessedTx[]): Promise<void> {
|
|
68
58
|
return this.orchestrator.addTxs(txs);
|
|
@@ -3,6 +3,7 @@ import type {
|
|
|
3
3
|
NESTED_RECURSIVE_PROOF_LENGTH,
|
|
4
4
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
5
5
|
RECURSIVE_PROOF_LENGTH,
|
|
6
|
+
TUBE_PROOF_LENGTH,
|
|
6
7
|
} from '@aztec/constants';
|
|
7
8
|
import { sha256 } from '@aztec/foundation/crypto';
|
|
8
9
|
import { Fr } from '@aztec/foundation/fields';
|
|
@@ -22,29 +23,22 @@ import {
|
|
|
22
23
|
type ServerCircuitProver,
|
|
23
24
|
makeProvingJobId,
|
|
24
25
|
} from '@aztec/stdlib/interfaces/server';
|
|
25
|
-
import type {
|
|
26
|
+
import type { BaseParityInputs, ParityPublicInputs, RootParityInputs } from '@aztec/stdlib/parity';
|
|
26
27
|
import { ProvingRequestType } from '@aztec/stdlib/proofs';
|
|
27
28
|
import type {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
CheckpointRootRollupPrivateInputs,
|
|
39
|
-
CheckpointRootSingleBlockRollupPrivateInputs,
|
|
40
|
-
PrivateTxBaseRollupPrivateInputs,
|
|
41
|
-
PublicChonkVerifierPrivateInputs,
|
|
42
|
-
PublicChonkVerifierPublicInputs,
|
|
43
|
-
PublicTxBaseRollupPrivateInputs,
|
|
44
|
-
RootRollupPrivateInputs,
|
|
29
|
+
BaseOrMergeRollupPublicInputs,
|
|
30
|
+
BlockMergeRollupInputs,
|
|
31
|
+
BlockRootOrBlockMergePublicInputs,
|
|
32
|
+
BlockRootRollupInputs,
|
|
33
|
+
EmptyBlockRootRollupInputs,
|
|
34
|
+
MergeRollupInputs,
|
|
35
|
+
PaddingBlockRootRollupInputs,
|
|
36
|
+
PrivateBaseRollupInputs,
|
|
37
|
+
PublicBaseRollupInputs,
|
|
38
|
+
RootRollupInputs,
|
|
45
39
|
RootRollupPublicInputs,
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
SingleTxBlockRootRollupInputs,
|
|
41
|
+
TubeInputs,
|
|
48
42
|
} from '@aztec/stdlib/rollup';
|
|
49
43
|
|
|
50
44
|
import { InlineProofStore, type ProofStore } from './proof_store/index.js';
|
|
@@ -418,248 +412,183 @@ export class BrokerCircuitProverFacade implements ServerCircuitProver {
|
|
|
418
412
|
}
|
|
419
413
|
|
|
420
414
|
getBaseParityProof(
|
|
421
|
-
inputs:
|
|
415
|
+
inputs: BaseParityInputs,
|
|
422
416
|
signal?: AbortSignal,
|
|
423
417
|
epochNumber?: number,
|
|
424
418
|
): Promise<PublicInputsAndRecursiveProof<ParityPublicInputs, typeof RECURSIVE_PROOF_LENGTH>> {
|
|
425
419
|
return this.enqueueJob(
|
|
426
|
-
this.generateId(ProvingRequestType.
|
|
427
|
-
ProvingRequestType.
|
|
420
|
+
this.generateId(ProvingRequestType.BASE_PARITY, inputs, epochNumber),
|
|
421
|
+
ProvingRequestType.BASE_PARITY,
|
|
428
422
|
inputs,
|
|
429
423
|
epochNumber,
|
|
430
424
|
signal,
|
|
431
425
|
);
|
|
432
426
|
}
|
|
433
427
|
|
|
434
|
-
|
|
435
|
-
input:
|
|
436
|
-
signal?: AbortSignal,
|
|
437
|
-
epochNumber?: number,
|
|
438
|
-
): Promise<PublicInputsAndRecursiveProof<TxRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
439
|
-
return this.enqueueJob(
|
|
440
|
-
this.generateId(ProvingRequestType.TX_MERGE_ROLLUP, input, epochNumber),
|
|
441
|
-
ProvingRequestType.TX_MERGE_ROLLUP,
|
|
442
|
-
input,
|
|
443
|
-
epochNumber,
|
|
444
|
-
signal,
|
|
445
|
-
);
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
getPublicChonkVerifierProof(
|
|
449
|
-
inputs: PublicChonkVerifierPrivateInputs,
|
|
428
|
+
getBlockMergeRollupProof(
|
|
429
|
+
input: BlockMergeRollupInputs,
|
|
450
430
|
signal?: AbortSignal,
|
|
451
431
|
epochNumber?: number,
|
|
452
432
|
): Promise<
|
|
453
|
-
PublicInputsAndRecursiveProof<
|
|
433
|
+
PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
454
434
|
> {
|
|
455
435
|
return this.enqueueJob(
|
|
456
|
-
this.generateId(ProvingRequestType.
|
|
457
|
-
ProvingRequestType.
|
|
458
|
-
inputs,
|
|
459
|
-
epochNumber,
|
|
460
|
-
signal,
|
|
461
|
-
);
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
getPrivateTxBaseRollupProof(
|
|
465
|
-
baseRollupInput: PrivateTxBaseRollupPrivateInputs,
|
|
466
|
-
signal?: AbortSignal,
|
|
467
|
-
epochNumber?: number,
|
|
468
|
-
): Promise<PublicInputsAndRecursiveProof<TxRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
469
|
-
return this.enqueueJob(
|
|
470
|
-
this.generateId(ProvingRequestType.PRIVATE_TX_BASE_ROLLUP, baseRollupInput, epochNumber),
|
|
471
|
-
ProvingRequestType.PRIVATE_TX_BASE_ROLLUP,
|
|
472
|
-
baseRollupInput,
|
|
473
|
-
epochNumber,
|
|
474
|
-
signal,
|
|
475
|
-
);
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
getPublicTxBaseRollupProof(
|
|
479
|
-
inputs: PublicTxBaseRollupPrivateInputs,
|
|
480
|
-
signal?: AbortSignal,
|
|
481
|
-
epochNumber?: number,
|
|
482
|
-
): Promise<PublicInputsAndRecursiveProof<TxRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
483
|
-
return this.enqueueJob(
|
|
484
|
-
this.generateId(ProvingRequestType.PUBLIC_TX_BASE_ROLLUP, inputs, epochNumber),
|
|
485
|
-
ProvingRequestType.PUBLIC_TX_BASE_ROLLUP,
|
|
486
|
-
inputs,
|
|
487
|
-
epochNumber,
|
|
488
|
-
signal,
|
|
489
|
-
);
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
getRootParityProof(
|
|
493
|
-
inputs: ParityRootPrivateInputs,
|
|
494
|
-
signal?: AbortSignal,
|
|
495
|
-
epochNumber?: number,
|
|
496
|
-
): Promise<PublicInputsAndRecursiveProof<ParityPublicInputs, typeof NESTED_RECURSIVE_PROOF_LENGTH>> {
|
|
497
|
-
return this.enqueueJob(
|
|
498
|
-
this.generateId(ProvingRequestType.PARITY_ROOT, inputs, epochNumber),
|
|
499
|
-
ProvingRequestType.PARITY_ROOT,
|
|
500
|
-
inputs,
|
|
501
|
-
epochNumber,
|
|
502
|
-
signal,
|
|
503
|
-
);
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
getBlockRootFirstRollupProof(
|
|
507
|
-
input: BlockRootFirstRollupPrivateInputs,
|
|
508
|
-
signal?: AbortSignal,
|
|
509
|
-
epochNumber?: number,
|
|
510
|
-
): Promise<PublicInputsAndRecursiveProof<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>> {
|
|
511
|
-
return this.enqueueJob(
|
|
512
|
-
this.generateId(ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP, input, epochNumber),
|
|
513
|
-
ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP,
|
|
436
|
+
this.generateId(ProvingRequestType.BLOCK_MERGE_ROLLUP, input, epochNumber),
|
|
437
|
+
ProvingRequestType.BLOCK_MERGE_ROLLUP,
|
|
514
438
|
input,
|
|
515
439
|
epochNumber,
|
|
516
440
|
signal,
|
|
517
441
|
);
|
|
518
442
|
}
|
|
519
443
|
|
|
520
|
-
|
|
521
|
-
input:
|
|
444
|
+
getBlockRootRollupProof(
|
|
445
|
+
input: BlockRootRollupInputs,
|
|
522
446
|
signal?: AbortSignal,
|
|
523
447
|
epochNumber?: number,
|
|
524
|
-
): Promise<
|
|
448
|
+
): Promise<
|
|
449
|
+
PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
450
|
+
> {
|
|
525
451
|
return this.enqueueJob(
|
|
526
|
-
this.generateId(ProvingRequestType.
|
|
527
|
-
ProvingRequestType.
|
|
452
|
+
this.generateId(ProvingRequestType.BLOCK_ROOT_ROLLUP, input, epochNumber),
|
|
453
|
+
ProvingRequestType.BLOCK_ROOT_ROLLUP,
|
|
528
454
|
input,
|
|
529
455
|
epochNumber,
|
|
530
456
|
signal,
|
|
531
457
|
);
|
|
532
458
|
}
|
|
533
459
|
|
|
534
|
-
|
|
535
|
-
input:
|
|
460
|
+
getSingleTxBlockRootRollupProof(
|
|
461
|
+
input: SingleTxBlockRootRollupInputs,
|
|
536
462
|
signal?: AbortSignal,
|
|
537
463
|
epochNumber?: number,
|
|
538
|
-
): Promise<
|
|
464
|
+
): Promise<
|
|
465
|
+
PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
466
|
+
> {
|
|
539
467
|
return this.enqueueJob(
|
|
540
|
-
this.generateId(ProvingRequestType.
|
|
541
|
-
ProvingRequestType.
|
|
468
|
+
this.generateId(ProvingRequestType.BLOCK_ROOT_ROLLUP, input, epochNumber),
|
|
469
|
+
ProvingRequestType.SINGLE_TX_BLOCK_ROOT_ROLLUP,
|
|
542
470
|
input,
|
|
543
471
|
epochNumber,
|
|
544
472
|
signal,
|
|
545
473
|
);
|
|
546
474
|
}
|
|
547
475
|
|
|
548
|
-
|
|
549
|
-
input:
|
|
476
|
+
getEmptyBlockRootRollupProof(
|
|
477
|
+
input: EmptyBlockRootRollupInputs,
|
|
550
478
|
signal?: AbortSignal,
|
|
551
479
|
epochNumber?: number,
|
|
552
|
-
): Promise<
|
|
480
|
+
): Promise<
|
|
481
|
+
PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
482
|
+
> {
|
|
553
483
|
return this.enqueueJob(
|
|
554
|
-
this.generateId(ProvingRequestType.
|
|
555
|
-
ProvingRequestType.
|
|
484
|
+
this.generateId(ProvingRequestType.EMPTY_BLOCK_ROOT_ROLLUP, input, epochNumber),
|
|
485
|
+
ProvingRequestType.EMPTY_BLOCK_ROOT_ROLLUP,
|
|
556
486
|
input,
|
|
557
487
|
epochNumber,
|
|
558
488
|
signal,
|
|
559
489
|
);
|
|
560
490
|
}
|
|
561
491
|
|
|
562
|
-
|
|
563
|
-
input:
|
|
492
|
+
getPaddingBlockRootRollupProof(
|
|
493
|
+
input: PaddingBlockRootRollupInputs,
|
|
564
494
|
signal?: AbortSignal,
|
|
565
495
|
epochNumber?: number,
|
|
566
|
-
): Promise<
|
|
496
|
+
): Promise<
|
|
497
|
+
PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
498
|
+
> {
|
|
567
499
|
return this.enqueueJob(
|
|
568
|
-
this.generateId(ProvingRequestType.
|
|
569
|
-
ProvingRequestType.
|
|
500
|
+
this.generateId(ProvingRequestType.PADDING_BLOCK_ROOT_ROLLUP, input, epochNumber),
|
|
501
|
+
ProvingRequestType.PADDING_BLOCK_ROOT_ROLLUP,
|
|
570
502
|
input,
|
|
571
503
|
epochNumber,
|
|
572
504
|
signal,
|
|
573
505
|
);
|
|
574
506
|
}
|
|
575
507
|
|
|
576
|
-
|
|
577
|
-
input:
|
|
508
|
+
getMergeRollupProof(
|
|
509
|
+
input: MergeRollupInputs,
|
|
578
510
|
signal?: AbortSignal,
|
|
579
511
|
epochNumber?: number,
|
|
580
|
-
): Promise<
|
|
512
|
+
): Promise<
|
|
513
|
+
PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
514
|
+
> {
|
|
581
515
|
return this.enqueueJob(
|
|
582
|
-
this.generateId(ProvingRequestType.
|
|
583
|
-
ProvingRequestType.
|
|
516
|
+
this.generateId(ProvingRequestType.MERGE_ROLLUP, input, epochNumber),
|
|
517
|
+
ProvingRequestType.MERGE_ROLLUP,
|
|
584
518
|
input,
|
|
585
519
|
epochNumber,
|
|
586
520
|
signal,
|
|
587
521
|
);
|
|
588
522
|
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
input: CheckpointRootRollupPrivateInputs,
|
|
523
|
+
getPrivateBaseRollupProof(
|
|
524
|
+
baseRollupInput: PrivateBaseRollupInputs,
|
|
592
525
|
signal?: AbortSignal,
|
|
593
526
|
epochNumber?: number,
|
|
594
527
|
): Promise<
|
|
595
|
-
PublicInputsAndRecursiveProof<
|
|
528
|
+
PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
596
529
|
> {
|
|
597
530
|
return this.enqueueJob(
|
|
598
|
-
this.generateId(ProvingRequestType.
|
|
599
|
-
ProvingRequestType.
|
|
600
|
-
|
|
531
|
+
this.generateId(ProvingRequestType.PRIVATE_BASE_ROLLUP, baseRollupInput, epochNumber),
|
|
532
|
+
ProvingRequestType.PRIVATE_BASE_ROLLUP,
|
|
533
|
+
baseRollupInput,
|
|
601
534
|
epochNumber,
|
|
602
535
|
signal,
|
|
603
536
|
);
|
|
604
537
|
}
|
|
605
538
|
|
|
606
|
-
|
|
607
|
-
|
|
539
|
+
getPublicBaseRollupProof(
|
|
540
|
+
inputs: PublicBaseRollupInputs,
|
|
608
541
|
signal?: AbortSignal,
|
|
609
542
|
epochNumber?: number,
|
|
610
543
|
): Promise<
|
|
611
|
-
PublicInputsAndRecursiveProof<
|
|
544
|
+
PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
612
545
|
> {
|
|
613
546
|
return this.enqueueJob(
|
|
614
|
-
this.generateId(ProvingRequestType.
|
|
615
|
-
ProvingRequestType.
|
|
616
|
-
|
|
547
|
+
this.generateId(ProvingRequestType.PUBLIC_BASE_ROLLUP, inputs, epochNumber),
|
|
548
|
+
ProvingRequestType.PUBLIC_BASE_ROLLUP,
|
|
549
|
+
inputs,
|
|
617
550
|
epochNumber,
|
|
618
551
|
signal,
|
|
619
552
|
);
|
|
620
553
|
}
|
|
621
554
|
|
|
622
|
-
|
|
623
|
-
|
|
555
|
+
getRootParityProof(
|
|
556
|
+
inputs: RootParityInputs,
|
|
624
557
|
signal?: AbortSignal,
|
|
625
558
|
epochNumber?: number,
|
|
626
|
-
): Promise<
|
|
627
|
-
PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
628
|
-
> {
|
|
559
|
+
): Promise<PublicInputsAndRecursiveProof<ParityPublicInputs, typeof NESTED_RECURSIVE_PROOF_LENGTH>> {
|
|
629
560
|
return this.enqueueJob(
|
|
630
|
-
this.generateId(ProvingRequestType.
|
|
631
|
-
ProvingRequestType.
|
|
632
|
-
|
|
561
|
+
this.generateId(ProvingRequestType.ROOT_PARITY, inputs, epochNumber),
|
|
562
|
+
ProvingRequestType.ROOT_PARITY,
|
|
563
|
+
inputs,
|
|
633
564
|
epochNumber,
|
|
634
565
|
signal,
|
|
635
566
|
);
|
|
636
567
|
}
|
|
637
568
|
|
|
638
|
-
|
|
639
|
-
input:
|
|
569
|
+
getRootRollupProof(
|
|
570
|
+
input: RootRollupInputs,
|
|
640
571
|
signal?: AbortSignal,
|
|
641
572
|
epochNumber?: number,
|
|
642
|
-
): Promise<
|
|
643
|
-
PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
|
|
644
|
-
> {
|
|
573
|
+
): Promise<PublicInputsAndRecursiveProof<RootRollupPublicInputs, typeof RECURSIVE_PROOF_LENGTH>> {
|
|
645
574
|
return this.enqueueJob(
|
|
646
|
-
this.generateId(ProvingRequestType.
|
|
647
|
-
ProvingRequestType.
|
|
575
|
+
this.generateId(ProvingRequestType.ROOT_ROLLUP, input, epochNumber),
|
|
576
|
+
ProvingRequestType.ROOT_ROLLUP,
|
|
648
577
|
input,
|
|
649
578
|
epochNumber,
|
|
650
579
|
signal,
|
|
651
580
|
);
|
|
652
581
|
}
|
|
653
582
|
|
|
654
|
-
|
|
655
|
-
|
|
583
|
+
getTubeProof(
|
|
584
|
+
tubeInput: TubeInputs,
|
|
656
585
|
signal?: AbortSignal,
|
|
657
586
|
epochNumber?: number,
|
|
658
|
-
): Promise<
|
|
587
|
+
): Promise<ProofAndVerificationKey<typeof TUBE_PROOF_LENGTH>> {
|
|
659
588
|
return this.enqueueJob(
|
|
660
|
-
this.generateId(ProvingRequestType.
|
|
661
|
-
ProvingRequestType.
|
|
662
|
-
|
|
589
|
+
this.generateId(ProvingRequestType.TUBE_PROOF, tubeInput, epochNumber),
|
|
590
|
+
ProvingRequestType.TUBE_PROOF,
|
|
591
|
+
tubeInput,
|
|
663
592
|
epochNumber,
|
|
664
593
|
signal,
|
|
665
594
|
);
|
|
@@ -3,7 +3,7 @@ import { type ProofUri, type ProvingJobId, makeProvingJobId } from '@aztec/stdli
|
|
|
3
3
|
import { ProvingRequestType } from '@aztec/stdlib/proofs';
|
|
4
4
|
|
|
5
5
|
export function makeRandomProvingJobId(epochNumber?: number): ProvingJobId {
|
|
6
|
-
return makeProvingJobId(epochNumber ?? 1, ProvingRequestType.
|
|
6
|
+
return makeProvingJobId(epochNumber ?? 1, ProvingRequestType.BASE_PARITY, randomBytes(8).toString('hex'));
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export function makeInputsUri(): ProofUri {
|