@aztec/prover-client 0.0.1-commit.2f68f620 → 0.0.1-commit.3100065
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/light/lightweight_checkpoint_builder.d.ts +1 -1
- package/dest/light/lightweight_checkpoint_builder.d.ts.map +1 -1
- package/dest/light/lightweight_checkpoint_builder.js +3 -1
- package/dest/mocks/test_context.d.ts +9 -11
- package/dest/mocks/test_context.d.ts.map +1 -1
- package/dest/mocks/test_context.js +14 -24
- package/dest/orchestrator/block-building-helpers.d.ts +1 -1
- package/dest/orchestrator/checkpoint-proving-state.d.ts +13 -36
- package/dest/orchestrator/checkpoint-proving-state.d.ts.map +1 -1
- package/dest/orchestrator/checkpoint-proving-state.js +18 -125
- package/dest/orchestrator/checkpoint-sub-tree-orchestrator.d.ts +116 -62
- package/dest/orchestrator/checkpoint-sub-tree-orchestrator.d.ts.map +1 -1
- package/dest/orchestrator/checkpoint-sub-tree-orchestrator.js +1005 -90
- 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 +2 -3
- package/dest/orchestrator/index.d.ts.map +1 -1
- package/dest/orchestrator/index.js +1 -2
- package/dest/orchestrator/proving-scheduler.d.ts +26 -17
- package/dest/orchestrator/proving-scheduler.d.ts.map +1 -1
- package/dest/orchestrator/proving-scheduler.js +28 -25
- package/dest/orchestrator/top-tree-orchestrator.d.ts +11 -6
- package/dest/orchestrator/top-tree-orchestrator.d.ts.map +1 -1
- package/dest/orchestrator/top-tree-orchestrator.js +71 -21
- package/dest/orchestrator/top-tree-proving-state.d.ts +1 -1
- package/dest/orchestrator/top-tree-proving-state.d.ts.map +1 -1
- 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 +17 -19
- package/dest/prover-client/prover-client.d.ts.map +1 -1
- package/dest/prover-client/prover-client.js +24 -25
- 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 +5 -0
- package/dest/proving_broker/proving_broker.d.ts +1 -1
- package/dest/proving_broker/proving_broker.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker.js +60 -17
- package/dest/proving_broker/proving_broker_database/memory.d.ts +3 -1
- package/dest/proving_broker/proving_broker_database/memory.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker_database/memory.js +10 -0
- package/dest/proving_broker/proving_broker_database/persisted.d.ts +13 -2
- package/dest/proving_broker/proving_broker_database/persisted.d.ts.map +1 -1
- package/dest/proving_broker/proving_broker_database/persisted.js +30 -3
- package/dest/proving_broker/proving_broker_database.d.ts +15 -1
- package/dest/proving_broker/proving_broker_database.d.ts.map +1 -1
- 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 +1 -1
- package/dest/test/mock_prover.js +2 -2
- package/package.json +17 -16
- package/src/light/lightweight_checkpoint_builder.ts +2 -0
- package/src/mocks/test_context.ts +15 -36
- package/src/orchestrator/checkpoint-proving-state.ts +14 -168
- package/src/orchestrator/checkpoint-sub-tree-orchestrator.ts +902 -129
- package/src/orchestrator/chonk-cache.ts +99 -0
- package/src/orchestrator/index.ts +1 -2
- package/src/orchestrator/proving-scheduler.ts +29 -25
- package/src/orchestrator/top-tree-orchestrator.ts +114 -44
- package/src/orchestrator/top-tree-proving-state.ts +0 -1
- package/src/orchestrator/tx-proving-state.ts +3 -3
- package/src/prover-client/prover-client.ts +35 -49
- package/src/proving_broker/broker_prover_facade.ts +4 -2
- package/src/proving_broker/proving_broker.ts +57 -17
- package/src/proving_broker/proving_broker_database/memory.ts +10 -0
- package/src/proving_broker/proving_broker_database/persisted.ts +40 -5
- package/src/proving_broker/proving_broker_database.ts +16 -0
- 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-context.d.ts +0 -51
- package/dest/orchestrator/epoch-proving-context.d.ts.map +0 -1
- package/dest/orchestrator/epoch-proving-context.js +0 -81
- 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 -269
- package/dest/orchestrator/orchestrator.d.ts +0 -118
- package/dest/orchestrator/orchestrator.d.ts.map +0 -1
- package/dest/orchestrator/orchestrator.js +0 -1113
- package/dest/orchestrator/top-tree-proving-scheduler.d.ts +0 -62
- package/dest/orchestrator/top-tree-proving-scheduler.d.ts.map +0 -1
- package/dest/orchestrator/top-tree-proving-scheduler.js +0 -73
- 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-context.ts +0 -101
- package/src/orchestrator/epoch-proving-state.ts +0 -380
- package/src/orchestrator/orchestrator.ts +0 -1111
- package/src/orchestrator/top-tree-proving-scheduler.ts +0 -154
- package/src/prover-client/server-epoch-prover.ts +0 -69
|
@@ -272,15 +272,40 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Pr
|
|
|
272
272
|
|
|
273
273
|
async #enqueueProvingJob(job: ProvingJob): Promise<ProvingJobStatus> {
|
|
274
274
|
// We return the job status at the start of this call
|
|
275
|
-
|
|
275
|
+
let jobStatus = this.#getProvingJobStatus(job.id);
|
|
276
276
|
if (this.jobsCache.has(job.id)) {
|
|
277
277
|
const existing = this.jobsCache.get(job.id);
|
|
278
278
|
assert.deepStrictEqual(job, existing, 'Duplicate proving job ID');
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
279
|
+
|
|
280
|
+
if (this.resultsCache.get(job.id)?.status === 'aborted') {
|
|
281
|
+
// The producer is re-requesting a job it previously cancelled: revive it rather than
|
|
282
|
+
// returning the cached abort, clearing the aborted state in memory and in the database so the
|
|
283
|
+
// revival survives a restart.
|
|
284
|
+
//
|
|
285
|
+
// Concurrency model: `jobsCache` is the enqueue lock. Every path that puts a job on the queue
|
|
286
|
+
// populates `jobsCache` *synchronously, before its first await* (see the "New proving job"
|
|
287
|
+
// block below), so a second concurrent enqueue of the same id observes the entry at the top
|
|
288
|
+
// of this method and takes a cached, no-op branch instead of enqueuing a duplicate. The revive
|
|
289
|
+
// must keep holding that lock: we tear down the settled state and re-set `jobsCache` in a
|
|
290
|
+
// single synchronous span (no await in between), and only then await the database. Because a
|
|
291
|
+
// concurrent re-request can only interleave at that await — by which point `jobsCache` is
|
|
292
|
+
// populated again and the aborted result is gone — it falls into the cached branch and no-ops,
|
|
293
|
+
// so the job is enqueued exactly once. (`cleanUpProvingJobState` also drops the promise, which
|
|
294
|
+
// was resolved with the abort, so `enqueueJobInternal` below mints a fresh one for the retry.)
|
|
295
|
+
this.logger.info(`Reviving aborted proving job id=${job.id} epochNumber=${job.epochNumber}`, {
|
|
296
|
+
provingJobId: job.id,
|
|
297
|
+
});
|
|
298
|
+
this.cleanUpProvingJobState([job.id]);
|
|
299
|
+
this.jobsCache.set(job.id, job);
|
|
300
|
+
await this.database.deleteProvingJobResult(job.id);
|
|
301
|
+
jobStatus = this.#getProvingJobStatus(job.id);
|
|
302
|
+
} else {
|
|
303
|
+
this.logger.warn(`Cached proving job id=${job.id} epochNumber=${job.epochNumber}. Not enqueuing again`, {
|
|
304
|
+
provingJobId: job.id,
|
|
305
|
+
});
|
|
306
|
+
this.instrumentation.incCachedJobs(job.type);
|
|
307
|
+
return jobStatus;
|
|
308
|
+
}
|
|
284
309
|
}
|
|
285
310
|
|
|
286
311
|
if (this.isJobStale(job)) {
|
|
@@ -306,15 +331,35 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Pr
|
|
|
306
331
|
}
|
|
307
332
|
|
|
308
333
|
async #cancelProvingJob(id: ProvingJobId): Promise<void> {
|
|
309
|
-
|
|
334
|
+
const job = this.jobsCache.get(id);
|
|
335
|
+
if (!job) {
|
|
310
336
|
this.logger.warn(`Can't cancel a job that doesn't exist id=${id}`, { provingJobId: id });
|
|
311
337
|
return;
|
|
312
338
|
}
|
|
313
339
|
|
|
314
|
-
//
|
|
315
|
-
if (
|
|
316
|
-
|
|
317
|
-
|
|
340
|
+
// Leave jobs that have already settled (completed or failed) alone: those results are terminal.
|
|
341
|
+
if (this.resultsCache.has(id)) {
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
this.logger.info(`Cancelling job id=${id}`, { provingJobId: id });
|
|
346
|
+
this.inProgress.delete(id);
|
|
347
|
+
|
|
348
|
+
// Record the cancellation as its own settled state and persist it, so it survives a restart and
|
|
349
|
+
// notifies the current waiter. Unlike a completion or failure this is not terminal: re-enqueuing
|
|
350
|
+
// the same job id revives it (see #enqueueProvingJob), so the abort never permanently blocks the
|
|
351
|
+
// proof.
|
|
352
|
+
const result: ProvingJobSettledResult = { status: 'aborted' };
|
|
353
|
+
this.resultsCache.set(id, result);
|
|
354
|
+
this.promises.get(id)?.resolve(result);
|
|
355
|
+
this.completedJobNotifications.push(id);
|
|
356
|
+
this.instrumentation.incAbortedJobs(job.type);
|
|
357
|
+
|
|
358
|
+
try {
|
|
359
|
+
await this.database.setProvingJobAborted(id);
|
|
360
|
+
} catch (saveErr) {
|
|
361
|
+
this.logger.error(`Failed to save proving job aborted status id=${id}`, saveErr, { provingJobId: id });
|
|
362
|
+
throw saveErr;
|
|
318
363
|
}
|
|
319
364
|
}
|
|
320
365
|
|
|
@@ -401,7 +446,6 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Pr
|
|
|
401
446
|
err: string,
|
|
402
447
|
retry = false,
|
|
403
448
|
filter?: ProvingJobFilter,
|
|
404
|
-
aborted = false,
|
|
405
449
|
): Promise<GetProvingJobResponse | undefined> {
|
|
406
450
|
const info = this.inProgress.get(id);
|
|
407
451
|
const item = this.jobsCache.get(id);
|
|
@@ -462,11 +506,7 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer, Pr
|
|
|
462
506
|
this.promises.get(id)!.resolve(result);
|
|
463
507
|
this.completedJobNotifications.push(id);
|
|
464
508
|
|
|
465
|
-
|
|
466
|
-
this.instrumentation.incAbortedJobs(item.type);
|
|
467
|
-
} else {
|
|
468
|
-
this.instrumentation.incRejectedJobs(item.type);
|
|
469
|
-
}
|
|
509
|
+
this.instrumentation.incRejectedJobs(item.type);
|
|
470
510
|
if (info) {
|
|
471
511
|
const duration = this.msTimeSource() - info.startedAt;
|
|
472
512
|
this.instrumentation.recordJobDuration(item.type, duration);
|
|
@@ -36,6 +36,16 @@ export class InMemoryBrokerDatabase implements ProvingBrokerDatabase {
|
|
|
36
36
|
return Promise.resolve();
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
setProvingJobAborted(id: ProvingJobId): Promise<void> {
|
|
40
|
+
this.results.set(id, { status: 'aborted' });
|
|
41
|
+
return Promise.resolve();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
deleteProvingJobResult(id: ProvingJobId): Promise<void> {
|
|
45
|
+
this.results.delete(id);
|
|
46
|
+
return Promise.resolve();
|
|
47
|
+
}
|
|
48
|
+
|
|
39
49
|
deleteProvingJobs(ids: ProvingJobId[]): Promise<void> {
|
|
40
50
|
for (const id of ids) {
|
|
41
51
|
this.jobs.delete(id);
|
|
@@ -41,7 +41,11 @@ class SingleEpochDatabase {
|
|
|
41
41
|
return this.store.estimateSize();
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
async batchWrite(
|
|
44
|
+
async batchWrite(
|
|
45
|
+
jobs: ProvingJob[],
|
|
46
|
+
results: Array<[ProvingJobId, ProvingJobSettledResult]>,
|
|
47
|
+
deletedResults: ProvingJobId[] = [],
|
|
48
|
+
) {
|
|
45
49
|
await this.store.transactionAsync(async () => {
|
|
46
50
|
for (const job of jobs) {
|
|
47
51
|
await this.jobs.set(job.id, jsonStringify(job));
|
|
@@ -49,6 +53,11 @@ class SingleEpochDatabase {
|
|
|
49
53
|
for (const [id, result] of results) {
|
|
50
54
|
await this.jobResults.set(id, jsonStringify(result));
|
|
51
55
|
}
|
|
56
|
+
// Deletes are applied after sets so that, if a set and a delete for the same id land in one
|
|
57
|
+
// batch (e.g. an abort immediately followed by a revive's result-delete), the delete wins.
|
|
58
|
+
for (const id of deletedResults) {
|
|
59
|
+
await this.jobResults.delete(id);
|
|
60
|
+
}
|
|
52
61
|
});
|
|
53
62
|
}
|
|
54
63
|
|
|
@@ -66,6 +75,11 @@ class SingleEpochDatabase {
|
|
|
66
75
|
await this.jobResults.set(id, jsonStringify(result));
|
|
67
76
|
}
|
|
68
77
|
|
|
78
|
+
async setProvingJobAborted(id: ProvingJobId): Promise<void> {
|
|
79
|
+
const result: ProvingJobSettledResult = { status: 'aborted' };
|
|
80
|
+
await this.jobResults.set(id, jsonStringify(result));
|
|
81
|
+
}
|
|
82
|
+
|
|
69
83
|
async setProvingJobResult(id: ProvingJobId, value: ProofUri): Promise<void> {
|
|
70
84
|
const result: ProvingJobSettledResult = { status: 'fulfilled', value };
|
|
71
85
|
await this.jobResults.set(id, jsonStringify(result));
|
|
@@ -80,10 +94,19 @@ class SingleEpochDatabase {
|
|
|
80
94
|
}
|
|
81
95
|
}
|
|
82
96
|
|
|
97
|
+
/**
|
|
98
|
+
* An item queued for a batched write. A {@link ProvingJob} adds/updates a job; a `[id, result]`
|
|
99
|
+
* tuple sets a job's settled result; a `[id, undefined]` tuple deletes a job's result. Deletes ride
|
|
100
|
+
* the same queue as writes so they stay FIFO-ordered against them: a revive's result-delete must
|
|
101
|
+
* land after the abort that preceded it, otherwise a still-queued abort could flush later and
|
|
102
|
+
* resurrect the cancelled state on disk.
|
|
103
|
+
*/
|
|
104
|
+
type BrokerWrite = ProvingJob | [ProvingJobId, ProvingJobSettledResult | undefined];
|
|
105
|
+
|
|
83
106
|
export class KVBrokerDatabase implements ProvingBrokerDatabase {
|
|
84
107
|
private metrics: LmdbMetrics;
|
|
85
108
|
|
|
86
|
-
private batchQueue: BatchQueue<
|
|
109
|
+
private batchQueue: BatchQueue<BrokerWrite, number>;
|
|
87
110
|
|
|
88
111
|
public readonly tracer: Tracer;
|
|
89
112
|
|
|
@@ -112,12 +135,16 @@ export class KVBrokerDatabase implements ProvingBrokerDatabase {
|
|
|
112
135
|
}
|
|
113
136
|
|
|
114
137
|
// exposed for testing
|
|
115
|
-
public async commitWrites(items: Array<
|
|
138
|
+
public async commitWrites(items: Array<BrokerWrite>, epochNumber: number) {
|
|
116
139
|
const jobsToAdd = items.filter((item): item is ProvingJob => 'id' in item);
|
|
117
|
-
const
|
|
140
|
+
const resultOps = items.filter((item): item is [ProvingJobId, ProvingJobSettledResult | undefined] =>
|
|
141
|
+
Array.isArray(item),
|
|
142
|
+
);
|
|
143
|
+
const resultsToSet = resultOps.filter((op): op is [ProvingJobId, ProvingJobSettledResult] => op[1] !== undefined);
|
|
144
|
+
const resultsToDelete = resultOps.filter(op => op[1] === undefined).map(([id]) => id);
|
|
118
145
|
|
|
119
146
|
const db = await this.getEpochDatabase(EpochNumber(epochNumber));
|
|
120
|
-
await db.batchWrite(jobsToAdd,
|
|
147
|
+
await db.batchWrite(jobsToAdd, resultsToSet, resultsToDelete);
|
|
121
148
|
}
|
|
122
149
|
|
|
123
150
|
private async estimateSize() {
|
|
@@ -207,6 +234,14 @@ export class KVBrokerDatabase implements ProvingBrokerDatabase {
|
|
|
207
234
|
return this.batchQueue.put([id, { status: 'rejected', reason }], getEpochFromProvingJobId(id));
|
|
208
235
|
}
|
|
209
236
|
|
|
237
|
+
setProvingJobAborted(id: ProvingJobId): Promise<void> {
|
|
238
|
+
return this.batchQueue.put([id, { status: 'aborted' }], getEpochFromProvingJobId(id));
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
deleteProvingJobResult(id: ProvingJobId): Promise<void> {
|
|
242
|
+
return this.batchQueue.put([id, undefined], getEpochFromProvingJobId(id));
|
|
243
|
+
}
|
|
244
|
+
|
|
210
245
|
setProvingJobResult(id: ProvingJobId, value: ProofUri): Promise<void> {
|
|
211
246
|
return this.batchQueue.put([id, { status: 'fulfilled', value }], getEpochFromProvingJobId(id));
|
|
212
247
|
}
|
|
@@ -38,6 +38,22 @@ export interface ProvingBrokerDatabase {
|
|
|
38
38
|
*/
|
|
39
39
|
setProvingJobError(id: ProvingJobId, err: string): Promise<void>;
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Records that a proof request was cancelled. Unlike a result or error this is not terminal:
|
|
43
|
+
* re-enqueuing the same job id revives it, so the aborted state can survive a restart without
|
|
44
|
+
* permanently blocking the proof.
|
|
45
|
+
* @param id - The ID of the cancelled proof request
|
|
46
|
+
*/
|
|
47
|
+
setProvingJobAborted(id: ProvingJobId): Promise<void>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Clears any stored result for a proof request, returning it to the pending state while keeping
|
|
51
|
+
* the job itself. Used when reviving an aborted job so the revival is persisted and a restart
|
|
52
|
+
* cannot resurrect the stale aborted state.
|
|
53
|
+
* @param id - The ID of the proof request whose result should be cleared
|
|
54
|
+
*/
|
|
55
|
+
deleteProvingJobResult(id: ProvingJobId): Promise<void>;
|
|
56
|
+
|
|
41
57
|
/**
|
|
42
58
|
* Closes the database
|
|
43
59
|
*/
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { RollupCheatCodes } from '@aztec/ethereum/test';
|
|
2
|
+
import type { CheckpointNumber, EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
+
import type { Logger } from '@aztec/foundation/log';
|
|
5
|
+
import type { L2BlockSource } from '@aztec/stdlib/block';
|
|
6
|
+
import { computeEpochOutHash } from '@aztec/stdlib/messaging';
|
|
7
|
+
|
|
8
|
+
/** Arguments for {@link settleEpochOutbox}. */
|
|
9
|
+
export type SettleEpochOutboxArgs = {
|
|
10
|
+
/** Cheat codes used to write the computed out hash directly into the L1 Outbox storage. */
|
|
11
|
+
rollupCheatCodes: RollupCheatCodes;
|
|
12
|
+
/** Source of checkpointed L2 blocks for the epoch being settled. */
|
|
13
|
+
l2BlockSource: L2BlockSource;
|
|
14
|
+
/** Epoch to settle. */
|
|
15
|
+
epoch: EpochNumber;
|
|
16
|
+
/**
|
|
17
|
+
* When set, only checkpoints up to and including this number are covered. Used to settle a partial
|
|
18
|
+
* epoch (the AZIP-14 Outbox keeps one root per `numCheckpointsInEpoch`, so a prefix of an epoch can
|
|
19
|
+
* be settled and consumed before the epoch completes). When omitted, every checkpointed block in the
|
|
20
|
+
* epoch is covered.
|
|
21
|
+
*/
|
|
22
|
+
maxCheckpoint?: CheckpointNumber;
|
|
23
|
+
log: Logger;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Computes the epoch out hash over the checkpointed blocks of an epoch (optionally only up to
|
|
28
|
+
* `maxCheckpoint`) and writes it into the L1 Outbox via cheat codes. This is the synthetic,
|
|
29
|
+
* no-prover equivalent of an epoch root proof landing on L1: it makes the L2-to-L1 messages in the
|
|
30
|
+
* covered checkpoints consumable. It does NOT advance the rollup's proven tip — callers
|
|
31
|
+
* `markAsProven` separately so a single prove call can settle multiple epochs before marking proven.
|
|
32
|
+
*
|
|
33
|
+
* Used by the test-only proving drivers: the `AutomineSequencer`'s auto-settle loop and the standalone
|
|
34
|
+
* `EpochTestSettler`. Lives here (rather than in either consumer) so both share one implementation.
|
|
35
|
+
*
|
|
36
|
+
* @returns The last checkpoint number covered by the settled range, or `undefined` if the epoch has
|
|
37
|
+
* no checkpointed blocks (within the `maxCheckpoint` bound).
|
|
38
|
+
*/
|
|
39
|
+
export async function settleEpochOutbox({
|
|
40
|
+
rollupCheatCodes,
|
|
41
|
+
l2BlockSource,
|
|
42
|
+
epoch,
|
|
43
|
+
maxCheckpoint,
|
|
44
|
+
log,
|
|
45
|
+
}: SettleEpochOutboxArgs): Promise<CheckpointNumber | undefined> {
|
|
46
|
+
let blocks = await l2BlockSource.getBlocks({ epoch, onlyCheckpointed: true });
|
|
47
|
+
if (maxCheckpoint !== undefined) {
|
|
48
|
+
blocks = blocks.filter(block => block.checkpointNumber <= maxCheckpoint);
|
|
49
|
+
}
|
|
50
|
+
if (blocks.length === 0) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
log.info(
|
|
55
|
+
`Settling epoch ${epoch}${maxCheckpoint !== undefined ? ` up to checkpoint ${maxCheckpoint}` : ''} with blocks ${blocks[0]?.header.getBlockNumber()} to ${blocks.at(-1)?.header.getBlockNumber()}`,
|
|
56
|
+
{ epoch, maxCheckpoint, blocks: blocks.map(block => block.toBlockInfo()) },
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
const messagesInEpoch: Fr[][][][] = [];
|
|
60
|
+
// Undefined (not SlotNumber.ZERO) so a first checkpointed block at slot 0 still opens checkpoint 0.
|
|
61
|
+
let previousSlotNumber: SlotNumber | undefined;
|
|
62
|
+
let checkpointIndex = -1;
|
|
63
|
+
|
|
64
|
+
for (const block of blocks) {
|
|
65
|
+
const slotNumber = block.header.globalVariables.slotNumber;
|
|
66
|
+
if (slotNumber !== previousSlotNumber) {
|
|
67
|
+
checkpointIndex++;
|
|
68
|
+
messagesInEpoch[checkpointIndex] = [];
|
|
69
|
+
previousSlotNumber = slotNumber;
|
|
70
|
+
}
|
|
71
|
+
messagesInEpoch[checkpointIndex].push(block.body.txEffects.map(txEffect => txEffect.l2ToL1Msgs));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const outHash = computeEpochOutHash(messagesInEpoch);
|
|
75
|
+
if (!outHash.isZero()) {
|
|
76
|
+
await rollupCheatCodes.insertOutbox(epoch, messagesInEpoch.length, outHash.toBigInt());
|
|
77
|
+
} else {
|
|
78
|
+
log.info(`No L2 to L1 messages in epoch ${epoch}`, { epoch });
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return blocks.at(-1)?.checkpointNumber;
|
|
82
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { settleEpochOutbox, type SettleEpochOutboxArgs } from './epoch_settlement.js';
|
package/src/test/mock_prover.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
AVM_V2_PROOF_LENGTH_IN_FIELDS,
|
|
3
3
|
NESTED_RECURSIVE_PROOF_LENGTH,
|
|
4
4
|
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
|
|
5
5
|
RECURSIVE_PROOF_LENGTH,
|
|
@@ -104,7 +104,7 @@ export class MockProver implements ServerCircuitProver {
|
|
|
104
104
|
constructor() {}
|
|
105
105
|
|
|
106
106
|
getAvmProof(_inputs: AvmCircuitInputs, _signal?: AbortSignal, _epochNumber?: number) {
|
|
107
|
-
return Promise.resolve(makeEmptyRecursiveProof(
|
|
107
|
+
return Promise.resolve(makeEmptyRecursiveProof(AVM_V2_PROOF_LENGTH_IN_FIELDS));
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
getBaseParityProof(_inputs: ParityBasePrivateInputs, _signal?: AbortSignal, _epochNumber?: number) {
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
|
|
2
|
-
import type { EpochNumber } from '@aztec/foundation/branded-types';
|
|
3
|
-
import { type LoggerBindings } from '@aztec/foundation/log';
|
|
4
|
-
import type { PublicInputsAndRecursiveProof, ServerCircuitProver } from '@aztec/stdlib/interfaces/server';
|
|
5
|
-
import type { PublicChonkVerifierPrivateInputs, PublicChonkVerifierPublicInputs } from '@aztec/stdlib/rollup';
|
|
6
|
-
/**
|
|
7
|
-
* Result of a chonk-verifier proof, cached per tx hash on `EpochProvingContext`.
|
|
8
|
-
*/
|
|
9
|
-
export type ChonkVerifierProofResult = PublicInputsAndRecursiveProof<PublicChonkVerifierPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>;
|
|
10
|
-
/**
|
|
11
|
-
* Per-epoch state shared across every `CheckpointSubTreeOrchestrator` constructed for
|
|
12
|
-
* the same epoch. Owns the chonk-verifier proof cache so a tx whose checkpoint is
|
|
13
|
-
* reorged out and re-appears in a replacement checkpoint does not have to re-prove
|
|
14
|
-
* its chonk circuit.
|
|
15
|
-
*
|
|
16
|
-
* The context's chonk-verifier broker jobs are deliberately submitted **outside** the
|
|
17
|
-
* sub-tree's deferred-proving queue. The sub-tree's `cancel()` therefore does not abort
|
|
18
|
-
* them — by design, because their result is tx-scoped, not sub-tree-scoped, and a
|
|
19
|
-
* replacement sub-tree should be able to consume the cached proof.
|
|
20
|
-
*
|
|
21
|
-
* Callers (`EpochProvingJob`, or unit tests) construct one context per epoch and pass
|
|
22
|
-
* it into every sub-tree they create. `stop()` aborts every in-flight chonk job.
|
|
23
|
-
*/
|
|
24
|
-
export declare class EpochProvingContext {
|
|
25
|
-
private readonly prover;
|
|
26
|
-
readonly epochNumber: EpochNumber;
|
|
27
|
-
private readonly cache;
|
|
28
|
-
/** Abort controllers for in-flight chonk jobs, keyed by tx hash. */
|
|
29
|
-
private readonly pending;
|
|
30
|
-
private readonly log;
|
|
31
|
-
private stopped;
|
|
32
|
-
constructor(prover: ServerCircuitProver, epochNumber: EpochNumber, bindings?: LoggerBindings);
|
|
33
|
-
/**
|
|
34
|
-
* Returns the cached chonk-verifier proof promise for the given tx hash, or
|
|
35
|
-
* `undefined` if none has been enqueued yet. Non-mutating.
|
|
36
|
-
*/
|
|
37
|
-
getCached(txHash: string): Promise<ChonkVerifierProofResult> | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Enqueues a chonk-verifier proof for the given tx hash, returning the promise (or
|
|
40
|
-
* the already-cached one if already enqueued). The promise resolves when the broker
|
|
41
|
-
* delivers the result; on rejection (including `stop()`), the cache entry is removed
|
|
42
|
-
* so a subsequent caller can re-enqueue.
|
|
43
|
-
*/
|
|
44
|
-
enqueue(txHash: string, inputs: PublicChonkVerifierPrivateInputs): Promise<ChonkVerifierProofResult>;
|
|
45
|
-
/**
|
|
46
|
-
* Aborts every in-flight chonk-verifier broker job and clears the cache. Called by
|
|
47
|
-
* the owning `EpochProvingJob` when the job stops.
|
|
48
|
-
*/
|
|
49
|
-
stop(): void;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXBvY2gtcHJvdmluZy1jb250ZXh0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvb3JjaGVzdHJhdG9yL2Vwb2NoLXByb3ZpbmctY29udGV4dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSx5Q0FBeUMsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBQ2xGLE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ25FLE9BQU8sRUFBZSxLQUFLLGNBQWMsRUFBZ0IsTUFBTSx1QkFBdUIsQ0FBQztBQUN2RixPQUFPLEtBQUssRUFBRSw2QkFBNkIsRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQzFHLE9BQU8sS0FBSyxFQUFFLGdDQUFnQyxFQUFFLCtCQUErQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFFOUc7O0dBRUc7QUFDSCxNQUFNLE1BQU0sd0JBQXdCLEdBQUcsNkJBQTZCLENBQ2xFLCtCQUErQixFQUMvQixPQUF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AAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC1G,OAAO,KAAK,EAAE,gCAAgC,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AAE9G;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,6BAA6B,CAClE,+BAA+B,EAC/B,OAAO,yCAAyC,CACjD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,qBAAa,mBAAmB;IAQ5B,OAAO,CAAC,QAAQ,CAAC,MAAM;aACP,WAAW,EAAE,WAAW;IAR1C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwD;IAC9E,oEAAoE;IACpE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsC;IAC9D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,OAAO,CAAS;IAExB,YACmB,MAAM,EAAE,mBAAmB,EAC5B,WAAW,EAAE,WAAW,EACxC,QAAQ,CAAC,EAAE,cAAc,EAG1B;IAED;;;OAGG;IACI,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,GAAG,SAAS,CAE9E;IAED;;;;;OAKG;IACI,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gCAAgC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CA6B1G;IAED;;;OAGG;IACI,IAAI,SAOV;CACF"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
-
/**
|
|
3
|
-
* Per-epoch state shared across every `CheckpointSubTreeOrchestrator` constructed for
|
|
4
|
-
* the same epoch. Owns the chonk-verifier proof cache so a tx whose checkpoint is
|
|
5
|
-
* reorged out and re-appears in a replacement checkpoint does not have to re-prove
|
|
6
|
-
* its chonk circuit.
|
|
7
|
-
*
|
|
8
|
-
* The context's chonk-verifier broker jobs are deliberately submitted **outside** the
|
|
9
|
-
* sub-tree's deferred-proving queue. The sub-tree's `cancel()` therefore does not abort
|
|
10
|
-
* them — by design, because their result is tx-scoped, not sub-tree-scoped, and a
|
|
11
|
-
* replacement sub-tree should be able to consume the cached proof.
|
|
12
|
-
*
|
|
13
|
-
* Callers (`EpochProvingJob`, or unit tests) construct one context per epoch and pass
|
|
14
|
-
* it into every sub-tree they create. `stop()` aborts every in-flight chonk job.
|
|
15
|
-
*/ export class EpochProvingContext {
|
|
16
|
-
prover;
|
|
17
|
-
epochNumber;
|
|
18
|
-
cache;
|
|
19
|
-
/** Abort controllers for in-flight chonk jobs, keyed by tx hash. */ pending;
|
|
20
|
-
log;
|
|
21
|
-
stopped;
|
|
22
|
-
constructor(prover, epochNumber, bindings){
|
|
23
|
-
this.prover = prover;
|
|
24
|
-
this.epochNumber = epochNumber;
|
|
25
|
-
this.cache = new Map();
|
|
26
|
-
this.pending = new Map();
|
|
27
|
-
this.stopped = false;
|
|
28
|
-
this.log = createLogger('prover-client:epoch-proving-context', bindings);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Returns the cached chonk-verifier proof promise for the given tx hash, or
|
|
32
|
-
* `undefined` if none has been enqueued yet. Non-mutating.
|
|
33
|
-
*/ getCached(txHash) {
|
|
34
|
-
return this.cache.get(txHash);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Enqueues a chonk-verifier proof for the given tx hash, returning the promise (or
|
|
38
|
-
* the already-cached one if already enqueued). The promise resolves when the broker
|
|
39
|
-
* delivers the result; on rejection (including `stop()`), the cache entry is removed
|
|
40
|
-
* so a subsequent caller can re-enqueue.
|
|
41
|
-
*/ enqueue(txHash, inputs) {
|
|
42
|
-
if (this.stopped) {
|
|
43
|
-
return Promise.reject(new Error('EpochProvingContext is stopped'));
|
|
44
|
-
}
|
|
45
|
-
const cached = this.cache.get(txHash);
|
|
46
|
-
if (cached) {
|
|
47
|
-
return cached;
|
|
48
|
-
}
|
|
49
|
-
const controller = new AbortController();
|
|
50
|
-
this.pending.set(txHash, controller);
|
|
51
|
-
this.log.debug(`Enqueueing chonk-verifier circuit`, {
|
|
52
|
-
txHash,
|
|
53
|
-
epochNumber: this.epochNumber
|
|
54
|
-
});
|
|
55
|
-
const promise = this.prover.getPublicChonkVerifierProof(inputs, controller.signal, this.epochNumber).finally(()=>this.pending.delete(txHash));
|
|
56
|
-
// Self-clean on rejection so a future caller can re-enqueue. Mark the rejection
|
|
57
|
-
// path as observed to silence unhandled-rejection warnings when no consumer
|
|
58
|
-
// awaits the promise (e.g. when the only `.then` chain belonged to a cancelled
|
|
59
|
-
// sub-tree's tx-proving state).
|
|
60
|
-
promise.catch((err)=>{
|
|
61
|
-
this.cache.delete(txHash);
|
|
62
|
-
this.log.debug(`Chonk-verifier proof failed; evicted from cache`, {
|
|
63
|
-
txHash,
|
|
64
|
-
error: `${err}`
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
this.cache.set(txHash, promise);
|
|
68
|
-
return promise;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Aborts every in-flight chonk-verifier broker job and clears the cache. Called by
|
|
72
|
-
* the owning `EpochProvingJob` when the job stops.
|
|
73
|
-
*/ stop() {
|
|
74
|
-
this.stopped = true;
|
|
75
|
-
for (const controller of this.pending.values()){
|
|
76
|
-
controller.abort();
|
|
77
|
-
}
|
|
78
|
-
this.pending.clear();
|
|
79
|
-
this.cache.clear();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { BatchedBlob, type FinalBlobBatchingChallenges } from '@aztec/blob-lib';
|
|
2
|
-
import { type ARCHIVE_HEIGHT, type L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH, type NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
|
|
3
|
-
import { BlockNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
4
|
-
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
5
|
-
import type { Tuple } from '@aztec/foundation/serialize';
|
|
6
|
-
import { type TreeNodeLocation } from '@aztec/foundation/trees';
|
|
7
|
-
import type { PublicInputsAndRecursiveProof } from '@aztec/stdlib/interfaces/server';
|
|
8
|
-
import type { Proof } from '@aztec/stdlib/proofs';
|
|
9
|
-
import { CheckpointConstantData, CheckpointMergeRollupPrivateInputs, CheckpointPaddingRollupPrivateInputs, CheckpointRollupPublicInputs, PublicChonkVerifierPublicInputs, RootRollupPrivateInputs, type RootRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
10
|
-
import { AppendOnlyTreeSnapshot, type MerkleTreeId } from '@aztec/stdlib/trees';
|
|
11
|
-
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
12
|
-
import { CheckpointProvingState } from './checkpoint-proving-state.js';
|
|
13
|
-
export type TreeSnapshots = Map<MerkleTreeId, AppendOnlyTreeSnapshot>;
|
|
14
|
-
export type ProvingResult = {
|
|
15
|
-
status: 'success';
|
|
16
|
-
} | {
|
|
17
|
-
status: 'failure';
|
|
18
|
-
reason: string;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* The current state of the proving schedule for an epoch.
|
|
22
|
-
* Contains the raw inputs and intermediate state to generate every constituent proof in the tree.
|
|
23
|
-
* Carries an identifier so we can identify if the proving state is discarded and a new one started.
|
|
24
|
-
* Captures resolve and reject callbacks to provide a promise base interface to the consumer of our proving.
|
|
25
|
-
*/
|
|
26
|
-
export declare class EpochProvingState {
|
|
27
|
-
#private;
|
|
28
|
-
readonly epochNumber: EpochNumber;
|
|
29
|
-
readonly totalNumCheckpoints: number;
|
|
30
|
-
private readonly finalBlobBatchingChallenges;
|
|
31
|
-
private onCheckpointBlobAccumulatorSet;
|
|
32
|
-
private completionCallback;
|
|
33
|
-
private rejectionCallback;
|
|
34
|
-
private checkpointProofs;
|
|
35
|
-
private checkpointPaddingProof;
|
|
36
|
-
private rootRollupProof;
|
|
37
|
-
private checkpoints;
|
|
38
|
-
private startBlobAccumulator;
|
|
39
|
-
private endBlobAccumulator;
|
|
40
|
-
private finalBatchedBlob;
|
|
41
|
-
private provingStateLifecycle;
|
|
42
|
-
readonly cachedChonkVerifierProofs: Map<string, Promise<PublicInputsAndRecursiveProof<PublicChonkVerifierPublicInputs, 480>>>;
|
|
43
|
-
constructor(epochNumber: EpochNumber, totalNumCheckpoints: number, finalBlobBatchingChallenges: FinalBlobBatchingChallenges, onCheckpointBlobAccumulatorSet: (checkpoint: CheckpointProvingState) => Promise<void>, completionCallback: (result: ProvingResult) => void, rejectionCallback: (reason: string) => void);
|
|
44
|
-
startNewCheckpoint(checkpointIndex: number, constants: CheckpointConstantData, totalNumBlocks: number, previousBlockHeader: BlockHeader, lastArchiveSiblingPath: Tuple<Fr, typeof ARCHIVE_HEIGHT>, l1ToL2Messages: Fr[], lastL1ToL2MessageTreeSnapshot: AppendOnlyTreeSnapshot, lastL1ToL2MessageSubtreeRootSiblingPath: Tuple<Fr, typeof L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH>, newL1ToL2MessageTreeSnapshot: AppendOnlyTreeSnapshot, newL1ToL2MessageSubtreeRootSiblingPath: Tuple<Fr, typeof L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH>): CheckpointProvingState;
|
|
45
|
-
getCheckpointProvingState(index: number): CheckpointProvingState | undefined;
|
|
46
|
-
getCheckpointProvingStateByBlockNumber(blockNumber: BlockNumber): CheckpointProvingState | undefined;
|
|
47
|
-
getBlockProvingStateByBlockNumber(blockNumber: BlockNumber): import("./block-proving-state.js").BlockProvingState | undefined;
|
|
48
|
-
verifyState(): boolean;
|
|
49
|
-
isAcceptingCheckpoints(): boolean;
|
|
50
|
-
setCheckpointRootRollupProof(checkpointIndex: number, provingOutput: PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>): TreeNodeLocation;
|
|
51
|
-
tryStartProvingCheckpointMerge(location: TreeNodeLocation): boolean;
|
|
52
|
-
setCheckpointMergeRollupProof(location: TreeNodeLocation, provingOutput: PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>): void;
|
|
53
|
-
tryStartProvingRootRollup(): boolean;
|
|
54
|
-
setRootRollupProof(provingOutput: PublicInputsAndRecursiveProof<RootRollupPublicInputs>): void;
|
|
55
|
-
tryStartProvingPaddingCheckpoint(): boolean;
|
|
56
|
-
setCheckpointPaddingProof(provingOutput: PublicInputsAndRecursiveProof<CheckpointRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>): void;
|
|
57
|
-
accumulateCheckpointOutHashes(): Promise<void>;
|
|
58
|
-
setBlobAccumulators(): Promise<void>;
|
|
59
|
-
finalizeBatchedBlob(): Promise<void>;
|
|
60
|
-
getParentLocation(location: TreeNodeLocation): TreeNodeLocation;
|
|
61
|
-
getCheckpointMergeRollupInputs(mergeLocation: TreeNodeLocation): CheckpointMergeRollupPrivateInputs;
|
|
62
|
-
getRootRollupInputs(): RootRollupPrivateInputs;
|
|
63
|
-
getPaddingCheckpointInputs(): CheckpointPaddingRollupPrivateInputs;
|
|
64
|
-
getEpochProofResult(): {
|
|
65
|
-
proof: Proof;
|
|
66
|
-
publicInputs: RootRollupPublicInputs;
|
|
67
|
-
batchedBlobInputs: BatchedBlob;
|
|
68
|
-
};
|
|
69
|
-
isReadyForCheckpointMerge(location: TreeNodeLocation): boolean;
|
|
70
|
-
isReadyForRootRollup(): boolean;
|
|
71
|
-
cancel(): void;
|
|
72
|
-
reject(reason: string): void;
|
|
73
|
-
resolve(result: ProvingResult): void;
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXBvY2gtcHJvdmluZy1zdGF0ZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL29yY2hlc3RyYXRvci9lcG9jaC1wcm92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