@aztec/prover-client 0.0.1-commit.b655e406 → 0.0.1-commit.b8a057fa

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.
Files changed (178) hide show
  1. package/dest/config.d.ts +2 -2
  2. package/dest/config.d.ts.map +1 -1
  3. package/dest/config.js +17 -3
  4. package/dest/index.d.ts +1 -1
  5. package/dest/light/index.d.ts +2 -0
  6. package/dest/light/index.d.ts.map +1 -0
  7. package/dest/light/index.js +1 -0
  8. package/dest/light/lightweight_checkpoint_builder.d.ts +52 -0
  9. package/dest/light/lightweight_checkpoint_builder.d.ts.map +1 -0
  10. package/dest/light/lightweight_checkpoint_builder.js +233 -0
  11. package/dest/mocks/fixtures.d.ts +1 -4
  12. package/dest/mocks/fixtures.d.ts.map +1 -1
  13. package/dest/mocks/fixtures.js +9 -18
  14. package/dest/mocks/test_context.d.ts +38 -55
  15. package/dest/mocks/test_context.d.ts.map +1 -1
  16. package/dest/mocks/test_context.js +143 -142
  17. package/dest/orchestrator/block-building-helpers.d.ts +18 -20
  18. package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
  19. package/dest/orchestrator/block-building-helpers.js +90 -115
  20. package/dest/orchestrator/block-proving-state.d.ts +20 -11
  21. package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
  22. package/dest/orchestrator/block-proving-state.js +87 -19
  23. package/dest/orchestrator/checkpoint-proving-state.d.ts +24 -27
  24. package/dest/orchestrator/checkpoint-proving-state.d.ts.map +1 -1
  25. package/dest/orchestrator/checkpoint-proving-state.js +28 -94
  26. package/dest/orchestrator/checkpoint-sub-tree-orchestrator.d.ts +161 -0
  27. package/dest/orchestrator/checkpoint-sub-tree-orchestrator.d.ts.map +1 -0
  28. package/dest/orchestrator/checkpoint-sub-tree-orchestrator.js +1066 -0
  29. package/dest/orchestrator/chonk-cache.d.ts +39 -0
  30. package/dest/orchestrator/chonk-cache.d.ts.map +1 -0
  31. package/dest/orchestrator/chonk-cache.js +80 -0
  32. package/dest/orchestrator/index.d.ts +4 -2
  33. package/dest/orchestrator/index.d.ts.map +1 -1
  34. package/dest/orchestrator/index.js +3 -1
  35. package/dest/orchestrator/orchestrator_metrics.d.ts +1 -3
  36. package/dest/orchestrator/orchestrator_metrics.d.ts.map +1 -1
  37. package/dest/orchestrator/orchestrator_metrics.js +2 -15
  38. package/dest/orchestrator/proving-scheduler.d.ts +81 -0
  39. package/dest/orchestrator/proving-scheduler.d.ts.map +1 -0
  40. package/dest/orchestrator/proving-scheduler.js +120 -0
  41. package/dest/orchestrator/top-tree-orchestrator.d.ts +88 -0
  42. package/dest/orchestrator/top-tree-orchestrator.d.ts.map +1 -0
  43. package/dest/orchestrator/top-tree-orchestrator.js +232 -0
  44. package/dest/orchestrator/top-tree-proving-state.d.ts +61 -0
  45. package/dest/orchestrator/top-tree-proving-state.d.ts.map +1 -0
  46. package/dest/orchestrator/top-tree-proving-state.js +185 -0
  47. package/dest/orchestrator/tx-proving-state.d.ts +7 -6
  48. package/dest/orchestrator/tx-proving-state.d.ts.map +1 -1
  49. package/dest/orchestrator/tx-proving-state.js +7 -16
  50. package/dest/prover-client/factory.d.ts +3 -3
  51. package/dest/prover-client/factory.d.ts.map +1 -1
  52. package/dest/prover-client/index.d.ts +1 -1
  53. package/dest/prover-client/prover-client.d.ts +65 -8
  54. package/dest/prover-client/prover-client.d.ts.map +1 -1
  55. package/dest/prover-client/prover-client.js +66 -14
  56. package/dest/proving_broker/broker_prover_facade.d.ts +26 -24
  57. package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
  58. package/dest/proving_broker/broker_prover_facade.js +21 -33
  59. package/dest/proving_broker/config.d.ts +14 -62
  60. package/dest/proving_broker/config.d.ts.map +1 -1
  61. package/dest/proving_broker/config.js +29 -6
  62. package/dest/proving_broker/factory.d.ts +1 -1
  63. package/dest/proving_broker/fixtures.d.ts +3 -2
  64. package/dest/proving_broker/fixtures.d.ts.map +1 -1
  65. package/dest/proving_broker/fixtures.js +3 -2
  66. package/dest/proving_broker/index.d.ts +2 -1
  67. package/dest/proving_broker/index.d.ts.map +1 -1
  68. package/dest/proving_broker/index.js +1 -0
  69. package/dest/proving_broker/proof_store/factory.d.ts +2 -5
  70. package/dest/proving_broker/proof_store/factory.d.ts.map +1 -1
  71. package/dest/proving_broker/proof_store/factory.js +7 -30
  72. package/dest/proving_broker/proof_store/file_store_proof_store.d.ts +18 -0
  73. package/dest/proving_broker/proof_store/file_store_proof_store.d.ts.map +1 -0
  74. package/dest/proving_broker/proof_store/file_store_proof_store.js +60 -0
  75. package/dest/proving_broker/proof_store/index.d.ts +2 -2
  76. package/dest/proving_broker/proof_store/index.d.ts.map +1 -1
  77. package/dest/proving_broker/proof_store/index.js +1 -1
  78. package/dest/proving_broker/proof_store/inline_proof_store.d.ts +1 -1
  79. package/dest/proving_broker/proof_store/inline_proof_store.d.ts.map +1 -1
  80. package/dest/proving_broker/proof_store/proof_store.d.ts +1 -1
  81. package/dest/proving_broker/proving_agent.d.ts +5 -9
  82. package/dest/proving_broker/proving_agent.d.ts.map +1 -1
  83. package/dest/proving_broker/proving_agent.js +4 -19
  84. package/dest/proving_broker/proving_broker.d.ts +8 -5
  85. package/dest/proving_broker/proving_broker.d.ts.map +1 -1
  86. package/dest/proving_broker/proving_broker.js +74 -22
  87. package/dest/proving_broker/proving_broker_database/memory.d.ts +3 -2
  88. package/dest/proving_broker/proving_broker_database/memory.d.ts.map +1 -1
  89. package/dest/proving_broker/proving_broker_database/persisted.d.ts +5 -3
  90. package/dest/proving_broker/proving_broker_database/persisted.d.ts.map +1 -1
  91. package/dest/proving_broker/proving_broker_database/persisted.js +394 -5
  92. package/dest/proving_broker/proving_broker_database.d.ts +3 -2
  93. package/dest/proving_broker/proving_broker_database.d.ts.map +1 -1
  94. package/dest/proving_broker/proving_broker_instrumentation.d.ts +3 -1
  95. package/dest/proving_broker/proving_broker_instrumentation.d.ts.map +1 -1
  96. package/dest/proving_broker/proving_broker_instrumentation.js +22 -35
  97. package/dest/proving_broker/proving_job_controller.d.ts +5 -3
  98. package/dest/proving_broker/proving_job_controller.d.ts.map +1 -1
  99. package/dest/proving_broker/proving_job_controller.js +8 -6
  100. package/dest/proving_broker/rpc.d.ts +9 -5
  101. package/dest/proving_broker/rpc.d.ts.map +1 -1
  102. package/dest/proving_broker/rpc.js +87 -23
  103. package/dest/test/epoch_settlement.d.ts +36 -0
  104. package/dest/test/epoch_settlement.d.ts.map +1 -0
  105. package/dest/test/epoch_settlement.js +52 -0
  106. package/dest/test/index.d.ts +2 -0
  107. package/dest/test/index.d.ts.map +1 -0
  108. package/dest/test/index.js +1 -0
  109. package/dest/test/mock_proof_store.d.ts +1 -1
  110. package/dest/test/mock_proof_store.d.ts.map +1 -1
  111. package/dest/test/mock_prover.d.ts +5 -6
  112. package/dest/test/mock_prover.d.ts.map +1 -1
  113. package/dest/test/mock_prover.js +4 -4
  114. package/package.json +25 -23
  115. package/src/config.ts +19 -3
  116. package/src/light/index.ts +1 -0
  117. package/src/light/lightweight_checkpoint_builder.ts +322 -0
  118. package/src/mocks/fixtures.ts +9 -31
  119. package/src/mocks/test_context.ts +182 -217
  120. package/src/orchestrator/block-building-helpers.ts +129 -209
  121. package/src/orchestrator/block-proving-state.ts +109 -22
  122. package/src/orchestrator/checkpoint-proving-state.ts +32 -123
  123. package/src/orchestrator/checkpoint-sub-tree-orchestrator.ts +1044 -0
  124. package/src/orchestrator/chonk-cache.ts +99 -0
  125. package/src/orchestrator/index.ts +8 -1
  126. package/src/orchestrator/orchestrator_metrics.ts +2 -25
  127. package/src/orchestrator/proving-scheduler.ts +160 -0
  128. package/src/orchestrator/top-tree-orchestrator.ts +384 -0
  129. package/src/orchestrator/top-tree-proving-state.ts +219 -0
  130. package/src/orchestrator/tx-proving-state.ts +10 -27
  131. package/src/prover-client/factory.ts +6 -2
  132. package/src/prover-client/prover-client.ts +148 -29
  133. package/src/proving_broker/broker_prover_facade.ts +47 -56
  134. package/src/proving_broker/config.ts +33 -3
  135. package/src/proving_broker/fixtures.ts +8 -3
  136. package/src/proving_broker/index.ts +1 -0
  137. package/src/proving_broker/proof_store/factory.ts +10 -32
  138. package/src/proving_broker/proof_store/file_store_proof_store.ts +78 -0
  139. package/src/proving_broker/proof_store/index.ts +1 -1
  140. package/src/proving_broker/proving_agent.ts +6 -19
  141. package/src/proving_broker/proving_broker.ts +70 -17
  142. package/src/proving_broker/proving_broker_database/memory.ts +2 -1
  143. package/src/proving_broker/proving_broker_database/persisted.ts +22 -7
  144. package/src/proving_broker/proving_broker_database.ts +2 -1
  145. package/src/proving_broker/proving_broker_instrumentation.ts +23 -35
  146. package/src/proving_broker/proving_job_controller.ts +13 -7
  147. package/src/proving_broker/rpc.ts +46 -20
  148. package/src/test/epoch_settlement.ts +82 -0
  149. package/src/test/index.ts +1 -0
  150. package/src/test/mock_prover.ts +3 -15
  151. package/dest/block-factory/index.d.ts +0 -2
  152. package/dest/block-factory/index.d.ts.map +0 -1
  153. package/dest/block-factory/index.js +0 -1
  154. package/dest/block-factory/light.d.ts +0 -38
  155. package/dest/block-factory/light.d.ts.map +0 -1
  156. package/dest/block-factory/light.js +0 -94
  157. package/dest/orchestrator/epoch-proving-state.d.ts +0 -73
  158. package/dest/orchestrator/epoch-proving-state.d.ts.map +0 -1
  159. package/dest/orchestrator/epoch-proving-state.js +0 -233
  160. package/dest/orchestrator/orchestrator.d.ts +0 -113
  161. package/dest/orchestrator/orchestrator.d.ts.map +0 -1
  162. package/dest/orchestrator/orchestrator.js +0 -848
  163. package/dest/prover-client/server-epoch-prover.d.ts +0 -31
  164. package/dest/prover-client/server-epoch-prover.d.ts.map +0 -1
  165. package/dest/prover-client/server-epoch-prover.js +0 -40
  166. package/dest/proving_broker/proof_store/gcs_proof_store.d.ts +0 -14
  167. package/dest/proving_broker/proof_store/gcs_proof_store.d.ts.map +0 -1
  168. package/dest/proving_broker/proof_store/gcs_proof_store.js +0 -52
  169. package/dest/proving_broker/proving_agent_instrumentation.d.ts +0 -8
  170. package/dest/proving_broker/proving_agent_instrumentation.d.ts.map +0 -1
  171. package/dest/proving_broker/proving_agent_instrumentation.js +0 -16
  172. package/src/block-factory/index.ts +0 -1
  173. package/src/block-factory/light.ts +0 -140
  174. package/src/orchestrator/epoch-proving-state.ts +0 -328
  175. package/src/orchestrator/orchestrator.ts +0 -1272
  176. package/src/prover-client/server-epoch-prover.ts +0 -70
  177. package/src/proving_broker/proof_store/gcs_proof_store.ts +0 -76
  178. package/src/proving_broker/proving_agent_instrumentation.ts +0 -21
@@ -1,57 +1,37 @@
1
- import { BatchedBlobAccumulator, type FinalBlobBatchingChallenges, SpongeBlob } from '@aztec/blob-lib';
1
+ import { SpongeBlob } from '@aztec/blob-lib';
2
2
  import {
3
3
  type ARCHIVE_HEIGHT,
4
- BLOBS_PER_BLOCK,
5
- FIELDS_PER_BLOB,
6
4
  type L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH,
7
5
  type NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
8
6
  NUM_MSGS_PER_BASE_PARITY,
9
7
  } from '@aztec/constants';
8
+ import { BlockNumber } from '@aztec/foundation/branded-types';
10
9
  import { padArrayEnd } from '@aztec/foundation/collection';
11
- import { BLS12Point, Fr } from '@aztec/foundation/fields';
10
+ import { Fr } from '@aztec/foundation/curves/bn254';
12
11
  import type { Tuple } from '@aztec/foundation/serialize';
13
12
  import { type TreeNodeLocation, UnbalancedTreeStore } from '@aztec/foundation/trees';
14
- import { getCheckpointBlobFields } from '@aztec/stdlib/checkpoint';
15
13
  import type { PublicInputsAndRecursiveProof } from '@aztec/stdlib/interfaces/server';
16
14
  import { ParityBasePrivateInputs } from '@aztec/stdlib/parity';
17
- import {
18
- BlockMergeRollupPrivateInputs,
19
- BlockRollupPublicInputs,
20
- CheckpointConstantData,
21
- CheckpointRollupPublicInputs,
22
- CheckpointRootRollupHints,
23
- CheckpointRootRollupPrivateInputs,
24
- CheckpointRootSingleBlockRollupPrivateInputs,
25
- } from '@aztec/stdlib/rollup';
26
- import type { CircuitName } from '@aztec/stdlib/stats';
15
+ import { BlockMergeRollupPrivateInputs, BlockRollupPublicInputs, CheckpointConstantData } from '@aztec/stdlib/rollup';
27
16
  import type { AppendOnlyTreeSnapshot } from '@aztec/stdlib/trees';
28
17
  import type { BlockHeader } from '@aztec/stdlib/tx';
29
18
  import type { UInt64 } from '@aztec/stdlib/types';
30
19
 
31
- import { accumulateBlobs, buildBlobHints, toProofData } from './block-building-helpers.js';
20
+ import { toProofData } from './block-building-helpers.js';
32
21
  import { BlockProvingState, type ProofState } from './block-proving-state.js';
33
- import type { EpochProvingState } from './epoch-proving-state.js';
34
22
 
35
23
  export class CheckpointProvingState {
36
24
  private blockProofs: UnbalancedTreeStore<
37
25
  ProofState<BlockRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
38
26
  >;
39
- private checkpointRootProof:
40
- | ProofState<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>
41
- | undefined;
42
27
  private blocks: (BlockProvingState | undefined)[] = [];
43
- private startBlobAccumulator: BatchedBlobAccumulator | undefined;
44
- private endBlobAccumulator: BatchedBlobAccumulator | undefined;
45
- private blobFields: Fr[] | undefined;
46
28
  private error: string | undefined;
47
- public readonly firstBlockNumber: number;
29
+ public readonly firstBlockNumber: BlockNumber;
48
30
 
49
31
  constructor(
50
32
  public readonly index: number,
51
33
  public readonly constants: CheckpointConstantData,
52
34
  public readonly totalNumBlocks: number,
53
- private readonly totalNumBlobFields: number,
54
- private readonly finalBlobBatchingChallenges: FinalBlobBatchingChallenges,
55
35
  private readonly headerOfLastBlockInPreviousCheckpoint: BlockHeader,
56
36
  private readonly lastArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>,
57
37
  private readonly l1ToL2Messages: Fr[],
@@ -67,25 +47,24 @@ export class CheckpointProvingState {
67
47
  Fr,
68
48
  typeof L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH
69
49
  >,
70
- public parentEpoch: EpochProvingState,
71
- private onBlobAccumulatorSet: (checkpoint: CheckpointProvingState) => void,
50
+ public readonly epochNumber: number,
51
+ /** Owner's liveness check. `verifyState()` returns false once this returns false. */
52
+ private readonly isAlive: () => boolean,
53
+ /** Owner's failure callback. Invoked from `reject` to surface the error upward. */
54
+ private readonly onReject: (reason: string) => void,
72
55
  ) {
73
56
  this.blockProofs = new UnbalancedTreeStore(totalNumBlocks);
74
- this.firstBlockNumber = headerOfLastBlockInPreviousCheckpoint.globalVariables.blockNumber + 1;
75
- }
76
-
77
- public get epochNumber(): number {
78
- return this.parentEpoch.epochNumber;
57
+ this.firstBlockNumber = BlockNumber(headerOfLastBlockInPreviousCheckpoint.globalVariables.blockNumber + 1);
79
58
  }
80
59
 
81
- public async startNewBlock(
82
- blockNumber: number,
60
+ public startNewBlock(
61
+ blockNumber: BlockNumber,
83
62
  timestamp: UInt64,
84
63
  totalNumTxs: number,
85
64
  lastArchiveTreeSnapshot: AppendOnlyTreeSnapshot,
86
65
  lastArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>,
87
- ): Promise<BlockProvingState> {
88
- const index = blockNumber - this.firstBlockNumber;
66
+ ): BlockProvingState {
67
+ const index = Number(blockNumber) - Number(this.firstBlockNumber);
89
68
  if (index >= this.totalNumBlocks) {
90
69
  throw new Error(`Unable to start a new block at index ${index}. Expected at most ${this.totalNumBlocks} blocks.`);
91
70
  }
@@ -98,8 +77,7 @@ export class CheckpointProvingState {
98
77
  const lastL1ToL2MessageSubtreeRootSiblingPath =
99
78
  index === 0 ? this.lastL1ToL2MessageSubtreeRootSiblingPath : this.newL1ToL2MessageSubtreeRootSiblingPath;
100
79
 
101
- const startSpongeBlob =
102
- index === 0 ? await SpongeBlob.init(this.totalNumBlobFields) : this.blocks[index - 1]?.getEndSpongeBlob();
80
+ const startSpongeBlob = index === 0 ? SpongeBlob.init() : this.blocks[index - 1]?.getEndSpongeBlob();
103
81
  if (!startSpongeBlob) {
104
82
  throw new Error(
105
83
  'Cannot start a new block before the trees have progressed from the tx effects in the previous block.',
@@ -160,25 +138,6 @@ export class CheckpointProvingState {
160
138
  this.blockProofs.setNode(location, { provingOutput });
161
139
  }
162
140
 
163
- public tryStartProvingCheckpointRoot() {
164
- if (this.checkpointRootProof?.isProving) {
165
- return false;
166
- } else {
167
- this.checkpointRootProof = { isProving: true };
168
- return true;
169
- }
170
- }
171
-
172
- public setCheckpointRootRollupProof(
173
- provingOutput: PublicInputsAndRecursiveProof<
174
- CheckpointRollupPublicInputs,
175
- typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
176
- >,
177
- ): TreeNodeLocation {
178
- this.checkpointRootProof = { provingOutput };
179
- return this.parentEpoch.setCheckpointRootRollupProof(this.index, provingOutput);
180
- }
181
-
182
141
  public getBaseParityInputs(baseParityIndex: number) {
183
142
  const messages = padArrayEnd(
184
143
  this.l1ToL2Messages.slice(
@@ -188,25 +147,7 @@ export class CheckpointProvingState {
188
147
  Fr.ZERO,
189
148
  NUM_MSGS_PER_BASE_PARITY,
190
149
  );
191
- return new ParityBasePrivateInputs(messages, this.constants.vkTreeRoot);
192
- }
193
-
194
- public async accumulateBlobs(startBlobAccumulator: BatchedBlobAccumulator) {
195
- if (this.isAcceptingBlocks() || this.blocks.some(b => b!.isAcceptingTxs())) {
196
- return;
197
- }
198
-
199
- this.blobFields = getCheckpointBlobFields(this.blocks.map(b => b!.getTxEffects()));
200
- this.endBlobAccumulator = await accumulateBlobs(this.blobFields, startBlobAccumulator);
201
- this.startBlobAccumulator = startBlobAccumulator;
202
-
203
- this.onBlobAccumulatorSet(this);
204
-
205
- return this.endBlobAccumulator;
206
- }
207
-
208
- public getEndBlobAccumulator() {
209
- return this.endBlobAccumulator;
150
+ return new ParityBasePrivateInputs(messages, this.constants.vkTreeRoot, this.constants.proverId);
210
151
  }
211
152
 
212
153
  public getParentLocation(location: TreeNodeLocation) {
@@ -222,44 +163,8 @@ export class CheckpointProvingState {
222
163
  return new BlockMergeRollupPrivateInputs([toProofData(left), toProofData(right)]);
223
164
  }
224
165
 
225
- public getCheckpointRootRollupType(): CircuitName {
226
- return this.totalNumBlocks === 1 ? 'rollup-checkpoint-root-single-block' : 'rollup-checkpoint-root';
227
- }
228
-
229
- public getCheckpointRootRollupInputs() {
230
- const proofs = this.#getChildProofsForRoot();
231
- const nonEmptyProofs = proofs.filter(p => !!p);
232
- if (proofs.length !== nonEmptyProofs.length) {
233
- throw new Error('At least one child is not ready for the checkpoint root rollup.');
234
- }
235
- if (!this.startBlobAccumulator) {
236
- throw new Error('Start blob accumulator is not set.');
237
- }
238
-
239
- // `blobFields` must've been set if `startBlobAccumulator` is set (in `accumulateBlobs`).
240
- const blobFields = this.blobFields!;
241
-
242
- const { blobCommitments, blobsHash } = buildBlobHints(blobFields);
243
-
244
- const hints = CheckpointRootRollupHints.from({
245
- previousBlockHeader: this.headerOfLastBlockInPreviousCheckpoint,
246
- previousArchiveSiblingPath: this.lastArchiveSiblingPath,
247
- startBlobAccumulator: this.startBlobAccumulator.toBlobAccumulator(),
248
- finalBlobChallenges: this.finalBlobBatchingChallenges,
249
- blobFields: padArrayEnd(blobFields, Fr.ZERO, FIELDS_PER_BLOB * BLOBS_PER_BLOCK),
250
- blobCommitments: padArrayEnd(blobCommitments, BLS12Point.ZERO, BLOBS_PER_BLOCK),
251
- blobsHash,
252
- });
253
-
254
- const [left, right] = nonEmptyProofs.map(p => toProofData(p));
255
-
256
- return !right
257
- ? new CheckpointRootSingleBlockRollupPrivateInputs(left, hints)
258
- : new CheckpointRootRollupPrivateInputs([left, right], hints);
259
- }
260
-
261
- public getBlockProvingStateByBlockNumber(blockNumber: number) {
262
- const index = blockNumber - this.firstBlockNumber;
166
+ public getBlockProvingStateByBlockNumber(blockNumber: BlockNumber) {
167
+ const index = Number(blockNumber) - Number(this.firstBlockNumber);
263
168
  return this.blocks[index];
264
169
  }
265
170
 
@@ -267,13 +172,8 @@ export class CheckpointProvingState {
267
172
  return !!this.blockProofs.getSibling(location)?.provingOutput;
268
173
  }
269
174
 
270
- public isReadyForCheckpointRoot() {
271
- const allChildProofsReady = this.#getChildProofsForRoot().every(p => !!p);
272
- return allChildProofsReady && !!this.startBlobAccumulator;
273
- }
274
-
275
175
  public verifyState() {
276
- return this.parentEpoch.verifyState();
176
+ return this.isAlive();
277
177
  }
278
178
 
279
179
  public getError() {
@@ -287,13 +187,22 @@ export class CheckpointProvingState {
287
187
 
288
188
  public reject(reason: string) {
289
189
  this.error = reason;
290
- this.parentEpoch.reject(reason);
190
+ this.onReject(reason);
291
191
  }
292
192
 
293
- #getChildProofsForRoot() {
193
+ /**
194
+ * Returns the block-level proof outputs that feed into the checkpoint root rollup.
195
+ * Used by `CheckpointSubTreeOrchestrator` to surface its sub-tree result.
196
+ */
197
+ public getSubTreeOutputProofs() {
294
198
  const rootLocation = { level: 0, index: 0 };
295
199
  return this.totalNumBlocks === 1
296
200
  ? [this.blockProofs.getNode(rootLocation)?.provingOutput] // If there's only 1 block, its proof will be stored at the root.
297
201
  : this.blockProofs.getChildren(rootLocation).map(c => c?.provingOutput);
298
202
  }
203
+
204
+ /** Sibling path of the archive tree captured before any block in this checkpoint landed. */
205
+ public getLastArchiveSiblingPath() {
206
+ return this.lastArchiveSiblingPath;
207
+ }
299
208
  }