@aztec/prover-node 3.0.0-nightly.20251002 → 3.0.0-nightly.20251004
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.
|
@@ -20,8 +20,6 @@ export type L1SubmitEpochProofArgs = {
|
|
|
20
20
|
proof: Proof;
|
|
21
21
|
};
|
|
22
22
|
export declare class ProverNodePublisher {
|
|
23
|
-
private interruptibleSleep;
|
|
24
|
-
private sleepTimeMs;
|
|
25
23
|
private interrupted;
|
|
26
24
|
private metrics;
|
|
27
25
|
protected log: import("@aztec/foundation/log").Logger;
|
|
@@ -56,6 +54,5 @@ export declare class ProverNodePublisher {
|
|
|
56
54
|
private sendSubmitEpochProofTx;
|
|
57
55
|
private getEpochProofPublicInputsArgs;
|
|
58
56
|
private getSubmitEpochProofArgs;
|
|
59
|
-
protected sleepOrInterrupted(): Promise<void>;
|
|
60
57
|
}
|
|
61
58
|
//# sourceMappingURL=prover-node-publisher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prover-node-publisher.d.ts","sourceRoot":"","sources":["../src/prover-node-publisher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"prover-node-publisher.d.ts","sourceRoot":"","sources":["../src/prover-node-publisher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAwB,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAG3F,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAGzD,OAAO,KAAK,EAAE,eAAe,EA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,YAAY,EAAE,wBAAwB,EAAE,CAAC;KAC1C,GAAG,OAAO,CAAC,OAAO,CAAC;YAkDN,4BAA4B;YA0D5B,sBAAsB;IAyCpC,OAAO,CAAC,6BAA6B;IAyBrC,OAAO,CAAC,uBAAuB;CAuBhC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FinalBlobAccumulator } from '@aztec/blob-lib';
|
|
2
2
|
import { AZTEC_MAX_EPOCH_DURATION } from '@aztec/constants';
|
|
3
3
|
import { makeTuple } from '@aztec/foundation/array';
|
|
4
4
|
import { areArraysEqual } from '@aztec/foundation/collection';
|
|
5
5
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
6
6
|
import { Fr } from '@aztec/foundation/fields';
|
|
7
7
|
import { createLogger } from '@aztec/foundation/log';
|
|
8
|
-
import { InterruptibleSleep } from '@aztec/foundation/sleep';
|
|
9
8
|
import { Timer } from '@aztec/foundation/timer';
|
|
10
9
|
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
11
10
|
import { CommitteeAttestation, CommitteeAttestationsAndSigners } from '@aztec/stdlib/block';
|
|
@@ -14,15 +13,12 @@ import { inspect } from 'util';
|
|
|
14
13
|
import { encodeFunctionData } from 'viem';
|
|
15
14
|
import { ProverNodePublisherMetrics } from './metrics.js';
|
|
16
15
|
export class ProverNodePublisher {
|
|
17
|
-
interruptibleSleep = new InterruptibleSleep();
|
|
18
|
-
sleepTimeMs;
|
|
19
16
|
interrupted = false;
|
|
20
17
|
metrics;
|
|
21
18
|
log = createLogger('prover-node:l1-tx-publisher');
|
|
22
19
|
rollupContract;
|
|
23
20
|
l1TxUtils;
|
|
24
21
|
constructor(config, deps){
|
|
25
|
-
this.sleepTimeMs = config?.l1PublishRetryIntervalMS ?? 60_000;
|
|
26
22
|
const telemetry = deps.telemetry ?? getTelemetryClient();
|
|
27
23
|
this.metrics = new ProverNodePublisherMetrics(telemetry, 'ProverNode');
|
|
28
24
|
this.rollupContract = deps.rollupContract;
|
|
@@ -38,11 +34,11 @@ export class ProverNodePublisher {
|
|
|
38
34
|
* A call to `restart` is required before you can continue publishing.
|
|
39
35
|
*/ interrupt() {
|
|
40
36
|
this.interrupted = true;
|
|
41
|
-
this.interruptibleSleep.interrupt();
|
|
42
37
|
this.l1TxUtils.interrupt();
|
|
43
38
|
}
|
|
44
39
|
/** Restarts the publisher after calling `interrupt`. */ restart() {
|
|
45
40
|
this.interrupted = false;
|
|
41
|
+
this.l1TxUtils.restart();
|
|
46
42
|
}
|
|
47
43
|
getSenderAddress() {
|
|
48
44
|
return this.l1TxUtils.getSenderAddress();
|
|
@@ -90,7 +86,6 @@ export class ProverNodePublisher {
|
|
|
90
86
|
}
|
|
91
87
|
this.metrics.recordFailedTx();
|
|
92
88
|
this.log.error(`Rollup.submitEpochProof tx status failed ${txReceipt.transactionHash}`, undefined, ctx);
|
|
93
|
-
await this.sleepOrInterrupted();
|
|
94
89
|
}
|
|
95
90
|
this.log.verbose('L2 block data syncing interrupted', ctx);
|
|
96
91
|
return false;
|
|
@@ -118,8 +113,8 @@ export class ProverNodePublisher {
|
|
|
118
113
|
throw new Error(`End archive root mismatch: ${publicInputs.endArchiveRoot.toString()} !== ${endBlockLog.archive}`);
|
|
119
114
|
}
|
|
120
115
|
// Check the batched blob inputs from the root rollup against the batched blob computed in ts
|
|
121
|
-
if (!publicInputs.blobPublicInputs.equals(
|
|
122
|
-
throw new Error(`Batched blob mismatch: ${inspect(publicInputs.blobPublicInputs)} !== ${inspect(
|
|
116
|
+
if (!publicInputs.blobPublicInputs.equals(FinalBlobAccumulator.fromBatchedBlob(batchedBlobInputs))) {
|
|
117
|
+
throw new Error(`Batched blob mismatch: ${inspect(publicInputs.blobPublicInputs)} !== ${inspect(FinalBlobAccumulator.fromBatchedBlob(batchedBlobInputs))}`);
|
|
123
118
|
}
|
|
124
119
|
// Compare the public inputs computed by the contract with the ones injected
|
|
125
120
|
const rollupPublicInputs = await this.rollupContract.getEpochProofPublicInputs(this.getEpochProofPublicInputsArgs(args));
|
|
@@ -193,7 +188,4 @@ export class ProverNodePublisher {
|
|
|
193
188
|
proof: proofHex
|
|
194
189
|
};
|
|
195
190
|
}
|
|
196
|
-
async sleepOrInterrupted() {
|
|
197
|
-
await this.interruptibleSleep.sleep(this.sleepTimeMs);
|
|
198
|
-
}
|
|
199
191
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/prover-node",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251004",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -56,27 +56,27 @@
|
|
|
56
56
|
]
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@aztec/archiver": "3.0.0-nightly.
|
|
60
|
-
"@aztec/bb-prover": "3.0.0-nightly.
|
|
61
|
-
"@aztec/blob-lib": "3.0.0-nightly.
|
|
62
|
-
"@aztec/blob-sink": "3.0.0-nightly.
|
|
63
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
64
|
-
"@aztec/epoch-cache": "3.0.0-nightly.
|
|
65
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
66
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
67
|
-
"@aztec/kv-store": "3.0.0-nightly.
|
|
68
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
69
|
-
"@aztec/node-keystore": "3.0.0-nightly.
|
|
70
|
-
"@aztec/node-lib": "3.0.0-nightly.
|
|
71
|
-
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.
|
|
72
|
-
"@aztec/p2p": "3.0.0-nightly.
|
|
73
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
74
|
-
"@aztec/prover-client": "3.0.0-nightly.
|
|
75
|
-
"@aztec/sequencer-client": "3.0.0-nightly.
|
|
76
|
-
"@aztec/simulator": "3.0.0-nightly.
|
|
77
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
78
|
-
"@aztec/telemetry-client": "3.0.0-nightly.
|
|
79
|
-
"@aztec/world-state": "3.0.0-nightly.
|
|
59
|
+
"@aztec/archiver": "3.0.0-nightly.20251004",
|
|
60
|
+
"@aztec/bb-prover": "3.0.0-nightly.20251004",
|
|
61
|
+
"@aztec/blob-lib": "3.0.0-nightly.20251004",
|
|
62
|
+
"@aztec/blob-sink": "3.0.0-nightly.20251004",
|
|
63
|
+
"@aztec/constants": "3.0.0-nightly.20251004",
|
|
64
|
+
"@aztec/epoch-cache": "3.0.0-nightly.20251004",
|
|
65
|
+
"@aztec/ethereum": "3.0.0-nightly.20251004",
|
|
66
|
+
"@aztec/foundation": "3.0.0-nightly.20251004",
|
|
67
|
+
"@aztec/kv-store": "3.0.0-nightly.20251004",
|
|
68
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251004",
|
|
69
|
+
"@aztec/node-keystore": "3.0.0-nightly.20251004",
|
|
70
|
+
"@aztec/node-lib": "3.0.0-nightly.20251004",
|
|
71
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251004",
|
|
72
|
+
"@aztec/p2p": "3.0.0-nightly.20251004",
|
|
73
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251004",
|
|
74
|
+
"@aztec/prover-client": "3.0.0-nightly.20251004",
|
|
75
|
+
"@aztec/sequencer-client": "3.0.0-nightly.20251004",
|
|
76
|
+
"@aztec/simulator": "3.0.0-nightly.20251004",
|
|
77
|
+
"@aztec/stdlib": "3.0.0-nightly.20251004",
|
|
78
|
+
"@aztec/telemetry-client": "3.0.0-nightly.20251004",
|
|
79
|
+
"@aztec/world-state": "3.0.0-nightly.20251004",
|
|
80
80
|
"source-map-support": "^0.5.21",
|
|
81
81
|
"tslib": "^2.4.0",
|
|
82
82
|
"viem": "2.23.7"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BatchedBlob,
|
|
1
|
+
import { type BatchedBlob, FinalBlobAccumulator } from '@aztec/blob-lib';
|
|
2
2
|
import { AZTEC_MAX_EPOCH_DURATION } from '@aztec/constants';
|
|
3
3
|
import type { L1TxUtils, RollupContract, ViemCommitteeAttestation } from '@aztec/ethereum';
|
|
4
4
|
import { makeTuple } from '@aztec/foundation/array';
|
|
@@ -7,7 +7,6 @@ import { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
7
7
|
import { Fr } from '@aztec/foundation/fields';
|
|
8
8
|
import { createLogger } from '@aztec/foundation/log';
|
|
9
9
|
import type { Tuple } from '@aztec/foundation/serialize';
|
|
10
|
-
import { InterruptibleSleep } from '@aztec/foundation/sleep';
|
|
11
10
|
import { Timer } from '@aztec/foundation/timer';
|
|
12
11
|
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
13
12
|
import type { PublisherConfig, TxSenderConfig } from '@aztec/sequencer-client';
|
|
@@ -35,8 +34,6 @@ export type L1SubmitEpochProofArgs = {
|
|
|
35
34
|
};
|
|
36
35
|
|
|
37
36
|
export class ProverNodePublisher {
|
|
38
|
-
private interruptibleSleep = new InterruptibleSleep();
|
|
39
|
-
private sleepTimeMs: number;
|
|
40
37
|
private interrupted = false;
|
|
41
38
|
private metrics: ProverNodePublisherMetrics;
|
|
42
39
|
|
|
@@ -54,8 +51,6 @@ export class ProverNodePublisher {
|
|
|
54
51
|
telemetry?: TelemetryClient;
|
|
55
52
|
},
|
|
56
53
|
) {
|
|
57
|
-
this.sleepTimeMs = config?.l1PublishRetryIntervalMS ?? 60_000;
|
|
58
|
-
|
|
59
54
|
const telemetry = deps.telemetry ?? getTelemetryClient();
|
|
60
55
|
|
|
61
56
|
this.metrics = new ProverNodePublisherMetrics(telemetry, 'ProverNode');
|
|
@@ -76,13 +71,13 @@ export class ProverNodePublisher {
|
|
|
76
71
|
*/
|
|
77
72
|
public interrupt() {
|
|
78
73
|
this.interrupted = true;
|
|
79
|
-
this.interruptibleSleep.interrupt();
|
|
80
74
|
this.l1TxUtils.interrupt();
|
|
81
75
|
}
|
|
82
76
|
|
|
83
77
|
/** Restarts the publisher after calling `interrupt`. */
|
|
84
78
|
public restart() {
|
|
85
79
|
this.interrupted = false;
|
|
80
|
+
this.l1TxUtils.restart();
|
|
86
81
|
}
|
|
87
82
|
|
|
88
83
|
public getSenderAddress() {
|
|
@@ -141,7 +136,6 @@ export class ProverNodePublisher {
|
|
|
141
136
|
|
|
142
137
|
this.metrics.recordFailedTx();
|
|
143
138
|
this.log.error(`Rollup.submitEpochProof tx status failed ${txReceipt.transactionHash}`, undefined, ctx);
|
|
144
|
-
await this.sleepOrInterrupted();
|
|
145
139
|
}
|
|
146
140
|
|
|
147
141
|
this.log.verbose('L2 block data syncing interrupted', ctx);
|
|
@@ -186,9 +180,9 @@ export class ProverNodePublisher {
|
|
|
186
180
|
}
|
|
187
181
|
|
|
188
182
|
// Check the batched blob inputs from the root rollup against the batched blob computed in ts
|
|
189
|
-
if (!publicInputs.blobPublicInputs.equals(
|
|
183
|
+
if (!publicInputs.blobPublicInputs.equals(FinalBlobAccumulator.fromBatchedBlob(batchedBlobInputs))) {
|
|
190
184
|
throw new Error(
|
|
191
|
-
`Batched blob mismatch: ${inspect(publicInputs.blobPublicInputs)} !== ${inspect(
|
|
185
|
+
`Batched blob mismatch: ${inspect(publicInputs.blobPublicInputs)} !== ${inspect(FinalBlobAccumulator.fromBatchedBlob(batchedBlobInputs))}`,
|
|
192
186
|
);
|
|
193
187
|
}
|
|
194
188
|
|
|
@@ -295,8 +289,4 @@ export class ProverNodePublisher {
|
|
|
295
289
|
proof: proofHex,
|
|
296
290
|
};
|
|
297
291
|
}
|
|
298
|
-
|
|
299
|
-
protected async sleepOrInterrupted() {
|
|
300
|
-
await this.interruptibleSleep.sleep(this.sleepTimeMs);
|
|
301
|
-
}
|
|
302
292
|
}
|