@aztec/aztec-node 0.0.1-commit.8f9871590 → 0.0.1-commit.9117c5f5a
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/aztec-node/config.d.ts +7 -4
- package/dest/aztec-node/config.d.ts.map +1 -1
- package/dest/aztec-node/config.js +10 -2
- package/dest/aztec-node/server.d.ts +19 -6
- package/dest/aztec-node/server.d.ts.map +1 -1
- package/dest/aztec-node/server.js +226 -80
- package/dest/sentinel/sentinel.d.ts +1 -1
- package/dest/sentinel/sentinel.d.ts.map +1 -1
- package/dest/sentinel/sentinel.js +15 -8
- package/package.json +27 -25
- package/src/aztec-node/config.ts +24 -8
- package/src/aztec-node/server.ts +293 -98
- package/src/sentinel/sentinel.ts +15 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec-node",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.9117c5f5a",
|
|
4
4
|
"main": "dest/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -65,30 +65,32 @@
|
|
|
65
65
|
]
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@aztec/archiver": "0.0.1-commit.
|
|
69
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
70
|
-
"@aztec/blob-client": "0.0.1-commit.
|
|
71
|
-
"@aztec/
|
|
72
|
-
"@aztec/
|
|
73
|
-
"@aztec/
|
|
74
|
-
"@aztec/
|
|
75
|
-
"@aztec/
|
|
76
|
-
"@aztec/
|
|
77
|
-
"@aztec/
|
|
78
|
-
"@aztec/
|
|
79
|
-
"@aztec/node-
|
|
80
|
-
"@aztec/
|
|
81
|
-
"@aztec/
|
|
82
|
-
"@aztec/
|
|
83
|
-
"@aztec/
|
|
84
|
-
"@aztec/
|
|
85
|
-
"@aztec/
|
|
86
|
-
"@aztec/
|
|
87
|
-
"@aztec/
|
|
88
|
-
"@aztec/
|
|
89
|
-
"@aztec/
|
|
90
|
-
"@aztec/
|
|
91
|
-
"@aztec/
|
|
68
|
+
"@aztec/archiver": "0.0.1-commit.9117c5f5a",
|
|
69
|
+
"@aztec/bb-prover": "0.0.1-commit.9117c5f5a",
|
|
70
|
+
"@aztec/blob-client": "0.0.1-commit.9117c5f5a",
|
|
71
|
+
"@aztec/blob-lib": "0.0.1-commit.9117c5f5a",
|
|
72
|
+
"@aztec/constants": "0.0.1-commit.9117c5f5a",
|
|
73
|
+
"@aztec/epoch-cache": "0.0.1-commit.9117c5f5a",
|
|
74
|
+
"@aztec/ethereum": "0.0.1-commit.9117c5f5a",
|
|
75
|
+
"@aztec/foundation": "0.0.1-commit.9117c5f5a",
|
|
76
|
+
"@aztec/kv-store": "0.0.1-commit.9117c5f5a",
|
|
77
|
+
"@aztec/l1-artifacts": "0.0.1-commit.9117c5f5a",
|
|
78
|
+
"@aztec/merkle-tree": "0.0.1-commit.9117c5f5a",
|
|
79
|
+
"@aztec/node-keystore": "0.0.1-commit.9117c5f5a",
|
|
80
|
+
"@aztec/node-lib": "0.0.1-commit.9117c5f5a",
|
|
81
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.9117c5f5a",
|
|
82
|
+
"@aztec/p2p": "0.0.1-commit.9117c5f5a",
|
|
83
|
+
"@aztec/protocol-contracts": "0.0.1-commit.9117c5f5a",
|
|
84
|
+
"@aztec/prover-client": "0.0.1-commit.9117c5f5a",
|
|
85
|
+
"@aztec/prover-node": "0.0.1-commit.9117c5f5a",
|
|
86
|
+
"@aztec/sequencer-client": "0.0.1-commit.9117c5f5a",
|
|
87
|
+
"@aztec/simulator": "0.0.1-commit.9117c5f5a",
|
|
88
|
+
"@aztec/slasher": "0.0.1-commit.9117c5f5a",
|
|
89
|
+
"@aztec/stdlib": "0.0.1-commit.9117c5f5a",
|
|
90
|
+
"@aztec/telemetry-client": "0.0.1-commit.9117c5f5a",
|
|
91
|
+
"@aztec/validator-client": "0.0.1-commit.9117c5f5a",
|
|
92
|
+
"@aztec/validator-ha-signer": "0.0.1-commit.9117c5f5a",
|
|
93
|
+
"@aztec/world-state": "0.0.1-commit.9117c5f5a",
|
|
92
94
|
"koa": "^2.16.1",
|
|
93
95
|
"koa-router": "^13.1.1",
|
|
94
96
|
"tslib": "^2.4.0",
|
package/src/aztec-node/config.ts
CHANGED
|
@@ -13,9 +13,14 @@ import {
|
|
|
13
13
|
import { type SharedNodeConfig, sharedNodeConfigMappings } from '@aztec/node-lib/config';
|
|
14
14
|
import { type P2PConfig, p2pConfigMappings } from '@aztec/p2p/config';
|
|
15
15
|
import { type ProverClientUserConfig, proverClientConfigMappings } from '@aztec/prover-client/config';
|
|
16
|
+
import {
|
|
17
|
+
type ProverNodeConfig,
|
|
18
|
+
proverNodeConfigMappings,
|
|
19
|
+
specificProverNodeConfigMappings,
|
|
20
|
+
} from '@aztec/prover-node/config';
|
|
16
21
|
import {
|
|
17
22
|
type SequencerClientConfig,
|
|
18
|
-
type
|
|
23
|
+
type SequencerTxSenderConfig,
|
|
19
24
|
sequencerClientConfigMappings,
|
|
20
25
|
} from '@aztec/sequencer-client/config';
|
|
21
26
|
import { slasherConfigMappings } from '@aztec/slasher';
|
|
@@ -46,16 +51,18 @@ export type AztecNodeConfig = ArchiverConfig &
|
|
|
46
51
|
SharedNodeConfig &
|
|
47
52
|
GenesisStateConfig &
|
|
48
53
|
NodeRPCConfig &
|
|
49
|
-
SlasherConfig &
|
|
54
|
+
SlasherConfig &
|
|
55
|
+
ProverNodeConfig & {
|
|
50
56
|
/** L1 contracts addresses */
|
|
51
57
|
l1Contracts: L1ContractAddresses;
|
|
52
58
|
/** Whether the validator is disabled for this node */
|
|
53
59
|
disableValidator: boolean;
|
|
54
60
|
/** Whether to skip waiting for the archiver to be fully synced before starting other services */
|
|
55
61
|
skipArchiverInitialSync: boolean;
|
|
56
|
-
|
|
57
62
|
/** A flag to force verification of tx Chonk proofs. Only used for testnet */
|
|
58
63
|
debugForceTxProofVerification: boolean;
|
|
64
|
+
/** Whether to enable the prover node as a subsystem. */
|
|
65
|
+
enableProverNode: boolean;
|
|
59
66
|
};
|
|
60
67
|
|
|
61
68
|
export const aztecNodeConfigMappings: ConfigMappingsType<AztecNodeConfig> = {
|
|
@@ -63,6 +70,7 @@ export const aztecNodeConfigMappings: ConfigMappingsType<AztecNodeConfig> = {
|
|
|
63
70
|
...keyStoreConfigMappings,
|
|
64
71
|
...archiverConfigMappings,
|
|
65
72
|
...sequencerClientConfigMappings,
|
|
73
|
+
...proverNodeConfigMappings,
|
|
66
74
|
...validatorClientConfigMappings,
|
|
67
75
|
...proverClientConfigMappings,
|
|
68
76
|
...worldStateConfigMappings,
|
|
@@ -72,6 +80,7 @@ export const aztecNodeConfigMappings: ConfigMappingsType<AztecNodeConfig> = {
|
|
|
72
80
|
...genesisStateConfigMappings,
|
|
73
81
|
...nodeRpcConfigMappings,
|
|
74
82
|
...slasherConfigMappings,
|
|
83
|
+
...specificProverNodeConfigMappings,
|
|
75
84
|
l1Contracts: {
|
|
76
85
|
description: 'The deployed L1 contract addresses',
|
|
77
86
|
nested: l1ContractAddressesMapping,
|
|
@@ -91,6 +100,11 @@ export const aztecNodeConfigMappings: ConfigMappingsType<AztecNodeConfig> = {
|
|
|
91
100
|
description: 'Whether to skip waiting for the archiver to be fully synced before starting other services.',
|
|
92
101
|
...booleanConfigHelper(false),
|
|
93
102
|
},
|
|
103
|
+
enableProverNode: {
|
|
104
|
+
env: 'ENABLE_PROVER_NODE',
|
|
105
|
+
description: 'Whether to enable the prover node as a subsystem.',
|
|
106
|
+
...booleanConfigHelper(false),
|
|
107
|
+
},
|
|
94
108
|
};
|
|
95
109
|
|
|
96
110
|
/**
|
|
@@ -101,7 +115,7 @@ export function getConfigEnvVars(): AztecNodeConfig {
|
|
|
101
115
|
return getConfigFromMappings<AztecNodeConfig>(aztecNodeConfigMappings);
|
|
102
116
|
}
|
|
103
117
|
|
|
104
|
-
type ConfigRequiredToBuildKeyStore =
|
|
118
|
+
type ConfigRequiredToBuildKeyStore = SequencerClientConfig & SharedNodeConfig & ValidatorClientConfig;
|
|
105
119
|
|
|
106
120
|
function createKeyStoreFromWeb3Signer(config: ConfigRequiredToBuildKeyStore): KeyStore | undefined {
|
|
107
121
|
const validatorKeyStores: ValidatorKeyStore[] = [];
|
|
@@ -120,7 +134,7 @@ function createKeyStoreFromWeb3Signer(config: ConfigRequiredToBuildKeyStore): Ke
|
|
|
120
134
|
feeRecipient: config.feeRecipient ?? AztecAddress.ZERO,
|
|
121
135
|
coinbase: config.coinbase ?? config.validatorAddresses[0],
|
|
122
136
|
remoteSigner: config.web3SignerUrl,
|
|
123
|
-
publisher: config.
|
|
137
|
+
publisher: config.sequencerPublisherAddresses ?? [],
|
|
124
138
|
});
|
|
125
139
|
|
|
126
140
|
const keyStore: KeyStore = {
|
|
@@ -145,8 +159,10 @@ function createKeyStoreFromPrivateKeys(config: ConfigRequiredToBuildKeyStore): K
|
|
|
145
159
|
const coinbase = config.coinbase ?? EthAddress.fromString(privateKeyToAddress(ethPrivateKeys[0]));
|
|
146
160
|
const feeRecipient = config.feeRecipient ?? AztecAddress.ZERO;
|
|
147
161
|
|
|
148
|
-
const publisherKeys = config.
|
|
149
|
-
? config.
|
|
162
|
+
const publisherKeys = config.sequencerPublisherPrivateKeys
|
|
163
|
+
? config.sequencerPublisherPrivateKeys.map((k: { getValue: () => string }) =>
|
|
164
|
+
ethPrivateKeySchema.parse(k.getValue()),
|
|
165
|
+
)
|
|
150
166
|
: [];
|
|
151
167
|
|
|
152
168
|
validatorKeyStores.push({
|
|
@@ -168,7 +184,7 @@ function createKeyStoreFromPrivateKeys(config: ConfigRequiredToBuildKeyStore): K
|
|
|
168
184
|
}
|
|
169
185
|
|
|
170
186
|
export function createKeyStoreForValidator(
|
|
171
|
-
config:
|
|
187
|
+
config: SequencerTxSenderConfig & SequencerClientConfig & SharedNodeConfig,
|
|
172
188
|
): KeyStore | undefined {
|
|
173
189
|
if (config.web3SignerUrl !== undefined && config.web3SignerUrl.length > 0) {
|
|
174
190
|
return createKeyStoreFromWeb3Signer(config);
|