@aztec/prover-node 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.
Files changed (65) hide show
  1. package/README.md +511 -0
  2. package/dest/actions/rerun-epoch-proving-job.d.ts +3 -3
  3. package/dest/actions/rerun-epoch-proving-job.d.ts.map +1 -1
  4. package/dest/actions/rerun-epoch-proving-job.js +106 -104
  5. package/dest/checkpoint-store.d.ts +88 -0
  6. package/dest/checkpoint-store.d.ts.map +1 -0
  7. package/dest/checkpoint-store.js +169 -0
  8. package/dest/config.d.ts +1 -3
  9. package/dest/config.d.ts.map +1 -1
  10. package/dest/config.js +1 -8
  11. package/dest/factory.d.ts +1 -1
  12. package/dest/factory.d.ts.map +1 -1
  13. package/dest/factory.js +1 -7
  14. package/dest/index.d.ts +2 -1
  15. package/dest/index.d.ts.map +1 -1
  16. package/dest/index.js +1 -0
  17. package/dest/job/checkpoint-prover.d.ts +124 -0
  18. package/dest/job/checkpoint-prover.d.ts.map +1 -0
  19. package/dest/job/checkpoint-prover.js +330 -0
  20. package/dest/job/epoch-session.d.ts +146 -0
  21. package/dest/job/epoch-session.d.ts.map +1 -0
  22. package/dest/job/epoch-session.js +720 -0
  23. package/dest/job/top-tree-job.d.ts +82 -0
  24. package/dest/job/top-tree-job.d.ts.map +1 -0
  25. package/dest/job/top-tree-job.js +152 -0
  26. package/dest/metrics.d.ts +25 -8
  27. package/dest/metrics.d.ts.map +1 -1
  28. package/dest/metrics.js +64 -14
  29. package/dest/proof-publishing-service.d.ts +161 -0
  30. package/dest/proof-publishing-service.d.ts.map +1 -0
  31. package/dest/proof-publishing-service.js +335 -0
  32. package/dest/prover-node-publisher.d.ts +7 -22
  33. package/dest/prover-node-publisher.d.ts.map +1 -1
  34. package/dest/prover-node-publisher.js +41 -101
  35. package/dest/prover-node.d.ts +105 -67
  36. package/dest/prover-node.d.ts.map +1 -1
  37. package/dest/prover-node.js +472 -261
  38. package/dest/prover-publisher-factory.d.ts +1 -3
  39. package/dest/prover-publisher-factory.d.ts.map +1 -1
  40. package/dest/prover-publisher-factory.js +0 -1
  41. package/dest/session-manager.d.ts +158 -0
  42. package/dest/session-manager.d.ts.map +1 -0
  43. package/dest/session-manager.js +482 -0
  44. package/dest/test/index.d.ts +7 -6
  45. package/dest/test/index.d.ts.map +1 -1
  46. package/package.json +23 -23
  47. package/src/actions/rerun-epoch-proving-job.ts +102 -27
  48. package/src/checkpoint-store.ts +194 -0
  49. package/src/config.ts +2 -11
  50. package/src/factory.ts +0 -9
  51. package/src/index.ts +1 -0
  52. package/src/job/checkpoint-prover.ts +442 -0
  53. package/src/job/epoch-session.ts +436 -0
  54. package/src/job/top-tree-job.ts +227 -0
  55. package/src/metrics.ts +65 -23
  56. package/src/proof-publishing-service.ts +427 -0
  57. package/src/prover-node-publisher.ts +54 -127
  58. package/src/prover-node.ts +545 -282
  59. package/src/prover-publisher-factory.ts +0 -3
  60. package/src/session-manager.ts +583 -0
  61. package/src/test/index.ts +6 -6
  62. package/dest/job/epoch-proving-job.d.ts +0 -67
  63. package/dest/job/epoch-proving-job.d.ts.map +0 -1
  64. package/dest/job/epoch-proving-job.js +0 -912
  65. package/src/job/epoch-proving-job.ts +0 -531
@@ -1,23 +1,33 @@
1
1
  import { createArchiverStore, createContractDataSource } from '@aztec/archiver';
2
2
  import type { L1ContractsConfig } from '@aztec/ethereum/config';
3
+ import { BlockNumber } from '@aztec/foundation/branded-types';
3
4
  import type { Logger } from '@aztec/foundation/log';
5
+ import { DateProvider } from '@aztec/foundation/timer';
4
6
  import { type ProverClientConfig, createProverClient } from '@aztec/prover-client';
5
7
  import { ProverBrokerConfig, createAndStartProvingBroker } from '@aztec/prover-client/broker';
8
+ import { getLastSiblingPath } from '@aztec/prover-client/helpers';
9
+ import { ChonkCache } from '@aztec/prover-client/orchestrator';
6
10
  import { PublicProcessorFactory } from '@aztec/simulator/server';
11
+ import type { L2Block } from '@aztec/stdlib/block';
12
+ import { getEpochAtSlot, getSlotRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
13
+ import type { ITxProvider } from '@aztec/stdlib/interfaces/server';
7
14
  import type { DataStoreConfig } from '@aztec/stdlib/kv-store';
15
+ import { MerkleTreeId } from '@aztec/stdlib/trees';
16
+ import type { Tx, TxHash } from '@aztec/stdlib/tx';
8
17
  import type { GenesisData } from '@aztec/stdlib/world-state';
9
18
  import { getTelemetryClient } from '@aztec/telemetry-client';
10
19
  import { createWorldState } from '@aztec/world-state';
11
20
 
12
21
  import { readFileSync } from 'fs';
13
22
 
23
+ import { CheckpointProver } from '../job/checkpoint-prover.js';
14
24
  import { deserializeEpochProvingJobData } from '../job/epoch-proving-job-data.js';
15
- import { EpochProvingJob } from '../job/epoch-proving-job.js';
25
+ import { EpochSession, type SessionSpec } from '../job/epoch-session.js';
16
26
  import { ProverNodeJobMetrics } from '../metrics.js';
17
27
 
18
28
  /**
19
29
  * Given a local folder where `downloadEpochProvingJob` was called, creates a new archiver and world state
20
- * using the state snapshots, and creates a new epoch proving job to prove the downloaded proving job.
30
+ * using the state snapshots, and creates a new epoch proving session to prove the downloaded proving job.
21
31
  * Proving is done with a local proving broker and agents as specified by the config.
22
32
  */
23
33
  export async function rerunEpochProvingJob(
@@ -31,7 +41,7 @@ export async function rerunEpochProvingJob(
31
41
 
32
42
  const telemetry = getTelemetryClient();
33
43
  const metrics = new ProverNodeJobMetrics(telemetry.getMeter('prover-job'), telemetry.getTracer('prover-job'));
34
- await using worldState = await createWorldState(config, genesis);
44
+ const worldState = await createWorldState(config, genesis);
35
45
  const initialBlockHash = await worldState.getInitialHeader().hash();
36
46
  const archiver = await createArchiverStore(config, initialBlockHash);
37
47
  const publicProcessorFactory = new PublicProcessorFactory(
@@ -41,34 +51,99 @@ export async function rerunEpochProvingJob(
41
51
  log.getBindings(),
42
52
  );
43
53
 
44
- const publisher = {
45
- submitEpochProof: () => Promise.resolve(true),
46
- analyzeEpochProofSubmission: () => Promise.resolve(),
54
+ // Local rerun never publishes — stub the service so submit() always resolves 'published'
55
+ // and withdraw is a no-op.
56
+ const publishingService = {
57
+ submit: () => Promise.resolve('published' as const),
58
+ withdraw: () => {},
47
59
  };
48
- const l2BlockSourceForReorgDetection = undefined;
49
- const deadline = undefined;
50
-
51
- // This starts a local proving broker that does not get exposed as a service. This should be good enough for
52
- // smallish epochs to be proven if we run on a large machine, but as epochs grow larger, we may want to switch
53
- // this out for a live proving broker with multiple agents that we can connect to.
54
60
  const broker = await createAndStartProvingBroker(config, telemetry);
55
61
  const prover = await createProverClient(config, worldState, broker, telemetry);
62
+ const chonkCache = new ChonkCache(log.getBindings());
63
+
64
+ const txProvider = makeReplayingTxProvider(jobData.txs);
65
+
66
+ log.info(`Rerunning epoch proving for epoch ${jobData.epochNumber}`);
56
67
 
57
- const provingJob = new EpochProvingJob(
58
- jobData,
59
- worldState,
60
- prover.createEpochProver(),
61
- publicProcessorFactory,
62
- publisher,
63
- l2BlockSourceForReorgDetection,
68
+ const provers: CheckpointProver[] = [];
69
+ for (let i = 0; i < jobData.checkpoints.length; i++) {
70
+ const checkpoint = jobData.checkpoints[i];
71
+ const previousBlockHeader =
72
+ i === 0 ? jobData.previousBlockHeader : jobData.checkpoints[i - 1].blocks.at(-1)!.header;
73
+ const l1ToL2Messages = jobData.l1ToL2Messages[checkpoint.number] ?? [];
74
+ const previousArchiveSiblingPath = await getLastSiblingPath(
75
+ MerkleTreeId.ARCHIVE,
76
+ worldState.getSnapshot(BlockNumber(checkpoint.blocks[0].number - 1)),
77
+ );
78
+ const attestations = checkpoint.number === jobData.checkpoints.at(-1)!.number ? jobData.attestations : [];
79
+ provers.push(
80
+ new CheckpointProver(
81
+ {
82
+ checkpoint,
83
+ epochNumber: jobData.epochNumber,
84
+ attestations,
85
+ previousBlockHeader,
86
+ l1ToL2Messages,
87
+ previousArchiveSiblingPath,
88
+ },
89
+ {
90
+ proverFactory: prover,
91
+ chonkCache,
92
+ publicProcessorFactory,
93
+ dbProvider: worldState,
94
+ txProvider,
95
+ dateProvider: new DateProvider(),
96
+ proverId: prover.getProverId(),
97
+ metrics,
98
+ txGatheringTimeoutMs: 120_000,
99
+ deadline: undefined,
100
+ log,
101
+ },
102
+ ),
103
+ );
104
+ }
105
+
106
+ const l1Constants = { epochDuration: config.aztecEpochDuration };
107
+ const [fromSlot, toSlot] = getSlotRangeForEpoch(jobData.epochNumber, l1Constants);
108
+ const spec: SessionSpec = { kind: 'full', epochNumber: jobData.epochNumber, fromSlot, toSlot };
109
+
110
+ const session = new EpochSession(spec, provers, {
111
+ proverFactory: prover,
112
+ proverId: prover.getProverId(),
113
+ publishingService,
64
114
  metrics,
65
- deadline,
66
- { skipEpochCheck: true },
67
- log.getBindings(),
68
- );
115
+ dateProvider: new DateProvider(),
116
+ deadline: undefined,
117
+ config: {},
118
+ bindings: log.getBindings(),
119
+ });
120
+
121
+ const finalState = await session.start();
122
+ log.info(`Completed proving for epoch ${jobData.epochNumber} with status ${finalState}`, {
123
+ derivedEpoch: getEpochAtSlot(provers[0].slotNumber, l1Constants),
124
+ });
125
+ return finalState;
126
+ }
69
127
 
70
- log.info(`Rerunning epoch proving job for epoch ${jobData.epochNumber}`);
71
- await provingJob.run();
72
- log.info(`Completed job for epoch ${jobData.epochNumber} with status ${provingJob.getState()}`);
73
- return provingJob.getState();
128
+ /** Build a synthetic ITxProvider that returns the supplied txs map by lookup. */
129
+ function makeReplayingTxProvider(txs: Map<string, Tx>): ITxProvider {
130
+ const lookup = (hashes: TxHash[]) => {
131
+ const found: Tx[] = [];
132
+ const missing: TxHash[] = [];
133
+ for (const hash of hashes) {
134
+ const tx = txs.get(hash.toString());
135
+ if (tx) {
136
+ found.push(tx);
137
+ } else {
138
+ missing.push(hash);
139
+ }
140
+ }
141
+ return { txs: found, missingTxs: missing };
142
+ };
143
+ return {
144
+ getAvailableTxs: hashes => Promise.resolve(lookup(hashes)),
145
+ hasTxs: hashes => Promise.resolve(hashes.map(h => txs.has(h.toString()))),
146
+ getTxsForBlockProposal: () => Promise.resolve({ txs: [], missingTxs: [] }),
147
+ getTxsForBlock: (block: L2Block) => Promise.resolve(lookup(block.body.txEffects.map(e => e.txHash))),
148
+ };
74
149
  }
@@ -0,0 +1,194 @@
1
+ import type { BlockNumber, CheckpointNumber, EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
2
+ import { type Logger, type LoggerBindings, createLogger } from '@aztec/foundation/log';
3
+ import type { L2BlockSource } from '@aztec/stdlib/block';
4
+ import type { Checkpoint } from '@aztec/stdlib/checkpoint';
5
+ import { type L1RollupConstants, getEpochAtSlot, getSlotRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
6
+
7
+ import { CheckpointProver, type CheckpointProverArgs, type CheckpointProverDeps } from './job/checkpoint-prover.js';
8
+
9
+ /** Register-time data needed to construct a `CheckpointProver` (everything except the checkpoint + epoch). */
10
+ export type RegisterCheckpointData = Omit<CheckpointProverArgs, 'checkpoint' | 'epochNumber'>;
11
+
12
+ /** Factory used by the store to construct new provers. Tests can inject a stub. */
13
+ export type CheckpointProverFactory = (args: CheckpointProverArgs, deps: CheckpointProverDeps) => CheckpointProver;
14
+
15
+ /**
16
+ * Prover-node-wide registry of `CheckpointProver` instances, content-addressed by
17
+ * `(checkpoint number, slot, checkpoint archive root)`.
18
+ *
19
+ * The store survives every epoch / session boundary. A prover lives from its first
20
+ * `addOrUpdate` call until either:
21
+ * - its checkpoint is pruned by an L1 reorg (`cancelAndRemoveAboveBlock`), or
22
+ * - its epoch's proof-submission window has closed (`reapExpired`), so the proof could no
23
+ * longer be accepted on L1 even if produced.
24
+ *
25
+ * A prover's sub-tree work forks world-state per block and does not survive a prune of a base
26
+ * block, so there is nothing to preserve across a reorg: a pruned prover is cancelled and
27
+ * dropped, and a re-add (even of identical content) constructs a fresh prover.
28
+ */
29
+ export class CheckpointStore {
30
+ private readonly provers = new Map<string, CheckpointProver>();
31
+ /**
32
+ * Teardowns of provers already removed from `provers` (by prune or reap), awaited on `stop()`.
33
+ * Keyed by a monotonic id rather than the prover's content id: a prune-then-re-add can leave two
34
+ * teardowns for the same content id in flight at once, which a content-id key would clobber.
35
+ */
36
+ private readonly pendingTeardowns = new Map<number, Promise<void>>();
37
+ private nextTeardownId = 0;
38
+ private readonly log: Logger;
39
+
40
+ constructor(
41
+ private readonly l2BlockSource: Pick<L2BlockSource, 'getL1Constants'>,
42
+ private readonly proverDeps: Omit<CheckpointProverDeps, 'log'>,
43
+ bindings?: LoggerBindings,
44
+ private readonly proverFactoryFn: CheckpointProverFactory = (args, deps) => new CheckpointProver(args, deps),
45
+ ) {
46
+ this.log = createLogger('prover-node:checkpoint-store', bindings);
47
+ }
48
+
49
+ public start(): Promise<void> {
50
+ return Promise.resolve();
51
+ }
52
+
53
+ public async stop(): Promise<void> {
54
+ // Cancel every live prover, then await both their teardown and any still in flight for provers
55
+ // already removed by a prune or reap.
56
+ const provers = Array.from(this.provers.values());
57
+ this.provers.clear();
58
+ for (const prover of provers) {
59
+ prover.cancel();
60
+ }
61
+ await Promise.allSettled([...provers.map(p => p.whenDone()), ...this.pendingTeardowns.values()]);
62
+ }
63
+
64
+ /**
65
+ * Tracks the teardown of a prover just removed from the store so `stop()` can await it. The entry
66
+ * removes itself once teardown settles, so the map stays bounded by the number in flight.
67
+ */
68
+ private trackTeardown(prover: CheckpointProver): void {
69
+ const id = this.nextTeardownId++;
70
+ const done = prover.whenDone();
71
+ this.pendingTeardowns.set(id, done);
72
+ void done.finally(() => this.pendingTeardowns.delete(id));
73
+ }
74
+
75
+ /**
76
+ * Registers a checkpoint with the store. If a prover already exists for the
77
+ * `(number, slot, archive root)` content key it is reused (an at-least-once re-registration of
78
+ * still-canonical content); otherwise a new prover is constructed.
79
+ */
80
+ public async addOrUpdate(checkpoint: Checkpoint, data: RegisterCheckpointData): Promise<CheckpointProver> {
81
+ const l1Constants = await this.l2BlockSource.getL1Constants();
82
+ const epochNumber = getEpochAtSlot(checkpoint.header.slotNumber, l1Constants);
83
+ const id = CheckpointProver.idFor(checkpoint);
84
+
85
+ const existing = this.provers.get(id);
86
+ if (existing) {
87
+ return existing;
88
+ }
89
+
90
+ // At most one canonical checkpoint per slot. A different checkpoint at the same slot means the
91
+ // caller forgot to prune the old chain before adding the replacement — surface it rather than
92
+ // silently creating a parallel canonical chain. A pruned checkpoint has already been removed,
93
+ // so every prover still in the store is canonical.
94
+ for (const prover of this.provers.values()) {
95
+ if (prover.slotNumber === checkpoint.header.slotNumber) {
96
+ throw new Error(
97
+ `Cannot add checkpoint ${checkpoint.number} (archive ${checkpoint.archive.root}) at slot ${checkpoint.header.slotNumber}: ` +
98
+ `a different checkpoint already occupies this slot. Prune it first.`,
99
+ );
100
+ }
101
+ }
102
+
103
+ const prover = this.proverFactoryFn({ ...data, checkpoint, epochNumber }, { ...this.proverDeps, log: this.log });
104
+ this.provers.set(id, prover);
105
+ return prover;
106
+ }
107
+
108
+ /**
109
+ * Cancels and removes every prover that holds a block above the prune target. A checkpoint is orphaned by a prune to
110
+ * block `targetBlockNumber` iff its last block sits above the target — including a checkpoint whose range straddles
111
+ * the target (partially orphaned), which block-range marking catches without boundary ambiguity. Keying off the
112
+ * surviving block number (rather than a checkpoint number) is correct even when the source has already
113
+ * re-checkpointed past the divergence: the prune event reports the highest surviving block, which by construction
114
+ * survives on the source, whereas the source's current checkpointed tip can sit above the prune target.
115
+ *
116
+ * The prover's in-flight sub-tree work forks world-state per block and faults once its base block is pruned, so it
117
+ * cannot be reused; it is cancelled (aborting the fork reads) and dropped. A subsequent re-add constructs a fresh
118
+ * prover. Returns the removed provers.
119
+ */
120
+ public cancelAndRemoveAboveBlock(targetBlockNumber: BlockNumber): CheckpointProver[] {
121
+ const affected: CheckpointProver[] = [];
122
+ for (const [id, prover] of Array.from(this.provers.entries())) {
123
+ const lastBlockNumber = prover.checkpoint.blocks.at(-1)!.number;
124
+ if (lastBlockNumber > targetBlockNumber) {
125
+ prover.cancel();
126
+ this.trackTeardown(prover);
127
+ this.provers.delete(id);
128
+ affected.push(prover);
129
+ }
130
+ }
131
+ return affected;
132
+ }
133
+
134
+ /**
135
+ * Drops provers whose epoch is at or below the supplied expired epoch. Once an epoch's
136
+ * proof-submission window has closed, its proof can no longer be accepted on L1, so the
137
+ * prover is no longer needed.
138
+ */
139
+ public reapExpired(expiredEpoch: EpochNumber): void {
140
+ const reaped: { id: string; checkpointNumber: CheckpointNumber; epochNumber: EpochNumber }[] = [];
141
+ for (const [id, prover] of Array.from(this.provers.entries())) {
142
+ if (prover.epochNumber <= expiredEpoch) {
143
+ reaped.push({ id, checkpointNumber: prover.checkpoint.number, epochNumber: prover.epochNumber });
144
+ prover.cancel({ routine: true });
145
+ this.trackTeardown(prover);
146
+ this.provers.delete(id);
147
+ }
148
+ }
149
+ if (reaped.length > 0) {
150
+ this.log.info(`Reaped ${reaped.length} expired CheckpointProver(s) for expiredEpoch ${expiredEpoch}`, {
151
+ expiredEpoch,
152
+ reapedCount: reaped.length,
153
+ reaped,
154
+ });
155
+ }
156
+ }
157
+
158
+ /** Returns the prover with the supplied id, or undefined. */
159
+ public get(id: string): CheckpointProver | undefined {
160
+ return this.provers.get(id);
161
+ }
162
+
163
+ /** Returns the prover for the supplied checkpoint (by its content-addressed id), or undefined. */
164
+ public getByCheckpoint(checkpoint: Checkpoint): CheckpointProver | undefined {
165
+ return this.provers.get(CheckpointProver.idFor(checkpoint));
166
+ }
167
+
168
+ /** Every prover currently in the store, in insertion order. */
169
+ public listAll(): CheckpointProver[] {
170
+ return Array.from(this.provers.values());
171
+ }
172
+
173
+ /** Provers in the store, sorted by checkpoint number. */
174
+ public list(): CheckpointProver[] {
175
+ return Array.from(this.provers.values()).sort((a, b) => a.checkpoint.number - b.checkpoint.number);
176
+ }
177
+
178
+ /**
179
+ * Provers whose slot is in the supplied epoch's slot range, sorted by checkpoint number.
180
+ */
181
+ public async listForEpoch(epoch: EpochNumber): Promise<CheckpointProver[]> {
182
+ const l1Constants = await this.l2BlockSource.getL1Constants();
183
+ const [fromSlot, toSlot] = getSlotRangeForEpoch(epoch, l1Constants);
184
+ return this.listInSlotRange(fromSlot, toSlot);
185
+ }
186
+
187
+ /** Provers whose slot falls within `[fromSlot, toSlot]`, sorted by checkpoint number. */
188
+ public listInSlotRange(fromSlot: SlotNumber, toSlot: SlotNumber): CheckpointProver[] {
189
+ return this.list().filter(p => p.slotNumber >= fromSlot && p.slotNumber <= toSlot);
190
+ }
191
+ }
192
+
193
+ /** Sub-set of `L1RollupConstants` actually consumed by the store's slot helpers. */
194
+ export type CheckpointStoreL1Constants = Pick<L1RollupConstants, 'epochDuration'>;
package/src/config.ts CHANGED
@@ -6,7 +6,6 @@ import {
6
6
  numberConfigHelper,
7
7
  pickConfigMappings,
8
8
  } from '@aztec/foundation/config';
9
- import { EthAddress } from '@aztec/foundation/eth-address';
10
9
  import { type KeyStoreConfig, keyStoreConfigMappings } from '@aztec/node-keystore/config';
11
10
  import { ethPrivateKeySchema } from '@aztec/node-keystore/schemas';
12
11
  import type { KeyStore } from '@aztec/node-keystore/types';
@@ -45,7 +44,6 @@ export type SpecificProverNodeConfig = {
45
44
  txGatheringIntervalMs: number;
46
45
  txGatheringBatchSize: number;
47
46
  txGatheringMaxParallelRequestsPerNode: number;
48
- proofSubmissionTargetAddress?: EthAddress;
49
47
  };
50
48
 
51
49
  export const specificProverNodeConfigMappings: ConfigMappingsType<SpecificProverNodeConfig> = {
@@ -70,7 +68,8 @@ export const specificProverNodeConfigMappings: ConfigMappingsType<SpecificProver
70
68
  defaultValue: undefined,
71
69
  },
72
70
  proverNodeEpochProvingDelayMs: {
73
- description: 'Optional delay in milliseconds to wait before proving a new epoch',
71
+ description:
72
+ 'Optional delay in milliseconds to wait for late-arriving events (e.g. reorgs) to settle before starting top-tree proving for an epoch',
74
73
  defaultValue: undefined,
75
74
  },
76
75
  txGatheringIntervalMs: {
@@ -98,14 +97,6 @@ export const specificProverNodeConfigMappings: ConfigMappingsType<SpecificProver
98
97
  description: 'Whether the prover node skips publishing proofs to L1',
99
98
  ...booleanConfigHelper(false),
100
99
  },
101
- proofSubmissionTargetAddress: {
102
- env: 'PROVER_NODE_PROOF_SUBMISSION_TARGET_ADDRESS',
103
- description:
104
- 'Optional L1 address the submitEpochRootProof tx is sent to. Must expose the identical submitEpochRootProof ABI ' +
105
- 'and forward to the rollup. Defaults to the rollup address.',
106
- parseEnv: (val: string) => EthAddress.fromString(val),
107
- defaultValue: undefined,
108
- },
109
100
  };
110
101
 
111
102
  export const proverNodeConfigMappings: ConfigMappingsType<ProverNodeConfig> = {
package/src/factory.ts CHANGED
@@ -31,7 +31,6 @@ import { L1Metrics, type TelemetryClient, getTelemetryClient } from '@aztec/tele
31
31
  import { createPublicClient } from 'viem';
32
32
 
33
33
  import type { SpecificProverNodeConfig } from './config.js';
34
- import { EpochMonitor } from './monitors/epoch-monitor.js';
35
34
  import { ProverNode } from './prover-node.js';
36
35
  import { ProverPublisherFactory } from './prover-publisher-factory.js';
37
36
 
@@ -136,7 +135,6 @@ export async function createProverNode(
136
135
  deps.publisherFactory ??
137
136
  new ProverPublisherFactory(config, {
138
137
  rollupContract,
139
- proofSubmissionTarget: config.proofSubmissionTargetAddress,
140
138
  publisherManager: new PublisherManager(l1TxUtils, getPublisherConfigFromProverConfig(config), {
141
139
  bindings: log.getBindings(),
142
140
  funder: funderL1TxUtils,
@@ -162,12 +160,6 @@ export async function createProverNode(
162
160
  ),
163
161
  };
164
162
 
165
- const epochMonitor = await EpochMonitor.create(
166
- archiver,
167
- { pollingIntervalMs: config.proverNodePollingIntervalMs, provingDelayMs: config.proverNodeEpochProvingDelayMs },
168
- telemetry,
169
- );
170
-
171
163
  const l1Metrics = new L1Metrics(
172
164
  telemetry.getMeter('ProverNodeL1Metrics'),
173
165
  publicClient,
@@ -185,7 +177,6 @@ export async function createProverNode(
185
177
  archiver,
186
178
  worldStateSynchronizer,
187
179
  p2pClient,
188
- epochMonitor,
189
180
  rollupContract,
190
181
  l1Metrics,
191
182
  proverNodeConfig,
package/src/index.ts CHANGED
@@ -2,5 +2,6 @@ export * from './actions/index.js';
2
2
  export * from './config.js';
3
3
  export * from './factory.js';
4
4
  export * from './monitors/index.js';
5
+ export * from './proof-publishing-service.js';
5
6
  export * from './prover-node-publisher.js';
6
7
  export * from './prover-node.js';