@aztec/prover-client 0.0.0-test.1 → 0.0.1-commit.017a351

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 (185) hide show
  1. package/dest/config.d.ts +8 -8
  2. package/dest/config.d.ts.map +1 -1
  3. package/dest/config.js +26 -2
  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 +231 -0
  11. package/dest/mocks/fixtures.d.ts +8 -8
  12. package/dest/mocks/fixtures.d.ts.map +1 -1
  13. package/dest/mocks/fixtures.js +36 -17
  14. package/dest/mocks/test_context.d.ts +45 -32
  15. package/dest/mocks/test_context.d.ts.map +1 -1
  16. package/dest/mocks/test_context.js +162 -90
  17. package/dest/orchestrator/block-building-helpers.d.ts +36 -29
  18. package/dest/orchestrator/block-building-helpers.d.ts.map +1 -1
  19. package/dest/orchestrator/block-building-helpers.js +170 -189
  20. package/dest/orchestrator/block-proving-state.d.ts +73 -48
  21. package/dest/orchestrator/block-proving-state.d.ts.map +1 -1
  22. package/dest/orchestrator/block-proving-state.js +289 -177
  23. package/dest/orchestrator/checkpoint-proving-state.d.ts +83 -0
  24. package/dest/orchestrator/checkpoint-proving-state.d.ts.map +1 -0
  25. package/dest/orchestrator/checkpoint-proving-state.js +252 -0
  26. package/dest/orchestrator/checkpoint-sub-tree-orchestrator.d.ts +107 -0
  27. package/dest/orchestrator/checkpoint-sub-tree-orchestrator.d.ts.map +1 -0
  28. package/dest/orchestrator/checkpoint-sub-tree-orchestrator.js +151 -0
  29. package/dest/orchestrator/epoch-proving-context.d.ts +51 -0
  30. package/dest/orchestrator/epoch-proving-context.d.ts.map +1 -0
  31. package/dest/orchestrator/epoch-proving-context.js +81 -0
  32. package/dest/orchestrator/epoch-proving-state.d.ts +43 -28
  33. package/dest/orchestrator/epoch-proving-state.d.ts.map +1 -1
  34. package/dest/orchestrator/epoch-proving-state.js +179 -73
  35. package/dest/orchestrator/index.d.ts +4 -1
  36. package/dest/orchestrator/index.d.ts.map +1 -1
  37. package/dest/orchestrator/index.js +3 -0
  38. package/dest/orchestrator/orchestrator.d.ts +59 -51
  39. package/dest/orchestrator/orchestrator.d.ts.map +1 -1
  40. package/dest/orchestrator/orchestrator.js +808 -385
  41. package/dest/orchestrator/orchestrator_metrics.d.ts +1 -1
  42. package/dest/orchestrator/orchestrator_metrics.d.ts.map +1 -1
  43. package/dest/orchestrator/orchestrator_metrics.js +2 -6
  44. package/dest/orchestrator/proving-scheduler.d.ts +72 -0
  45. package/dest/orchestrator/proving-scheduler.d.ts.map +1 -0
  46. package/dest/orchestrator/proving-scheduler.js +117 -0
  47. package/dest/orchestrator/top-tree-orchestrator.d.ts +83 -0
  48. package/dest/orchestrator/top-tree-orchestrator.d.ts.map +1 -0
  49. package/dest/orchestrator/top-tree-orchestrator.js +182 -0
  50. package/dest/orchestrator/top-tree-proving-scheduler.d.ts +62 -0
  51. package/dest/orchestrator/top-tree-proving-scheduler.d.ts.map +1 -0
  52. package/dest/orchestrator/top-tree-proving-scheduler.js +73 -0
  53. package/dest/orchestrator/top-tree-proving-state.d.ts +61 -0
  54. package/dest/orchestrator/top-tree-proving-state.d.ts.map +1 -0
  55. package/dest/orchestrator/top-tree-proving-state.js +185 -0
  56. package/dest/orchestrator/tx-proving-state.d.ts +15 -12
  57. package/dest/orchestrator/tx-proving-state.d.ts.map +1 -1
  58. package/dest/orchestrator/tx-proving-state.js +27 -44
  59. package/dest/prover-client/factory.d.ts +3 -3
  60. package/dest/prover-client/factory.d.ts.map +1 -1
  61. package/dest/prover-client/index.d.ts +1 -1
  62. package/dest/prover-client/prover-client.d.ts +68 -9
  63. package/dest/prover-client/prover-client.d.ts.map +1 -1
  64. package/dest/prover-client/prover-client.js +68 -14
  65. package/dest/prover-client/server-epoch-prover.d.ts +16 -12
  66. package/dest/prover-client/server-epoch-prover.d.ts.map +1 -1
  67. package/dest/prover-client/server-epoch-prover.js +11 -11
  68. package/dest/proving_broker/broker_prover_facade.d.ts +28 -19
  69. package/dest/proving_broker/broker_prover_facade.d.ts.map +1 -1
  70. package/dest/proving_broker/broker_prover_facade.js +74 -61
  71. package/dest/proving_broker/config.d.ts +18 -61
  72. package/dest/proving_broker/config.d.ts.map +1 -1
  73. package/dest/proving_broker/config.js +43 -9
  74. package/dest/proving_broker/factory.d.ts +2 -2
  75. package/dest/proving_broker/factory.d.ts.map +1 -1
  76. package/dest/proving_broker/factory.js +5 -1
  77. package/dest/proving_broker/fixtures.d.ts +3 -2
  78. package/dest/proving_broker/fixtures.d.ts.map +1 -1
  79. package/dest/proving_broker/fixtures.js +3 -2
  80. package/dest/proving_broker/index.d.ts +2 -1
  81. package/dest/proving_broker/index.d.ts.map +1 -1
  82. package/dest/proving_broker/index.js +1 -0
  83. package/dest/proving_broker/proof_store/factory.d.ts +2 -5
  84. package/dest/proving_broker/proof_store/factory.d.ts.map +1 -1
  85. package/dest/proving_broker/proof_store/factory.js +7 -30
  86. package/dest/proving_broker/proof_store/file_store_proof_store.d.ts +18 -0
  87. package/dest/proving_broker/proof_store/file_store_proof_store.d.ts.map +1 -0
  88. package/dest/proving_broker/proof_store/file_store_proof_store.js +60 -0
  89. package/dest/proving_broker/proof_store/index.d.ts +2 -1
  90. package/dest/proving_broker/proof_store/index.d.ts.map +1 -1
  91. package/dest/proving_broker/proof_store/index.js +1 -0
  92. package/dest/proving_broker/proof_store/inline_proof_store.d.ts +1 -1
  93. package/dest/proving_broker/proof_store/inline_proof_store.d.ts.map +1 -1
  94. package/dest/proving_broker/proof_store/proof_store.d.ts +1 -1
  95. package/dest/proving_broker/proving_agent.d.ts +8 -12
  96. package/dest/proving_broker/proving_agent.d.ts.map +1 -1
  97. package/dest/proving_broker/proving_agent.js +86 -65
  98. package/dest/proving_broker/proving_broker.d.ts +18 -6
  99. package/dest/proving_broker/proving_broker.d.ts.map +1 -1
  100. package/dest/proving_broker/proving_broker.js +108 -44
  101. package/dest/proving_broker/proving_broker_database/memory.d.ts +3 -2
  102. package/dest/proving_broker/proving_broker_database/memory.d.ts.map +1 -1
  103. package/dest/proving_broker/proving_broker_database/memory.js +1 -1
  104. package/dest/proving_broker/proving_broker_database/persisted.d.ts +5 -3
  105. package/dest/proving_broker/proving_broker_database/persisted.d.ts.map +1 -1
  106. package/dest/proving_broker/proving_broker_database/persisted.js +401 -11
  107. package/dest/proving_broker/proving_broker_database.d.ts +3 -2
  108. package/dest/proving_broker/proving_broker_database.d.ts.map +1 -1
  109. package/dest/proving_broker/proving_broker_instrumentation.d.ts +3 -1
  110. package/dest/proving_broker/proving_broker_instrumentation.d.ts.map +1 -1
  111. package/dest/proving_broker/proving_broker_instrumentation.js +22 -35
  112. package/dest/proving_broker/proving_job_controller.d.ts +11 -10
  113. package/dest/proving_broker/proving_job_controller.d.ts.map +1 -1
  114. package/dest/proving_broker/proving_job_controller.js +92 -62
  115. package/dest/proving_broker/rpc.d.ts +9 -7
  116. package/dest/proving_broker/rpc.d.ts.map +1 -1
  117. package/dest/proving_broker/rpc.js +88 -27
  118. package/dest/test/mock_proof_store.d.ts +9 -0
  119. package/dest/test/mock_proof_store.d.ts.map +1 -0
  120. package/dest/test/mock_proof_store.js +10 -0
  121. package/dest/test/mock_prover.d.ts +23 -17
  122. package/dest/test/mock_prover.d.ts.map +1 -1
  123. package/dest/test/mock_prover.js +38 -20
  124. package/package.json +34 -33
  125. package/src/config.ts +41 -9
  126. package/src/light/index.ts +1 -0
  127. package/src/light/lightweight_checkpoint_builder.ts +320 -0
  128. package/src/mocks/fixtures.ts +46 -40
  129. package/src/mocks/test_context.ts +231 -120
  130. package/src/orchestrator/block-building-helpers.ts +258 -334
  131. package/src/orchestrator/block-proving-state.ts +334 -231
  132. package/src/orchestrator/checkpoint-proving-state.ts +362 -0
  133. package/src/orchestrator/checkpoint-sub-tree-orchestrator.ts +271 -0
  134. package/src/orchestrator/epoch-proving-context.ts +101 -0
  135. package/src/orchestrator/epoch-proving-state.ts +239 -111
  136. package/src/orchestrator/index.ts +8 -0
  137. package/src/orchestrator/orchestrator.ts +591 -451
  138. package/src/orchestrator/orchestrator_metrics.ts +2 -6
  139. package/src/orchestrator/proving-scheduler.ts +156 -0
  140. package/src/orchestrator/top-tree-orchestrator.ts +314 -0
  141. package/src/orchestrator/top-tree-proving-scheduler.ts +154 -0
  142. package/src/orchestrator/top-tree-proving-state.ts +220 -0
  143. package/src/orchestrator/tx-proving-state.ts +48 -66
  144. package/src/prover-client/factory.ts +6 -2
  145. package/src/prover-client/prover-client.ts +173 -38
  146. package/src/prover-client/server-epoch-prover.ts +40 -22
  147. package/src/proving_broker/broker_prover_facade.ts +227 -149
  148. package/src/proving_broker/config.ts +49 -8
  149. package/src/proving_broker/factory.ts +2 -1
  150. package/src/proving_broker/fixtures.ts +8 -3
  151. package/src/proving_broker/index.ts +1 -0
  152. package/src/proving_broker/proof_store/factory.ts +10 -32
  153. package/src/proving_broker/proof_store/file_store_proof_store.ts +78 -0
  154. package/src/proving_broker/proof_store/index.ts +1 -0
  155. package/src/proving_broker/proof_store/inline_proof_store.ts +1 -1
  156. package/src/proving_broker/proving_agent.ts +95 -66
  157. package/src/proving_broker/proving_broker.ts +121 -49
  158. package/src/proving_broker/proving_broker_database/memory.ts +3 -2
  159. package/src/proving_broker/proving_broker_database/persisted.ts +31 -15
  160. package/src/proving_broker/proving_broker_database.ts +2 -1
  161. package/src/proving_broker/proving_broker_instrumentation.ts +23 -35
  162. package/src/proving_broker/proving_job_controller.ts +100 -83
  163. package/src/proving_broker/rpc.ts +46 -25
  164. package/src/test/mock_proof_store.ts +14 -0
  165. package/src/test/mock_prover.ts +156 -64
  166. package/dest/bin/get-proof-inputs.d.ts +0 -2
  167. package/dest/bin/get-proof-inputs.d.ts.map +0 -1
  168. package/dest/bin/get-proof-inputs.js +0 -51
  169. package/dest/block_builder/index.d.ts +0 -6
  170. package/dest/block_builder/index.d.ts.map +0 -1
  171. package/dest/block_builder/index.js +0 -1
  172. package/dest/block_builder/light.d.ts +0 -33
  173. package/dest/block_builder/light.d.ts.map +0 -1
  174. package/dest/block_builder/light.js +0 -82
  175. package/dest/proving_broker/proof_store/gcs_proof_store.d.ts +0 -14
  176. package/dest/proving_broker/proof_store/gcs_proof_store.d.ts.map +0 -1
  177. package/dest/proving_broker/proof_store/gcs_proof_store.js +0 -51
  178. package/dest/proving_broker/proving_agent_instrumentation.d.ts +0 -8
  179. package/dest/proving_broker/proving_agent_instrumentation.d.ts.map +0 -1
  180. package/dest/proving_broker/proving_agent_instrumentation.js +0 -16
  181. package/src/bin/get-proof-inputs.ts +0 -59
  182. package/src/block_builder/index.ts +0 -6
  183. package/src/block_builder/light.ts +0 -101
  184. package/src/proving_broker/proof_store/gcs_proof_store.ts +0 -72
  185. package/src/proving_broker/proving_agent_instrumentation.ts +0 -21
@@ -1,26 +1,23 @@
1
+ import { EpochNumber } from '@aztec/foundation/branded-types';
1
2
  import { createLogger } from '@aztec/foundation/log';
2
3
  import { type PromiseWithResolvers, RunningPromise, promiseWithResolvers } from '@aztec/foundation/promise';
3
4
  import { PriorityMemoryQueue } from '@aztec/foundation/queue';
4
5
  import { Timer } from '@aztec/foundation/timer';
5
- import type {
6
- GetProvingJobResponse,
7
- ProofUri,
8
- ProvingJob,
9
- ProvingJobConsumer,
10
- ProvingJobFilter,
11
- ProvingJobId,
12
- ProvingJobProducer,
13
- ProvingJobSettledResult,
14
- ProvingJobStatus,
6
+ import {
7
+ type GetProvingJobResponse,
8
+ type ProofUri,
9
+ type ProvingJob,
10
+ type ProvingJobBrokerDebug,
11
+ type ProvingJobConsumer,
12
+ type ProvingJobFilter,
13
+ type ProvingJobId,
14
+ type ProvingJobProducer,
15
+ type ProvingJobSettledResult,
16
+ type ProvingJobStatus,
17
+ tryStop,
15
18
  } from '@aztec/stdlib/interfaces/server';
16
19
  import { ProvingRequestType } from '@aztec/stdlib/proofs';
17
- import {
18
- type TelemetryClient,
19
- type Traceable,
20
- type Tracer,
21
- getTelemetryClient,
22
- trackSpan,
23
- } from '@aztec/telemetry-client';
20
+ import { type TelemetryClient, type Traceable, type Tracer, getTelemetryClient } from '@aztec/telemetry-client';
24
21
 
25
22
  import assert from 'assert';
26
23
 
@@ -40,23 +37,36 @@ type EnqueuedProvingJob = Pick<ProvingJob, 'id' | 'epochNumber'>;
40
37
  * A broker that manages proof requests and distributes them to workers based on their priority.
41
38
  * It takes a backend that is responsible for storing and retrieving proof requests and results.
42
39
  */
43
- export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Traceable {
40
+ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, ProvingJobBrokerDebug, Traceable {
44
41
  private queues: ProvingQueues = {
45
42
  [ProvingRequestType.PUBLIC_VM]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
46
- [ProvingRequestType.TUBE_PROOF]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
43
+ [ProvingRequestType.PUBLIC_CHONK_VERIFIER]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
47
44
 
48
- [ProvingRequestType.PRIVATE_BASE_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
49
- [ProvingRequestType.PUBLIC_BASE_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
50
- [ProvingRequestType.MERGE_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
45
+ [ProvingRequestType.PRIVATE_TX_BASE_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
46
+ [ProvingRequestType.PUBLIC_TX_BASE_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
47
+ [ProvingRequestType.TX_MERGE_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
51
48
  [ProvingRequestType.ROOT_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
52
49
 
53
50
  [ProvingRequestType.BLOCK_MERGE_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
51
+ [ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
52
+ [ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(
53
+ provingJobComparator,
54
+ ),
55
+ [ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(
56
+ provingJobComparator,
57
+ ),
54
58
  [ProvingRequestType.BLOCK_ROOT_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
55
- [ProvingRequestType.SINGLE_TX_BLOCK_ROOT_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
56
- [ProvingRequestType.EMPTY_BLOCK_ROOT_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
59
+ [ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
60
+
61
+ [ProvingRequestType.CHECKPOINT_ROOT_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
62
+ [ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(
63
+ provingJobComparator,
64
+ ),
65
+ [ProvingRequestType.CHECKPOINT_MERGE_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
66
+ [ProvingRequestType.CHECKPOINT_PADDING_ROLLUP]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
57
67
 
58
- [ProvingRequestType.BASE_PARITY]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
59
- [ProvingRequestType.ROOT_PARITY]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
68
+ [ProvingRequestType.PARITY_BASE]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
69
+ [ProvingRequestType.PARITY_ROOT]: new PriorityMemoryQueue<EnqueuedProvingJob>(provingJobComparator),
60
70
  };
61
71
 
62
72
  // holds a copy of the database in memory in order to quickly fulfill requests
@@ -93,7 +103,7 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
93
103
  /**
94
104
  * The broker keeps track of the highest epoch its seen.
95
105
  * This information is used for garbage collection: once it reaches the next epoch, it can start pruning the database of old state.
96
- * It is important that this value is initialised to zero. This ensures that we don't delete any old jobs until the current
106
+ * It is important that this value is initialized to zero. This ensures that we don't delete any old jobs until the current
97
107
  * process instance receives a job request informing it of the actual current highest epoch
98
108
  * Example:
99
109
  * proving epoch 11 - the broker will wipe all jobs for epochs 9 and lower
@@ -105,6 +115,8 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
105
115
 
106
116
  private started = false;
107
117
 
118
+ private debugReplayEnabled: boolean;
119
+
108
120
  public constructor(
109
121
  private database: ProvingBrokerDatabase,
110
122
  {
@@ -112,6 +124,7 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
112
124
  proverBrokerPollIntervalMs,
113
125
  proverBrokerJobMaxRetries,
114
126
  proverBrokerMaxEpochsToKeepResultsFor,
127
+ proverBrokerDebugReplayEnabled,
115
128
  }: Required<
116
129
  Pick<
117
130
  ProverBrokerConfig,
@@ -119,6 +132,7 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
119
132
  | 'proverBrokerPollIntervalMs'
120
133
  | 'proverBrokerJobMaxRetries'
121
134
  | 'proverBrokerMaxEpochsToKeepResultsFor'
135
+ | 'proverBrokerDebugReplayEnabled'
122
136
  >
123
137
  > = defaultProverBrokerConfig,
124
138
  client: TelemetryClient = getTelemetryClient(),
@@ -130,6 +144,7 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
130
144
  this.jobTimeoutMs = proverBrokerJobTimeoutMs!;
131
145
  this.maxRetries = proverBrokerJobMaxRetries!;
132
146
  this.maxEpochsToKeepResultsFor = proverBrokerMaxEpochsToKeepResultsFor!;
147
+ this.debugReplayEnabled = proverBrokerDebugReplayEnabled ?? false;
133
148
  }
134
149
 
135
150
  private measureQueueDepth: MonitorCallback = (type: ProvingRequestType) => {
@@ -184,7 +199,7 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
184
199
  this.logger.warn('ProvingBroker not started');
185
200
  return Promise.resolve();
186
201
  }
187
- await this.cleanupPromise.stop();
202
+ await tryStop(this.cleanupPromise);
188
203
  }
189
204
 
190
205
  public enqueueProvingJob(job: ProvingJob): Promise<ProvingJobStatus> {
@@ -232,6 +247,29 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
232
247
  return Promise.resolve(this.#reportProvingJobProgress(id, startedAt, filter));
233
248
  }
234
249
 
250
+ public async replayProvingJob(
251
+ jobId: ProvingJobId,
252
+ type: ProvingRequestType,
253
+ epochNumber: EpochNumber,
254
+ inputsUri: ProofUri,
255
+ ): Promise<ProvingJobStatus> {
256
+ if (!this.debugReplayEnabled) {
257
+ throw new Error('Debug replay not enabled. Set PROVER_BROKER_DEBUG_REPLAY_ENABLED=true');
258
+ }
259
+
260
+ this.logger.info(`Replaying proving job`, { provingJobId: jobId, epochNumber, inputsUri });
261
+
262
+ // Clear existing state and enqueue
263
+ this.cleanUpProvingJobState([jobId]);
264
+
265
+ const job: ProvingJob = { id: jobId, type, epochNumber, inputsUri };
266
+ this.jobsCache.set(jobId, job);
267
+ await this.database.addProvingJob(job);
268
+ this.enqueueJobInternal(job);
269
+
270
+ return { status: 'in-queue' };
271
+ }
272
+
235
273
  async #enqueueProvingJob(job: ProvingJob): Promise<ProvingJobStatus> {
236
274
  // We return the job status at the start of this call
237
275
  const jobStatus = this.#getProvingJobStatus(job.id);
@@ -276,18 +314,25 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
276
314
  // notify listeners of the cancellation
277
315
  if (!this.resultsCache.has(id)) {
278
316
  this.logger.info(`Cancelling job id=${id}`, { provingJobId: id });
279
- await this.#reportProvingJobError(id, 'Aborted', false);
317
+ await this.#reportProvingJobError(id, 'Aborted', false, undefined, true);
280
318
  }
281
319
  }
282
320
 
283
321
  private cleanUpProvingJobState(ids: ProvingJobId[]) {
322
+ const idsToClean = new Set(ids);
284
323
  for (const id of ids) {
285
324
  this.jobsCache.delete(id);
325
+ const deferred = this.promises.get(id);
326
+ if (deferred) {
327
+ deferred.resolve({ status: 'rejected', reason: 'Proving job cleaned up' });
328
+ }
286
329
  this.promises.delete(id);
287
330
  this.resultsCache.delete(id);
288
331
  this.inProgress.delete(id);
289
332
  this.retries.delete(id);
333
+ this.enqueuedAt.delete(id);
290
334
  }
335
+ this.completedJobNotifications = this.completedJobNotifications.filter(id => !idsToClean.has(id));
291
336
  }
292
337
 
293
338
  #getProvingJobStatus(id: ProvingJobId): ProvingJobStatus {
@@ -313,7 +358,6 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
313
358
  return Promise.resolve(notifications.concat(completedJobs));
314
359
  }
315
360
 
316
- // eslint-disable-next-line require-await
317
361
  #getProvingJob(filter: ProvingJobFilter = { allowList: [] }): { job: ProvingJob; time: number } | undefined {
318
362
  const allowedProofs: ProvingRequestType[] =
319
363
  Array.isArray(filter.allowList) && filter.allowList.length > 0
@@ -340,6 +384,8 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
340
384
  const enqueuedAt = this.enqueuedAt.get(job.id);
341
385
  if (enqueuedAt) {
342
386
  this.instrumentation.recordJobWait(job.type, enqueuedAt);
387
+ // we can clear this flag now.
388
+ this.enqueuedAt.delete(job.id);
343
389
  }
344
390
 
345
391
  return { job, time };
@@ -355,6 +401,7 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
355
401
  err: string,
356
402
  retry = false,
357
403
  filter?: ProvingJobFilter,
404
+ aborted = false,
358
405
  ): Promise<GetProvingJobResponse | undefined> {
359
406
  const info = this.inProgress.get(id);
360
407
  const item = this.jobsCache.get(id);
@@ -415,7 +462,11 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
415
462
  this.promises.get(id)!.resolve(result);
416
463
  this.completedJobNotifications.push(id);
417
464
 
418
- this.instrumentation.incRejectedJobs(item.type);
465
+ if (aborted) {
466
+ this.instrumentation.incAbortedJobs(item.type);
467
+ } else {
468
+ this.instrumentation.incRejectedJobs(item.type);
469
+ }
419
470
  if (info) {
420
471
  const duration = this.msTimeSource() - info.startedAt;
421
472
  this.instrumentation.recordJobDuration(item.type, duration);
@@ -548,30 +599,29 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
548
599
  return this.#getProvingJob(filter);
549
600
  }
550
601
 
551
- @trackSpan('ProvingBroker.cleanupPass')
552
602
  private async cleanupPass() {
553
- this.cleanupStaleJobs();
554
603
  this.reEnqueueExpiredJobs();
555
604
  const oldestEpochToKeep = this.oldestEpochToKeep();
556
605
  if (oldestEpochToKeep > 0) {
557
- await this.database.deleteAllProvingJobsOlderThanEpoch(oldestEpochToKeep);
606
+ this.cleanupJobsOlderThanEpoch(EpochNumber(oldestEpochToKeep));
607
+ await this.database.deleteAllProvingJobsOlderThanEpoch(EpochNumber(oldestEpochToKeep));
558
608
  this.logger.trace(`Deleted all epochs older than ${oldestEpochToKeep}`);
559
609
  }
560
610
  }
561
611
 
562
- private cleanupStaleJobs() {
612
+ private cleanupJobsOlderThanEpoch(epochNumber: EpochNumber) {
563
613
  const jobIds = Array.from(this.jobsCache.keys());
564
614
  const jobsToClean: ProvingJobId[] = [];
565
615
  for (const id of jobIds) {
566
616
  const job = this.jobsCache.get(id)!;
567
- if (this.isJobStale(job)) {
617
+ if (job.epochNumber < epochNumber) {
568
618
  jobsToClean.push(id);
569
619
  }
570
620
  }
571
621
 
572
622
  if (jobsToClean.length > 0) {
573
623
  this.cleanUpProvingJobState(jobsToClean);
574
- this.logger.info(`Cleaned up jobs=${jobsToClean.length}`);
624
+ this.logger.verbose(`Cleaned up proving jobs=${jobsToClean.length}`);
575
625
  }
576
626
  }
577
627
 
@@ -588,10 +638,26 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Tr
588
638
  const now = this.msTimeSource();
589
639
  const msSinceLastUpdate = now - metadata.lastUpdatedAt;
590
640
  if (msSinceLastUpdate >= this.jobTimeoutMs) {
591
- this.logger.warn(`Proving job id=${id} timed out. Adding it back to the queue.`, { provingJobId: id });
592
641
  this.inProgress.delete(id);
593
- this.enqueueJobInternal(item);
594
642
  this.instrumentation.incTimedOutJobs(item.type);
643
+
644
+ const retries = this.retries.get(id) ?? 0;
645
+ if (retries + 1 < this.maxRetries && !this.isJobStale(item)) {
646
+ this.logger.warn(`Proving job id=${id} timed out. Re-enqueueing (retry ${retries + 1}/${this.maxRetries}).`, {
647
+ provingJobId: id,
648
+ });
649
+ this.retries.set(id, retries + 1);
650
+ this.enqueueJobInternal(item);
651
+ } else {
652
+ this.logger.error(`Proving job id=${id} timed out after ${retries + 1} attempts. Marking as failed.`, {
653
+ provingJobId: id,
654
+ });
655
+ const result: ProvingJobSettledResult = { status: 'rejected', reason: 'Timed out' };
656
+ this.resultsCache.set(id, result);
657
+ this.promises.get(id)?.resolve(result);
658
+ this.completedJobNotifications.push(id);
659
+ this.instrumentation.incRejectedJobs(item.type);
660
+ }
595
661
  }
596
662
  }
597
663
  }
@@ -671,17 +737,23 @@ function proofTypeComparator(a: ProvingRequestType, b: ProvingRequestType): -1 |
671
737
  * The aim is that this will speed up block proving as the closer we get to a block's root proof the more likely it
672
738
  * is to get picked up by agents
673
739
  */
674
- const PROOF_TYPES_IN_PRIORITY_ORDER: ProvingRequestType[] = [
740
+ export const PROOF_TYPES_IN_PRIORITY_ORDER: ProvingRequestType[] = [
741
+ ProvingRequestType.ROOT_ROLLUP,
742
+ ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP,
743
+ ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP,
744
+ ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP,
675
745
  ProvingRequestType.BLOCK_ROOT_ROLLUP,
676
- ProvingRequestType.SINGLE_TX_BLOCK_ROOT_ROLLUP,
746
+ ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP,
677
747
  ProvingRequestType.BLOCK_MERGE_ROLLUP,
678
- ProvingRequestType.ROOT_ROLLUP,
679
- ProvingRequestType.MERGE_ROLLUP,
680
- ProvingRequestType.PUBLIC_BASE_ROLLUP,
681
- ProvingRequestType.PRIVATE_BASE_ROLLUP,
748
+ ProvingRequestType.CHECKPOINT_ROOT_ROLLUP,
749
+ ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP,
750
+ ProvingRequestType.CHECKPOINT_MERGE_ROLLUP,
751
+ ProvingRequestType.CHECKPOINT_PADDING_ROLLUP,
752
+ ProvingRequestType.TX_MERGE_ROLLUP,
753
+ ProvingRequestType.PUBLIC_TX_BASE_ROLLUP,
754
+ ProvingRequestType.PRIVATE_TX_BASE_ROLLUP,
682
755
  ProvingRequestType.PUBLIC_VM,
683
- ProvingRequestType.TUBE_PROOF,
684
- ProvingRequestType.ROOT_PARITY,
685
- ProvingRequestType.BASE_PARITY,
686
- ProvingRequestType.EMPTY_BLOCK_ROOT_ROLLUP,
756
+ ProvingRequestType.PUBLIC_CHONK_VERIFIER,
757
+ ProvingRequestType.PARITY_ROOT,
758
+ ProvingRequestType.PARITY_BASE,
687
759
  ];
@@ -1,3 +1,4 @@
1
+ import { EpochNumber } from '@aztec/foundation/branded-types';
1
2
  import {
2
3
  type ProofUri,
3
4
  type ProvingJob,
@@ -43,7 +44,7 @@ export class InMemoryBrokerDatabase implements ProvingBrokerDatabase {
43
44
  return Promise.resolve();
44
45
  }
45
46
 
46
- deleteAllProvingJobsOlderThanEpoch(epochNumber: number): Promise<void> {
47
+ deleteAllProvingJobsOlderThanEpoch(epochNumber: EpochNumber): Promise<void> {
47
48
  const toDelete = [
48
49
  ...Array.from(this.jobs.keys()).filter(x => getEpochFromProvingJobId(x) < epochNumber),
49
50
  ...Array.from(this.results.keys()).filter(x => getEpochFromProvingJobId(x) < epochNumber),
@@ -52,7 +53,7 @@ export class InMemoryBrokerDatabase implements ProvingBrokerDatabase {
52
53
  }
53
54
 
54
55
  async *allProvingJobs(): AsyncIterableIterator<[ProvingJob, ProvingJobSettledResult | undefined]> {
55
- for await (const item of this.jobs.values()) {
56
+ for (const item of this.jobs.values()) {
56
57
  yield [item, this.results.get(item.id)] as const;
57
58
  }
58
59
  }
@@ -1,3 +1,4 @@
1
+ import { EpochNumber } from '@aztec/foundation/branded-types';
1
2
  import { jsonParseWithSchema, jsonStringify } from '@aztec/foundation/json-rpc';
2
3
  import { type Logger, createLogger } from '@aztec/foundation/log';
3
4
  import { BatchQueue } from '@aztec/foundation/queue';
@@ -10,7 +11,14 @@ import {
10
11
  ProvingJobSettledResult,
11
12
  getEpochFromProvingJobId,
12
13
  } from '@aztec/stdlib/interfaces/server';
13
- import { Attributes, LmdbMetrics, type TelemetryClient, getTelemetryClient } from '@aztec/telemetry-client';
14
+ import {
15
+ Attributes,
16
+ LmdbMetrics,
17
+ type TelemetryClient,
18
+ type Tracer,
19
+ getTelemetryClient,
20
+ trackSpan,
21
+ } from '@aztec/telemetry-client';
14
22
 
15
23
  import { mkdir, readdir } from 'fs/promises';
16
24
  import { join } from 'path';
@@ -46,9 +54,9 @@ class SingleEpochDatabase {
46
54
 
47
55
  async *allProvingJobs(): AsyncIterableIterator<[ProvingJob, ProvingJobSettledResult | undefined]> {
48
56
  for await (const jobStr of this.jobs.valuesAsync()) {
49
- const job = await jsonParseWithSchema(jobStr, ProvingJob);
57
+ const job = jsonParseWithSchema(jobStr, ProvingJob);
50
58
  const resultStr = await this.jobResults.getAsync(job.id);
51
- const result = resultStr ? await jsonParseWithSchema(resultStr, ProvingJobSettledResult) : undefined;
59
+ const result = resultStr ? jsonParseWithSchema(resultStr, ProvingJobSettledResult) : undefined;
52
60
  yield [job, result];
53
61
  }
54
62
  }
@@ -77,6 +85,8 @@ export class KVBrokerDatabase implements ProvingBrokerDatabase {
77
85
 
78
86
  private batchQueue: BatchQueue<ProvingJob | [ProvingJobId, ProvingJobSettledResult], number>;
79
87
 
88
+ public readonly tracer: Tracer;
89
+
80
90
  private constructor(
81
91
  private epochs: Map<number, SingleEpochDatabase>,
82
92
  private config: ProverBrokerConfig,
@@ -91,6 +101,8 @@ export class KVBrokerDatabase implements ProvingBrokerDatabase {
91
101
  () => this.estimateSize(),
92
102
  );
93
103
 
104
+ this.tracer = client.getTracer('KVBrokerDatabase');
105
+
94
106
  this.batchQueue = new BatchQueue(
95
107
  (items, key) => this.commitWrites(items, key),
96
108
  config.proverBrokerBatchSize,
@@ -104,14 +116,15 @@ export class KVBrokerDatabase implements ProvingBrokerDatabase {
104
116
  const jobsToAdd = items.filter((item): item is ProvingJob => 'id' in item);
105
117
  const resultsToAdd = items.filter((item): item is [ProvingJobId, ProvingJobSettledResult] => Array.isArray(item));
106
118
 
107
- const db = await this.getEpochDatabase(epochNumber);
119
+ const db = await this.getEpochDatabase(EpochNumber(epochNumber));
108
120
  await db.batchWrite(jobsToAdd, resultsToAdd);
109
121
  }
110
122
 
111
123
  private async estimateSize() {
112
124
  const sizes = await Promise.all(Array.from(this.epochs.values()).map(x => x.estimateSize()));
113
125
  return {
114
- mappingSize: this.config.dataStoreMapSizeKB,
126
+ mappingSize: this.config.dataStoreMapSizeKb,
127
+ physicalFileSize: sizes.reduce((prev, curr) => prev + curr.physicalFileSize, 0),
115
128
  numItems: sizes.reduce((prev, curr) => prev + curr.numItems, 0),
116
129
  actualSize: sizes.reduce((prev, curr) => prev + curr.actualSize, 0),
117
130
  };
@@ -136,13 +149,13 @@ export class KVBrokerDatabase implements ProvingBrokerDatabase {
136
149
  continue;
137
150
  }
138
151
  logger.info(
139
- `Loading broker database for epoch ${epochNumber} from ${fullDirectory} with map size ${config.dataStoreMapSizeKB}KB`,
152
+ `Loading broker database for epoch ${epochNumber} from ${fullDirectory} with map size ${config.dataStoreMapSizeKb}KB`,
140
153
  );
141
154
  const db = await openVersionedStoreAt(
142
155
  fullDirectory,
143
156
  SingleEpochDatabase.SCHEMA_VERSION,
144
- config.l1Contracts.rollupAddress,
145
- config.dataStoreMapSizeKB,
157
+ config.rollupAddress,
158
+ config.dataStoreMapSizeKb,
146
159
  );
147
160
  const epochDb = new SingleEpochDatabase(db);
148
161
  epochs.set(epochNumber, epochDb);
@@ -163,14 +176,17 @@ export class KVBrokerDatabase implements ProvingBrokerDatabase {
163
176
  }
164
177
  }
165
178
 
166
- async deleteAllProvingJobsOlderThanEpoch(epochNumber: number): Promise<void> {
167
- const oldEpochs = Array.from(this.epochs.keys()).filter(e => e < epochNumber);
179
+ @trackSpan('KVBrokerDatabase.deleteAllProvingJobsOlderThanEpoch', epochNumber => ({
180
+ [Attributes.EPOCH_NUMBER]: epochNumber,
181
+ }))
182
+ async deleteAllProvingJobsOlderThanEpoch(epochNumber: EpochNumber): Promise<void> {
183
+ const oldEpochs = Array.from(this.epochs.keys()).filter(e => e < Number(epochNumber));
168
184
  for (const old of oldEpochs) {
169
185
  const db = this.epochs.get(old);
170
186
  if (!db) {
171
187
  continue;
172
188
  }
173
- this.logger.info(`Deleting broker database for epoch ${old}`);
189
+ this.logger.verbose(`Deleting broker database for epoch ${old}`);
174
190
  await db.delete();
175
191
  this.epochs.delete(old);
176
192
  }
@@ -195,19 +211,19 @@ export class KVBrokerDatabase implements ProvingBrokerDatabase {
195
211
  return this.batchQueue.put([id, { status: 'fulfilled', value }], getEpochFromProvingJobId(id));
196
212
  }
197
213
 
198
- private async getEpochDatabase(epochNumber: number): Promise<SingleEpochDatabase> {
214
+ private async getEpochDatabase(epochNumber: EpochNumber): Promise<SingleEpochDatabase> {
199
215
  let epochDb = this.epochs.get(epochNumber);
200
216
  if (!epochDb) {
201
217
  const newEpochDirectory = join(this.config.dataDirectory!, epochNumber.toString());
202
218
  await mkdir(newEpochDirectory, { recursive: true });
203
219
  this.logger.info(
204
- `Creating broker database for epoch ${epochNumber} at ${newEpochDirectory} with map size ${this.config.dataStoreMapSizeKB}`,
220
+ `Creating broker database for epoch ${epochNumber} at ${newEpochDirectory} with map size ${this.config.dataStoreMapSizeKb}`,
205
221
  );
206
222
  const db = await openVersionedStoreAt(
207
223
  newEpochDirectory,
208
224
  SingleEpochDatabase.SCHEMA_VERSION,
209
- this.config.l1Contracts.rollupAddress,
210
- this.config.dataStoreMapSizeKB,
225
+ this.config.rollupAddress,
226
+ this.config.dataStoreMapSizeKb,
211
227
  );
212
228
  epochDb = new SingleEpochDatabase(db);
213
229
  this.epochs.set(epochNumber, epochDb);
@@ -1,3 +1,4 @@
1
+ import { EpochNumber } from '@aztec/foundation/branded-types';
1
2
  import type { ProofUri, ProvingJob, ProvingJobId, ProvingJobSettledResult } from '@aztec/stdlib/interfaces/server';
2
3
 
3
4
  /**
@@ -14,7 +15,7 @@ export interface ProvingBrokerDatabase {
14
15
  * Deletes all proving jobs belonging to epochs older than the given epoch
15
16
  * @param epochNumber - The epoch number beyond which jobs should be deleted
16
17
  */
17
- deleteAllProvingJobsOlderThanEpoch(epochNumber: number): Promise<void>;
18
+ deleteAllProvingJobsOlderThanEpoch(epochNumber: EpochNumber): Promise<void>;
18
19
 
19
20
  /**
20
21
  * Returns an iterator over all saved proving jobs
@@ -8,7 +8,7 @@ import {
8
8
  type ObservableResult,
9
9
  type TelemetryClient,
10
10
  type UpDownCounter,
11
- ValueType,
11
+ createUpDownCounterWithDefault,
12
12
  } from '@aztec/telemetry-client';
13
13
 
14
14
  export type MonitorCallback = (proofType: ProvingRequestType) => number;
@@ -18,6 +18,7 @@ export class ProvingBrokerInstrumentation {
18
18
  private activeJobs: ObservableGauge;
19
19
  private resolvedJobs: UpDownCounter;
20
20
  private rejectedJobs: UpDownCounter;
21
+ private abortedJobs: UpDownCounter;
21
22
  private timedOutJobs: UpDownCounter;
22
23
  private cachedJobs: UpDownCounter;
23
24
  private totalJobs: UpDownCounter;
@@ -28,49 +29,30 @@ export class ProvingBrokerInstrumentation {
28
29
  constructor(client: TelemetryClient, name = 'ProvingBroker') {
29
30
  const meter = client.getMeter(name);
30
31
 
31
- this.queueSize = meter.createObservableGauge(Metrics.PROVING_QUEUE_SIZE, {
32
- valueType: ValueType.INT,
33
- });
32
+ this.queueSize = meter.createObservableGauge(Metrics.PROVING_QUEUE_SIZE);
34
33
 
35
- this.activeJobs = meter.createObservableGauge(Metrics.PROVING_QUEUE_ACTIVE_JOBS, {
36
- valueType: ValueType.INT,
37
- });
34
+ this.activeJobs = meter.createObservableGauge(Metrics.PROVING_QUEUE_ACTIVE_JOBS);
38
35
 
39
- this.resolvedJobs = meter.createUpDownCounter(Metrics.PROVING_QUEUE_RESOLVED_JOBS, {
40
- valueType: ValueType.INT,
41
- });
36
+ const provingJobTypes = Object.values(ProvingRequestType).filter(v => typeof v === 'string');
37
+ const provingJobAttrs = { [Attributes.PROVING_JOB_TYPE]: provingJobTypes };
42
38
 
43
- this.rejectedJobs = meter.createUpDownCounter(Metrics.PROVING_QUEUE_REJECTED_JOBS, {
44
- valueType: ValueType.INT,
45
- });
39
+ this.resolvedJobs = createUpDownCounterWithDefault(meter, Metrics.PROVING_QUEUE_RESOLVED_JOBS, provingJobAttrs);
46
40
 
47
- this.retriedJobs = meter.createUpDownCounter(Metrics.PROVING_QUEUE_RETRIED_JOBS, {
48
- valueType: ValueType.INT,
49
- });
41
+ this.rejectedJobs = createUpDownCounterWithDefault(meter, Metrics.PROVING_QUEUE_REJECTED_JOBS, provingJobAttrs);
50
42
 
51
- this.timedOutJobs = meter.createUpDownCounter(Metrics.PROVING_QUEUE_TIMED_OUT_JOBS, {
52
- valueType: ValueType.INT,
53
- });
43
+ this.abortedJobs = createUpDownCounterWithDefault(meter, Metrics.PROVING_QUEUE_ABORTED_JOBS, provingJobAttrs);
54
44
 
55
- this.cachedJobs = meter.createUpDownCounter(Metrics.PROVING_QUEUE_CACHED_JOBS, {
56
- valueType: ValueType.INT,
57
- });
45
+ this.retriedJobs = createUpDownCounterWithDefault(meter, Metrics.PROVING_QUEUE_RETRIED_JOBS, provingJobAttrs);
58
46
 
59
- this.totalJobs = meter.createUpDownCounter(Metrics.PROVING_QUEUE_TOTAL_JOBS, {
60
- valueType: ValueType.INT,
61
- });
47
+ this.timedOutJobs = createUpDownCounterWithDefault(meter, Metrics.PROVING_QUEUE_TIMED_OUT_JOBS, provingJobAttrs);
62
48
 
63
- this.jobWait = meter.createHistogram(Metrics.PROVING_QUEUE_JOB_WAIT, {
64
- description: 'Records how long a job sits in the queue',
65
- unit: 'ms',
66
- valueType: ValueType.INT,
67
- });
49
+ this.cachedJobs = createUpDownCounterWithDefault(meter, Metrics.PROVING_QUEUE_CACHED_JOBS, provingJobAttrs);
68
50
 
69
- this.jobDuration = meter.createHistogram(Metrics.PROVING_QUEUE_JOB_DURATION, {
70
- description: 'Records how long a job takes to complete',
71
- unit: 'ms',
72
- valueType: ValueType.INT,
73
- });
51
+ this.totalJobs = createUpDownCounterWithDefault(meter, Metrics.PROVING_QUEUE_TOTAL_JOBS, provingJobAttrs);
52
+
53
+ this.jobWait = meter.createHistogram(Metrics.PROVING_QUEUE_JOB_WAIT);
54
+
55
+ this.jobDuration = meter.createHistogram(Metrics.PROVING_QUEUE_JOB_DURATION);
74
56
  }
75
57
 
76
58
  monitorQueueDepth(fn: MonitorCallback) {
@@ -93,6 +75,12 @@ export class ProvingBrokerInstrumentation {
93
75
  });
94
76
  }
95
77
 
78
+ incAbortedJobs(proofType: ProvingRequestType) {
79
+ this.abortedJobs.add(1, {
80
+ [Attributes.PROVING_JOB_TYPE]: ProvingRequestType[proofType],
81
+ });
82
+ }
83
+
96
84
  incRetriedJobs(proofType: ProvingRequestType) {
97
85
  this.retriedJobs.add(1, {
98
86
  [Attributes.PROVING_JOB_TYPE]: ProvingRequestType[proofType],