@aztec/prover-client 0.0.1-commit.f2ce05ee → 0.0.1-commit.f5a9928
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/config.d.ts +1 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +16 -2
- package/dest/light/lightweight_checkpoint_builder.d.ts +10 -5
- package/dest/light/lightweight_checkpoint_builder.d.ts.map +1 -1
- package/dest/light/lightweight_checkpoint_builder.js +56 -23
- package/dest/mocks/test_context.d.ts +11 -11
- package/dest/mocks/test_context.d.ts.map +1 -1
- package/dest/mocks/test_context.js +30 -30
- package/dest/orchestrator/block-building-helpers.d.ts +4 -4
- package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
- package/dest/orchestrator/block-building-helpers.js +2 -2
- package/dest/orchestrator/block-proving-state.d.ts +4 -1
- package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/block-proving-state.js +7 -0
- package/dest/orchestrator/checkpoint-proving-state.d.ts +20 -36
- package/dest/orchestrator/checkpoint-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/checkpoint-proving-state.js +22 -120
- package/dest/orchestrator/checkpoint-sub-tree-orchestrator.d.ts +161 -0
- package/dest/orchestrator/checkpoint-sub-tree-orchestrator.d.ts.map +1 -0
- package/dest/orchestrator/{orchestrator.js → checkpoint-sub-tree-orchestrator.js} +285 -462
- package/dest/orchestrator/chonk-cache.d.ts +39 -0
- package/dest/orchestrator/chonk-cache.d.ts.map +1 -0
- package/dest/orchestrator/chonk-cache.js +80 -0
- package/dest/orchestrator/index.d.ts +4 -2
- package/dest/orchestrator/index.d.ts.map +1 -1
- package/dest/orchestrator/index.js +3 -1
- package/dest/orchestrator/proving-scheduler.d.ts +81 -0
- package/dest/orchestrator/proving-scheduler.d.ts.map +1 -0
- package/dest/orchestrator/proving-scheduler.js +120 -0
- package/dest/orchestrator/top-tree-orchestrator.d.ts +88 -0
- package/dest/orchestrator/top-tree-orchestrator.d.ts.map +1 -0
- package/dest/orchestrator/top-tree-orchestrator.js +232 -0
- package/dest/orchestrator/top-tree-proving-state.d.ts +61 -0
- package/dest/orchestrator/top-tree-proving-state.d.ts.map +1 -0
- package/dest/orchestrator/top-tree-proving-state.js +185 -0
- package/dest/orchestrator/tx-proving-state.d.ts +3 -3
- package/dest/orchestrator/tx-proving-state.d.ts.map +1 -1
- package/dest/prover-client/prover-client.d.ts +62 -5
- package/dest/prover-client/prover-client.d.ts.map +1 -1
- package/dest/prover-client/prover-client.js +54 -7
- package/dest/proving_broker/broker_prover_facade.d.ts +3 -3
- package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
- package/dest/proving_broker/broker_prover_facade.js +26 -20
- package/dest/proving_broker/config.d.ts +9 -73
- package/dest/proving_broker/config.d.ts.map +1 -1
- package/dest/proving_broker/config.js +3 -3
- package/dest/proving_broker/index.d.ts +2 -1
- package/dest/proving_broker/index.d.ts.map +1 -1
- package/dest/proving_broker/index.js +1 -0
- package/dest/proving_broker/proving_broker.d.ts +3 -2
- package/dest/proving_broker/proving_broker.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker.js +217 -70
- package/dest/proving_broker/proving_broker_database/memory.d.ts +5 -2
- package/dest/proving_broker/proving_broker_database/memory.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker_database/memory.js +14 -1
- package/dest/proving_broker/proving_broker_database/persisted.d.ts +15 -2
- package/dest/proving_broker/proving_broker_database/persisted.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker_database/persisted.js +57 -6
- package/dest/proving_broker/proving_broker_database.d.ts +27 -1
- package/dest/proving_broker/proving_broker_database.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker_instrumentation.d.ts +3 -1
- package/dest/proving_broker/proving_broker_instrumentation.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker_instrumentation.js +7 -0
- package/dest/proving_broker/rpc.d.ts +3 -1
- package/dest/proving_broker/rpc.d.ts.map +1 -1
- package/dest/proving_broker/rpc.js +80 -24
- package/dest/test/epoch_settlement.d.ts +36 -0
- package/dest/test/epoch_settlement.d.ts.map +1 -0
- package/dest/test/epoch_settlement.js +52 -0
- package/dest/test/index.d.ts +2 -0
- package/dest/test/index.d.ts.map +1 -0
- package/dest/test/index.js +1 -0
- package/dest/test/mock_prover.d.ts +4 -4
- package/dest/test/mock_prover.js +2 -2
- package/package.json +20 -20
- package/src/config.ts +18 -2
- package/src/light/lightweight_checkpoint_builder.ts +58 -25
- package/src/mocks/test_context.ts +26 -43
- package/src/orchestrator/block-building-helpers.ts +2 -2
- package/src/orchestrator/block-proving-state.ts +9 -0
- package/src/orchestrator/checkpoint-proving-state.ts +21 -162
- package/src/orchestrator/checkpoint-sub-tree-orchestrator.ts +1044 -0
- package/src/orchestrator/chonk-cache.ts +99 -0
- package/src/orchestrator/index.ts +8 -1
- package/src/orchestrator/proving-scheduler.ts +160 -0
- package/src/orchestrator/top-tree-orchestrator.ts +384 -0
- package/src/orchestrator/top-tree-proving-state.ts +219 -0
- package/src/orchestrator/tx-proving-state.ts +3 -3
- package/src/prover-client/prover-client.ts +129 -18
- package/src/proving_broker/broker_prover_facade.ts +29 -23
- package/src/proving_broker/config.ts +3 -2
- package/src/proving_broker/index.ts +1 -0
- package/src/proving_broker/proving_broker.ts +208 -72
- package/src/proving_broker/proving_broker_database/memory.ts +16 -2
- package/src/proving_broker/proving_broker_database/persisted.ts +71 -8
- package/src/proving_broker/proving_broker_database.ts +30 -0
- package/src/proving_broker/proving_broker_instrumentation.ts +9 -0
- package/src/proving_broker/rpc.ts +36 -24
- package/src/test/epoch_settlement.ts +82 -0
- package/src/test/index.ts +1 -0
- package/src/test/mock_prover.ts +2 -2
- package/dest/orchestrator/epoch-proving-state.d.ts +0 -75
- package/dest/orchestrator/epoch-proving-state.d.ts.map +0 -1
- package/dest/orchestrator/epoch-proving-state.js +0 -267
- package/dest/orchestrator/orchestrator.d.ts +0 -128
- package/dest/orchestrator/orchestrator.d.ts.map +0 -1
- package/dest/prover-client/server-epoch-prover.d.ts +0 -32
- package/dest/prover-client/server-epoch-prover.d.ts.map +0 -1
- package/dest/prover-client/server-epoch-prover.js +0 -40
- package/src/orchestrator/epoch-proving-state.ts +0 -378
- package/src/orchestrator/orchestrator.ts +0 -1281
- package/src/prover-client/server-epoch-prover.ts +0 -69
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { BatchedBlob, FinalBlobBatchingChallenges } from '@aztec/blob-lib/types';
|
|
2
|
-
import { BlockNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
3
|
-
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
-
import type { EthAddress } from '@aztec/stdlib/block';
|
|
5
|
-
import type { EpochProver } from '@aztec/stdlib/interfaces/server';
|
|
6
|
-
import type { Proof } from '@aztec/stdlib/proofs';
|
|
7
|
-
import type { CheckpointConstantData, RootRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
8
|
-
import type { BlockHeader, ProcessedTx, Tx } from '@aztec/stdlib/tx';
|
|
9
|
-
import type { UInt64 } from '@aztec/stdlib/types';
|
|
10
|
-
|
|
11
|
-
import type { ProvingOrchestrator } from '../orchestrator/orchestrator.js';
|
|
12
|
-
import type { BrokerCircuitProverFacade } from '../proving_broker/broker_prover_facade.js';
|
|
13
|
-
|
|
14
|
-
/** Encapsulates the proving orchestrator and the broker facade */
|
|
15
|
-
export class ServerEpochProver implements EpochProver {
|
|
16
|
-
constructor(
|
|
17
|
-
private facade: BrokerCircuitProverFacade,
|
|
18
|
-
private orchestrator: ProvingOrchestrator,
|
|
19
|
-
) {}
|
|
20
|
-
|
|
21
|
-
startNewEpoch(
|
|
22
|
-
epochNumber: EpochNumber,
|
|
23
|
-
totalNumCheckpoints: number,
|
|
24
|
-
finalBlobBatchingChallenges: FinalBlobBatchingChallenges,
|
|
25
|
-
): void {
|
|
26
|
-
this.orchestrator.startNewEpoch(epochNumber, totalNumCheckpoints, finalBlobBatchingChallenges);
|
|
27
|
-
this.facade.start();
|
|
28
|
-
}
|
|
29
|
-
startNewCheckpoint(
|
|
30
|
-
checkpointIndex: number,
|
|
31
|
-
constants: CheckpointConstantData,
|
|
32
|
-
l1ToL2Messages: Fr[],
|
|
33
|
-
totalNumBlocks: number,
|
|
34
|
-
headerOfLastBlockInPreviousCheckpoint: BlockHeader,
|
|
35
|
-
): Promise<void> {
|
|
36
|
-
return this.orchestrator.startNewCheckpoint(
|
|
37
|
-
checkpointIndex,
|
|
38
|
-
constants,
|
|
39
|
-
l1ToL2Messages,
|
|
40
|
-
totalNumBlocks,
|
|
41
|
-
headerOfLastBlockInPreviousCheckpoint,
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
startChonkVerifierCircuits(txs: Tx[]): Promise<void> {
|
|
45
|
-
return this.orchestrator.startChonkVerifierCircuits(txs);
|
|
46
|
-
}
|
|
47
|
-
setBlockCompleted(blockNumber: BlockNumber, expectedBlockHeader?: BlockHeader): Promise<BlockHeader> {
|
|
48
|
-
return this.orchestrator.setBlockCompleted(blockNumber, expectedBlockHeader);
|
|
49
|
-
}
|
|
50
|
-
finalizeEpoch(): Promise<{ publicInputs: RootRollupPublicInputs; proof: Proof; batchedBlobInputs: BatchedBlob }> {
|
|
51
|
-
return this.orchestrator.finalizeEpoch();
|
|
52
|
-
}
|
|
53
|
-
cancel(): void {
|
|
54
|
-
this.orchestrator.cancel();
|
|
55
|
-
}
|
|
56
|
-
getProverId(): EthAddress {
|
|
57
|
-
return this.orchestrator.getProverId();
|
|
58
|
-
}
|
|
59
|
-
async stop(): Promise<void> {
|
|
60
|
-
await this.facade.stop();
|
|
61
|
-
await this.orchestrator.stop();
|
|
62
|
-
}
|
|
63
|
-
startNewBlock(blockNumber: BlockNumber, timestamp: UInt64, totalNumTxs: number): Promise<void> {
|
|
64
|
-
return this.orchestrator.startNewBlock(blockNumber, timestamp, totalNumTxs);
|
|
65
|
-
}
|
|
66
|
-
addTxs(txs: ProcessedTx[]): Promise<void> {
|
|
67
|
-
return this.orchestrator.addTxs(txs);
|
|
68
|
-
}
|
|
69
|
-
}
|