@aztec/prover-node 2.0.3-rc.9 → 2.1.0-rc.1
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/config.d.ts.map +1 -1
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +2 -1
- package/dest/prover-node-publisher.d.ts +2 -1
- package/dest/prover-node-publisher.d.ts.map +1 -1
- package/dest/prover-node-publisher.js +8 -2
- package/package.json +22 -22
- package/src/config.ts +3 -3
- package/src/factory.ts +3 -1
- package/src/prover-node-publisher.ts +13 -7
package/dest/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,wBAAwB,CAAC;AACrF,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,KAAK,kBAAkB,EAA8B,MAAM,iBAAiB,CAAC;AACtF,OAAO,EAAE,KAAK,kBAAkB,EAA6C,MAAM,0BAA0B,CAAC;AAC9G,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAA+C,MAAM,sBAAsB,CAAC;AACvH,OAAO,EAAE,KAAK,gBAAgB,EAA4B,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,mBAAmB,CAAC;AACtE,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAGxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,sBAAsB,EAAgD,MAAM,6BAA6B,CAAC;AACxH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EAGpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,KAAK,gBAAgB,EAA4B,M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;IACtD,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C,cAAc,CAAC,EAAE,uBAAuB,CAAC;IACzC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,gDAAgD;AAChD,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,gBAAgB,GAAG,eAAe,GAAG,cAAc,EAC/D,IAAI,GAAE,cAAmB,EACzB,OAAO,GAAE;IACP,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACvC,uBAkKP"}
|
package/dest/factory.js
CHANGED
|
@@ -42,6 +42,7 @@ import { ProverPublisherFactory } from './prover-publisher-factory.js';
|
|
|
42
42
|
keyStoreManager = new KeystoreManager(keyStore);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
await keyStoreManager?.validateSigners();
|
|
45
46
|
// Extract the prover signers from the key store and verify that we have one.
|
|
46
47
|
const proverSigners = keyStoreManager?.createProverSigners();
|
|
47
48
|
if (proverSigners === undefined) {
|
|
@@ -94,7 +95,7 @@ import { ProverPublisherFactory } from './prover-publisher-factory.js';
|
|
|
94
95
|
});
|
|
95
96
|
const publisherFactory = deps.publisherFactory ?? new ProverPublisherFactory(config, {
|
|
96
97
|
rollupContract,
|
|
97
|
-
publisherManager: new PublisherManager(l1TxUtils),
|
|
98
|
+
publisherManager: new PublisherManager(l1TxUtils, config),
|
|
98
99
|
telemetry
|
|
99
100
|
});
|
|
100
101
|
const proofVerifier = new QueuedIVCVerifier(config, config.realProofs ? await BBCircuitVerifier.new(config) : new TestCircuitVerifier());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BatchedBlob } from '@aztec/blob-lib';
|
|
2
2
|
import { AZTEC_MAX_EPOCH_DURATION } from '@aztec/constants';
|
|
3
|
-
import {
|
|
3
|
+
import type { L1TxUtils, RollupContract, ViemCommitteeAttestation } from '@aztec/ethereum';
|
|
4
4
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
5
|
import { Fr } from '@aztec/foundation/fields';
|
|
6
6
|
import type { Tuple } from '@aztec/foundation/serialize';
|
|
@@ -20,6 +20,7 @@ export type L1SubmitEpochProofArgs = {
|
|
|
20
20
|
proof: Proof;
|
|
21
21
|
};
|
|
22
22
|
export declare class ProverNodePublisher {
|
|
23
|
+
private enabled;
|
|
23
24
|
private interruptibleSleep;
|
|
24
25
|
private sleepTimeMs;
|
|
25
26
|
private interrupted;
|
|
@@ -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,EAAoC,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,
|
|
1
|
+
{"version":3,"file":"prover-node-publisher.d.ts","sourceRoot":"","sources":["../src/prover-node-publisher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAoC,MAAM,iBAAiB,CAAC;AACrF,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;AAIzD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAE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AAO,CAAC,OAAO,CAAC;YAwDN,4BAA4B;YA0D5B,sBAAsB;IAyCpC,OAAO,CAAC,6BAA6B;IAyBrC,OAAO,CAAC,uBAAuB;cAwBf,kBAAkB;CAGnC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FinalBlobAccumulatorPublicInputs } from '@aztec/blob-lib';
|
|
2
2
|
import { AZTEC_MAX_EPOCH_DURATION } from '@aztec/constants';
|
|
3
|
-
import { RollupContract as RollupContractClass } from '@aztec/ethereum';
|
|
4
3
|
import { makeTuple } from '@aztec/foundation/array';
|
|
5
4
|
import { areArraysEqual } from '@aztec/foundation/collection';
|
|
6
5
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
@@ -9,11 +8,13 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
9
8
|
import { InterruptibleSleep } from '@aztec/foundation/sleep';
|
|
10
9
|
import { Timer } from '@aztec/foundation/timer';
|
|
11
10
|
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
11
|
+
import { CommitteeAttestation, CommitteeAttestationsAndSigners } from '@aztec/stdlib/block';
|
|
12
12
|
import { getTelemetryClient } from '@aztec/telemetry-client';
|
|
13
13
|
import { inspect } from 'util';
|
|
14
14
|
import { encodeFunctionData } from 'viem';
|
|
15
15
|
import { ProverNodePublisherMetrics } from './metrics.js';
|
|
16
16
|
export class ProverNodePublisher {
|
|
17
|
+
enabled;
|
|
17
18
|
interruptibleSleep = new InterruptibleSleep();
|
|
18
19
|
sleepTimeMs;
|
|
19
20
|
interrupted = false;
|
|
@@ -22,6 +23,7 @@ export class ProverNodePublisher {
|
|
|
22
23
|
rollupContract;
|
|
23
24
|
l1TxUtils;
|
|
24
25
|
constructor(config, deps){
|
|
26
|
+
this.enabled = config.publisherEnabled ?? true;
|
|
25
27
|
this.sleepTimeMs = config?.l1PublishRetryIntervalMS ?? 60_000;
|
|
26
28
|
const telemetry = deps.telemetry ?? getTelemetryClient();
|
|
27
29
|
this.metrics = new ProverNodePublisherMetrics(telemetry, 'ProverNode');
|
|
@@ -53,6 +55,10 @@ export class ProverNodePublisher {
|
|
|
53
55
|
fromBlock,
|
|
54
56
|
toBlock
|
|
55
57
|
};
|
|
58
|
+
if (!this.enabled) {
|
|
59
|
+
this.log.warn(`Publishing L1 txs is disabled`);
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
56
62
|
if (!this.interrupted) {
|
|
57
63
|
const timer = new Timer();
|
|
58
64
|
// Validate epoch proof range and hashes are correct before submitting
|
|
@@ -187,7 +193,7 @@ export class ProverNodePublisher {
|
|
|
187
193
|
end: argsArray[1],
|
|
188
194
|
args: argsArray[2],
|
|
189
195
|
fees: argsArray[3],
|
|
190
|
-
attestations:
|
|
196
|
+
attestations: new CommitteeAttestationsAndSigners(args.attestations.map((a)=>CommitteeAttestation.fromViem(a))).getPackedAttestations(),
|
|
191
197
|
blobInputs: argsArray[4],
|
|
192
198
|
proof: proofHex
|
|
193
199
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/prover-node",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0-rc.1",
|
|
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": "2.0
|
|
60
|
-
"@aztec/bb-prover": "2.0
|
|
61
|
-
"@aztec/blob-lib": "2.0
|
|
62
|
-
"@aztec/blob-sink": "2.0
|
|
63
|
-
"@aztec/constants": "2.0
|
|
64
|
-
"@aztec/epoch-cache": "2.0
|
|
65
|
-
"@aztec/ethereum": "2.0
|
|
66
|
-
"@aztec/foundation": "2.0
|
|
67
|
-
"@aztec/kv-store": "2.0
|
|
68
|
-
"@aztec/l1-artifacts": "2.0
|
|
69
|
-
"@aztec/node-keystore": "2.0
|
|
70
|
-
"@aztec/node-lib": "2.0
|
|
71
|
-
"@aztec/noir-protocol-circuits-types": "2.0
|
|
72
|
-
"@aztec/p2p": "2.0
|
|
73
|
-
"@aztec/protocol-contracts": "2.0
|
|
74
|
-
"@aztec/prover-client": "2.0
|
|
75
|
-
"@aztec/sequencer-client": "2.0
|
|
76
|
-
"@aztec/simulator": "2.0
|
|
77
|
-
"@aztec/stdlib": "2.0
|
|
78
|
-
"@aztec/telemetry-client": "2.0
|
|
79
|
-
"@aztec/world-state": "2.0
|
|
59
|
+
"@aztec/archiver": "2.1.0-rc.1",
|
|
60
|
+
"@aztec/bb-prover": "2.1.0-rc.1",
|
|
61
|
+
"@aztec/blob-lib": "2.1.0-rc.1",
|
|
62
|
+
"@aztec/blob-sink": "2.1.0-rc.1",
|
|
63
|
+
"@aztec/constants": "2.1.0-rc.1",
|
|
64
|
+
"@aztec/epoch-cache": "2.1.0-rc.1",
|
|
65
|
+
"@aztec/ethereum": "2.1.0-rc.1",
|
|
66
|
+
"@aztec/foundation": "2.1.0-rc.1",
|
|
67
|
+
"@aztec/kv-store": "2.1.0-rc.1",
|
|
68
|
+
"@aztec/l1-artifacts": "2.1.0-rc.1",
|
|
69
|
+
"@aztec/node-keystore": "2.1.0-rc.1",
|
|
70
|
+
"@aztec/node-lib": "2.1.0-rc.1",
|
|
71
|
+
"@aztec/noir-protocol-circuits-types": "2.1.0-rc.1",
|
|
72
|
+
"@aztec/p2p": "2.1.0-rc.1",
|
|
73
|
+
"@aztec/protocol-contracts": "2.1.0-rc.1",
|
|
74
|
+
"@aztec/prover-client": "2.1.0-rc.1",
|
|
75
|
+
"@aztec/sequencer-client": "2.1.0-rc.1",
|
|
76
|
+
"@aztec/simulator": "2.1.0-rc.1",
|
|
77
|
+
"@aztec/stdlib": "2.1.0-rc.1",
|
|
78
|
+
"@aztec/telemetry-client": "2.1.0-rc.1",
|
|
79
|
+
"@aztec/world-state": "2.1.0-rc.1",
|
|
80
80
|
"source-map-support": "^0.5.21",
|
|
81
81
|
"tslib": "^2.4.0",
|
|
82
82
|
"viem": "2.23.7"
|
package/src/config.ts
CHANGED
|
@@ -118,7 +118,7 @@ export function getProverNodeAgentConfigFromEnv(): ProverAgentConfig & BBConfig
|
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
function createKeyStoreFromWeb3Signer(config: ProverNodeConfig) {
|
|
121
|
+
function createKeyStoreFromWeb3Signer(config: ProverNodeConfig): KeyStore | undefined {
|
|
122
122
|
// If we don't have a valid prover Id then we can't build a valid key store with remote signers
|
|
123
123
|
if (config.proverId === undefined) {
|
|
124
124
|
return undefined;
|
|
@@ -144,7 +144,7 @@ function createKeyStoreFromWeb3Signer(config: ProverNodeConfig) {
|
|
|
144
144
|
return keyStore;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
function createKeyStoreFromPublisherKeys(config: ProverNodeConfig) {
|
|
147
|
+
function createKeyStoreFromPublisherKeys(config: ProverNodeConfig): KeyStore | undefined {
|
|
148
148
|
// Extract the publisher keys from the provided config.
|
|
149
149
|
const publisherKeys = config.publisherPrivateKeys
|
|
150
150
|
? config.publisherPrivateKeys.map(k => ethPrivateKeySchema.parse(k.getValue()))
|
|
@@ -174,7 +174,7 @@ function createKeyStoreFromPublisherKeys(config: ProverNodeConfig) {
|
|
|
174
174
|
return keyStore;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
export function createKeyStoreForProver(config: ProverNodeConfig) {
|
|
177
|
+
export function createKeyStoreForProver(config: ProverNodeConfig): KeyStore | undefined {
|
|
178
178
|
if (config.web3SignerUrl !== undefined && config.web3SignerUrl.length > 0) {
|
|
179
179
|
return createKeyStoreFromWeb3Signer(config);
|
|
180
180
|
}
|
package/src/factory.ts
CHANGED
|
@@ -73,6 +73,8 @@ export async function createProverNode(
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
await keyStoreManager?.validateSigners();
|
|
77
|
+
|
|
76
78
|
// Extract the prover signers from the key store and verify that we have one.
|
|
77
79
|
const proverSigners = keyStoreManager?.createProverSigners();
|
|
78
80
|
|
|
@@ -141,7 +143,7 @@ export async function createProverNode(
|
|
|
141
143
|
deps.publisherFactory ??
|
|
142
144
|
new ProverPublisherFactory(config, {
|
|
143
145
|
rollupContract,
|
|
144
|
-
publisherManager: new PublisherManager(l1TxUtils),
|
|
146
|
+
publisherManager: new PublisherManager(l1TxUtils, config),
|
|
145
147
|
telemetry,
|
|
146
148
|
});
|
|
147
149
|
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { type BatchedBlob, FinalBlobAccumulatorPublicInputs } from '@aztec/blob-lib';
|
|
2
2
|
import { AZTEC_MAX_EPOCH_DURATION } from '@aztec/constants';
|
|
3
|
-
import {
|
|
4
|
-
type L1TxUtils,
|
|
5
|
-
type RollupContract,
|
|
6
|
-
RollupContract as RollupContractClass,
|
|
7
|
-
type ViemCommitteeAttestation,
|
|
8
|
-
} from '@aztec/ethereum';
|
|
3
|
+
import type { L1TxUtils, RollupContract, ViemCommitteeAttestation } from '@aztec/ethereum';
|
|
9
4
|
import { makeTuple } from '@aztec/foundation/array';
|
|
10
5
|
import { areArraysEqual } from '@aztec/foundation/collection';
|
|
11
6
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
@@ -16,6 +11,7 @@ import { InterruptibleSleep } from '@aztec/foundation/sleep';
|
|
|
16
11
|
import { Timer } from '@aztec/foundation/timer';
|
|
17
12
|
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
18
13
|
import type { PublisherConfig, TxSenderConfig } from '@aztec/sequencer-client';
|
|
14
|
+
import { CommitteeAttestation, CommitteeAttestationsAndSigners } from '@aztec/stdlib/block';
|
|
19
15
|
import type { Proof } from '@aztec/stdlib/proofs';
|
|
20
16
|
import type { FeeRecipient, RootRollupPublicInputs } from '@aztec/stdlib/rollup';
|
|
21
17
|
import type { L1PublishProofStats } from '@aztec/stdlib/stats';
|
|
@@ -39,6 +35,7 @@ export type L1SubmitEpochProofArgs = {
|
|
|
39
35
|
};
|
|
40
36
|
|
|
41
37
|
export class ProverNodePublisher {
|
|
38
|
+
private enabled: boolean;
|
|
42
39
|
private interruptibleSleep = new InterruptibleSleep();
|
|
43
40
|
private sleepTimeMs: number;
|
|
44
41
|
private interrupted = false;
|
|
@@ -58,6 +55,7 @@ export class ProverNodePublisher {
|
|
|
58
55
|
telemetry?: TelemetryClient;
|
|
59
56
|
},
|
|
60
57
|
) {
|
|
58
|
+
this.enabled = config.publisherEnabled ?? true;
|
|
61
59
|
this.sleepTimeMs = config?.l1PublishRetryIntervalMS ?? 60_000;
|
|
62
60
|
|
|
63
61
|
const telemetry = deps.telemetry ?? getTelemetryClient();
|
|
@@ -103,6 +101,12 @@ export class ProverNodePublisher {
|
|
|
103
101
|
}): Promise<boolean> {
|
|
104
102
|
const { epochNumber, fromBlock, toBlock } = args;
|
|
105
103
|
const ctx = { epochNumber, fromBlock, toBlock };
|
|
104
|
+
|
|
105
|
+
if (!this.enabled) {
|
|
106
|
+
this.log.warn(`Publishing L1 txs is disabled`);
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
|
|
106
110
|
if (!this.interrupted) {
|
|
107
111
|
const timer = new Timer();
|
|
108
112
|
// Validate epoch proof range and hashes are correct before submitting
|
|
@@ -290,7 +294,9 @@ export class ProverNodePublisher {
|
|
|
290
294
|
end: argsArray[1],
|
|
291
295
|
args: argsArray[2],
|
|
292
296
|
fees: argsArray[3],
|
|
293
|
-
attestations:
|
|
297
|
+
attestations: new CommitteeAttestationsAndSigners(
|
|
298
|
+
args.attestations.map(a => CommitteeAttestation.fromViem(a)),
|
|
299
|
+
).getPackedAttestations(),
|
|
294
300
|
blobInputs: argsArray[4],
|
|
295
301
|
proof: proofHex,
|
|
296
302
|
};
|