@aztec/prover-node 2.0.0-rc.7 → 2.0.2-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.
@@ -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,EAIL,KAAK,QAAQ,EACb,KAAK,cAAc,EAEpB,MAAM,sBAAsB,CAAC;AAC9B,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,MAAM,2BAA2B,CAAC;AAE5F,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAC3C,sBAAsB,GACtB,SAAS,GACT,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,wBAAwB,GACxB,kBAAkB,CAAC;AAErB,MAAM,MAAM,wBAAwB,GAAG;IACrC,wBAAwB,EAAE,MAAM,CAAC;IACjC,2BAA2B,E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AC;AACxH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EAGpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,KAAK,gBAAgB,EAA4B,MAAM,2BAA2B,CAAC;AAE5F,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAC3C,sBAAsB,GACtB,SAAS,GACT,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,wBAAwB,GACxB,kBAAkB,CAAC;AAErB,MAAM,MAAM,wBAAwB,GAAG;IACrC,wBAAwB,EAAE,MAAM,CAAC;IACjC,2BAA2B,EAAE,MAAM,CAAC;IACpC,mCAAmC,EAAE,MAAM,CAAC;IAC5C,0BAA0B,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qCAAqC,EAAE,MAAM,CAAC;CAC/C,CAAC;AA6CF,eAAO,MAAM,wBAAwB,EAAE,kBAAkB,CAAC,gBAAgB,CAYzE,CAAC;AAEF,wBAAgB,0BAA0B,IAAI,gBAAgB,CAE7D;AAED,wBAAgB,gCAAgC,IAAI,kBAAkB,CAIrE;AAED,wBAAgB,+BAA+B,IAAI,iBAAiB,GAAG,QAAQ,GAAG,UAAU,CAK3F;AA0DD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,wBAM/D"}
package/dest/config.js CHANGED
@@ -2,7 +2,7 @@ import { archiverConfigMappings } from '@aztec/archiver/config';
2
2
  import { genesisStateConfigMappings } from '@aztec/ethereum';
3
3
  import { getConfigFromMappings, numberConfigHelper } from '@aztec/foundation/config';
4
4
  import { dataConfigMappings } from '@aztec/kv-store/config';
5
- import { keyStoreConfigMappings } from '@aztec/node-keystore';
5
+ import { ethPrivateKeySchema, keyStoreConfigMappings } from '@aztec/node-keystore';
6
6
  import { sharedNodeConfigMappings } from '@aztec/node-lib/config';
7
7
  import { p2pConfigMappings } from '@aztec/p2p/config';
8
8
  import { proverAgentConfigMappings, proverBrokerConfigMappings } from '@aztec/prover-client/broker';
@@ -79,14 +79,12 @@ export function getProverNodeAgentConfigFromEnv() {
79
79
  };
80
80
  }
81
81
  function createKeyStoreFromWeb3Signer(config) {
82
- // See what we have been given for proverId.
83
- const proverId = config.proverId ? config.proverId.toString() : undefined;
84
82
  // If we don't have a valid prover Id then we can't build a valid key store with remote signers
85
- if (proverId === undefined) {
83
+ if (config.proverId === undefined) {
86
84
  return undefined;
87
85
  }
88
86
  // Also, we need at least one publisher address.
89
- const publishers = config.publisherAddresses ? config.publisherAddresses.map((k)=>k.toChecksumString()) : [];
87
+ const publishers = config.publisherAddresses ?? [];
90
88
  if (publishers.length === 0) {
91
89
  return undefined;
92
90
  }
@@ -94,7 +92,7 @@ function createKeyStoreFromWeb3Signer(config) {
94
92
  schemaVersion: 1,
95
93
  slasher: undefined,
96
94
  prover: {
97
- id: proverId,
95
+ id: config.proverId,
98
96
  publisher: publishers
99
97
  },
100
98
  remoteSigner: config.web3SignerUrl,
@@ -104,21 +102,19 @@ function createKeyStoreFromWeb3Signer(config) {
104
102
  }
105
103
  function createKeyStoreFromPublisherKeys(config) {
106
104
  // Extract the publisher keys from the provided config.
107
- const publisherKeys = config.publisherPrivateKeys ? config.publisherPrivateKeys.map((k)=>k.getValue()) : [];
105
+ const publisherKeys = config.publisherPrivateKeys ? config.publisherPrivateKeys.map((k)=>ethPrivateKeySchema.parse(k.getValue())) : [];
108
106
  // There must be at least 1.
109
107
  if (publisherKeys.length === 0) {
110
108
  return undefined;
111
109
  }
112
- // Now see what we have been given for proverId.
113
- const proverId = config.proverId ? config.proverId.toString() : undefined;
114
110
  // If we have a valid proverId then create a prover key store of the form { id, publisher: [publisherKeys] }
115
111
  // Otherwise create one of the form ("0x12345678....." as EthAccount).
116
112
  const keyStore = {
117
113
  schemaVersion: 1,
118
114
  slasher: undefined,
119
- prover: proverId === undefined ? publisherKeys[0] : {
120
- id: proverId,
121
- publisher: publisherKeys.map((key)=>key)
115
+ prover: config.proverId === undefined ? publisherKeys[0] : {
116
+ id: config.proverId,
117
+ publisher: publisherKeys
122
118
  },
123
119
  remoteSigner: undefined,
124
120
  validators: undefined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/prover-node",
3
- "version": "2.0.0-rc.7",
3
+ "version": "2.0.2-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.0-rc.7",
60
- "@aztec/bb-prover": "2.0.0-rc.7",
61
- "@aztec/blob-lib": "2.0.0-rc.7",
62
- "@aztec/blob-sink": "2.0.0-rc.7",
63
- "@aztec/constants": "2.0.0-rc.7",
64
- "@aztec/epoch-cache": "2.0.0-rc.7",
65
- "@aztec/ethereum": "2.0.0-rc.7",
66
- "@aztec/foundation": "2.0.0-rc.7",
67
- "@aztec/kv-store": "2.0.0-rc.7",
68
- "@aztec/l1-artifacts": "2.0.0-rc.7",
69
- "@aztec/node-keystore": "2.0.0-rc.7",
70
- "@aztec/node-lib": "2.0.0-rc.7",
71
- "@aztec/noir-protocol-circuits-types": "2.0.0-rc.7",
72
- "@aztec/p2p": "2.0.0-rc.7",
73
- "@aztec/protocol-contracts": "2.0.0-rc.7",
74
- "@aztec/prover-client": "2.0.0-rc.7",
75
- "@aztec/sequencer-client": "2.0.0-rc.7",
76
- "@aztec/simulator": "2.0.0-rc.7",
77
- "@aztec/stdlib": "2.0.0-rc.7",
78
- "@aztec/telemetry-client": "2.0.0-rc.7",
79
- "@aztec/world-state": "2.0.0-rc.7",
59
+ "@aztec/archiver": "2.0.2-rc.1",
60
+ "@aztec/bb-prover": "2.0.2-rc.1",
61
+ "@aztec/blob-lib": "2.0.2-rc.1",
62
+ "@aztec/blob-sink": "2.0.2-rc.1",
63
+ "@aztec/constants": "2.0.2-rc.1",
64
+ "@aztec/epoch-cache": "2.0.2-rc.1",
65
+ "@aztec/ethereum": "2.0.2-rc.1",
66
+ "@aztec/foundation": "2.0.2-rc.1",
67
+ "@aztec/kv-store": "2.0.2-rc.1",
68
+ "@aztec/l1-artifacts": "2.0.2-rc.1",
69
+ "@aztec/node-keystore": "2.0.2-rc.1",
70
+ "@aztec/node-lib": "2.0.2-rc.1",
71
+ "@aztec/noir-protocol-circuits-types": "2.0.2-rc.1",
72
+ "@aztec/p2p": "2.0.2-rc.1",
73
+ "@aztec/protocol-contracts": "2.0.2-rc.1",
74
+ "@aztec/prover-client": "2.0.2-rc.1",
75
+ "@aztec/sequencer-client": "2.0.2-rc.1",
76
+ "@aztec/simulator": "2.0.2-rc.1",
77
+ "@aztec/stdlib": "2.0.2-rc.1",
78
+ "@aztec/telemetry-client": "2.0.2-rc.1",
79
+ "@aztec/world-state": "2.0.2-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
@@ -3,14 +3,7 @@ import type { ACVMConfig, BBConfig } from '@aztec/bb-prover/config';
3
3
  import { type GenesisStateConfig, genesisStateConfigMappings } from '@aztec/ethereum';
4
4
  import { type ConfigMappingsType, getConfigFromMappings, numberConfigHelper } from '@aztec/foundation/config';
5
5
  import { type DataStoreConfig, dataConfigMappings } from '@aztec/kv-store/config';
6
- import {
7
- type EthAccount,
8
- type EthAddressHex,
9
- type EthRemoteSignerAccount,
10
- type KeyStore,
11
- type KeyStoreConfig,
12
- keyStoreConfigMappings,
13
- } from '@aztec/node-keystore';
6
+ import { type KeyStore, type KeyStoreConfig, ethPrivateKeySchema, keyStoreConfigMappings } from '@aztec/node-keystore';
14
7
  import { type SharedNodeConfig, sharedNodeConfigMappings } from '@aztec/node-lib/config';
15
8
  import { type P2PConfig, p2pConfigMappings } from '@aztec/p2p/config';
16
9
  import {
@@ -126,18 +119,13 @@ export function getProverNodeAgentConfigFromEnv(): ProverAgentConfig & BBConfig
126
119
  }
127
120
 
128
121
  function createKeyStoreFromWeb3Signer(config: ProverNodeConfig) {
129
- // See what we have been given for proverId.
130
- const proverId = config.proverId ? (config.proverId.toString() as EthAddressHex) : undefined;
131
-
132
122
  // If we don't have a valid prover Id then we can't build a valid key store with remote signers
133
- if (proverId === undefined) {
123
+ if (config.proverId === undefined) {
134
124
  return undefined;
135
125
  }
136
126
 
137
127
  // Also, we need at least one publisher address.
138
- const publishers = config.publisherAddresses
139
- ? config.publisherAddresses.map(k => k.toChecksumString() as EthRemoteSignerAccount)
140
- : [];
128
+ const publishers = config.publisherAddresses ?? [];
141
129
 
142
130
  if (publishers.length === 0) {
143
131
  return undefined;
@@ -147,7 +135,7 @@ function createKeyStoreFromWeb3Signer(config: ProverNodeConfig) {
147
135
  schemaVersion: 1,
148
136
  slasher: undefined,
149
137
  prover: {
150
- id: proverId,
138
+ id: config.proverId,
151
139
  publisher: publishers,
152
140
  },
153
141
  remoteSigner: config.web3SignerUrl,
@@ -159,7 +147,7 @@ function createKeyStoreFromWeb3Signer(config: ProverNodeConfig) {
159
147
  function createKeyStoreFromPublisherKeys(config: ProverNodeConfig) {
160
148
  // Extract the publisher keys from the provided config.
161
149
  const publisherKeys = config.publisherPrivateKeys
162
- ? config.publisherPrivateKeys.map(k => k.getValue() as EthAddressHex)
150
+ ? config.publisherPrivateKeys.map(k => ethPrivateKeySchema.parse(k.getValue()))
163
151
  : [];
164
152
 
165
153
  // There must be at least 1.
@@ -167,9 +155,6 @@ function createKeyStoreFromPublisherKeys(config: ProverNodeConfig) {
167
155
  return undefined;
168
156
  }
169
157
 
170
- // Now see what we have been given for proverId.
171
- const proverId = config.proverId ? (config.proverId.toString() as EthAddressHex) : undefined;
172
-
173
158
  // If we have a valid proverId then create a prover key store of the form { id, publisher: [publisherKeys] }
174
159
  // Otherwise create one of the form ("0x12345678....." as EthAccount).
175
160
 
@@ -177,11 +162,11 @@ function createKeyStoreFromPublisherKeys(config: ProverNodeConfig) {
177
162
  schemaVersion: 1,
178
163
  slasher: undefined,
179
164
  prover:
180
- proverId === undefined
181
- ? (publisherKeys[0] as EthAccount)
165
+ config.proverId === undefined
166
+ ? publisherKeys[0]
182
167
  : {
183
- id: proverId,
184
- publisher: publisherKeys.map(key => key as EthAccount),
168
+ id: config.proverId,
169
+ publisher: publisherKeys,
185
170
  },
186
171
  remoteSigner: undefined,
187
172
  validators: undefined,