@aztec/aztec-node 0.82.3 → 0.83.1-alpha-testnet.0
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 +3 -3
- package/dest/aztec-node/config.d.ts.map +1 -1
- package/dest/aztec-node/config.js +2 -1
- package/dest/aztec-node/server.d.ts.map +1 -1
- package/dest/aztec-node/server.js +29 -5
- package/dest/sentinel/config.js +1 -1
- package/package.json +23 -21
- package/src/aztec-node/config.ts +12 -5
- package/src/aztec-node/server.ts +47 -13
- package/src/sentinel/config.ts +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type ArchiverConfig } from '@aztec/archiver/config';
|
|
2
|
-
import { type L1ContractAddresses } from '@aztec/ethereum';
|
|
2
|
+
import { type GenesisStateConfig, type L1ContractAddresses } from '@aztec/ethereum';
|
|
3
3
|
import { type ConfigMappingsType } from '@aztec/foundation/config';
|
|
4
4
|
import { type DataStoreConfig } from '@aztec/kv-store/config';
|
|
5
5
|
import { type SharedNodeConfig } from '@aztec/node-lib/config';
|
|
6
6
|
import { type P2PConfig } from '@aztec/p2p/config';
|
|
7
|
-
import { type
|
|
7
|
+
import { type ProverClientUserConfig } from '@aztec/prover-client/config';
|
|
8
8
|
import { type SequencerClientConfig, sequencerClientConfigMappings } from '@aztec/sequencer-client/config';
|
|
9
9
|
import { type ValidatorClientConfig } from '@aztec/validator-client/config';
|
|
10
10
|
import { type WorldStateConfig } from '@aztec/world-state/config';
|
|
@@ -13,7 +13,7 @@ export { sequencerClientConfigMappings, type SequencerClientConfig };
|
|
|
13
13
|
/**
|
|
14
14
|
* The configuration the aztec node.
|
|
15
15
|
*/
|
|
16
|
-
export type AztecNodeConfig = ArchiverConfig & SequencerClientConfig & ValidatorClientConfig &
|
|
16
|
+
export type AztecNodeConfig = ArchiverConfig & SequencerClientConfig & ValidatorClientConfig & ProverClientUserConfig & WorldStateConfig & Pick<ProverClientUserConfig, 'bbBinaryPath' | 'bbWorkingDirectory' | 'realProofs'> & P2PConfig & DataStoreConfig & SentinelConfig & SharedNodeConfig & GenesisStateConfig & {
|
|
17
17
|
/** L1 contracts addresses */
|
|
18
18
|
l1Contracts: L1ContractAddresses;
|
|
19
19
|
/** Whether the validator is disabled for this node */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/aztec-node/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,wBAAwB,CAAC;AACrF,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/aztec-node/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,wBAAwB,CAAC;AACrF,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAGzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,kBAAkB,EAA8C,MAAM,0BAA0B,CAAC;AAC/G,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,KAAK,gBAAgB,EAA4B,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,KAAK,sBAAsB,EAA8B,MAAM,6BAA6B,CAAC;AACtG,OAAO,EAAE,KAAK,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC3G,OAAO,EAAE,KAAK,qBAAqB,EAAiC,MAAM,gCAAgC,CAAC;AAC3G,OAAO,EAAE,KAAK,gBAAgB,EAA4B,MAAM,2BAA2B,CAAC;AAM5F,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,uBAAuB,CAAC;AAEpF,OAAO,EAAE,6BAA6B,EAAE,KAAK,qBAAqB,EAAE,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,cAAc,GAC1C,qBAAqB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,gBAAgB,GAChB,IAAI,CAAC,sBAAsB,EAAE,cAAc,GAAG,oBAAoB,GAAG,YAAY,CAAC,GAClF,SAAS,GACT,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,kBAAkB,GAAG;IACnB,6BAA6B;IAC7B,WAAW,EAAE,mBAAmB,CAAC;IACjC,sDAAsD;IACtD,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEJ,eAAO,MAAM,uBAAuB,EAAE,kBAAkB,CAAC,eAAe,CAoBvE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,eAAe,CAElD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,QAOhC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { archiverConfigMappings } from '@aztec/archiver/config';
|
|
2
|
-
import { l1ContractAddressesMapping } from '@aztec/ethereum';
|
|
2
|
+
import { genesisStateConfigMappings, l1ContractAddressesMapping } from '@aztec/ethereum';
|
|
3
3
|
import { booleanConfigHelper, getConfigFromMappings } from '@aztec/foundation/config';
|
|
4
4
|
import { dataConfigMappings } from '@aztec/kv-store/config';
|
|
5
5
|
import { sharedNodeConfigMappings } from '@aztec/node-lib/config';
|
|
@@ -23,6 +23,7 @@ export const aztecNodeConfigMappings = {
|
|
|
23
23
|
...p2pConfigMappings,
|
|
24
24
|
...sentinelConfigMappings,
|
|
25
25
|
...sharedNodeConfigMappings,
|
|
26
|
+
...genesisStateConfigMappings,
|
|
26
27
|
l1Contracts: {
|
|
27
28
|
description: 'The deployed L1 contract addresses',
|
|
28
29
|
nested: l1ContractAddressesMapping
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/aztec-node/server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,uBAAuB,EAAwB,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EACL,KAAK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iB,GAAG,SAAS,CAAC;IAkB5G;;;;;;;;;;OAUG;IACU,kBAAkB,CAAC,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC;IAe1G;;;OAGG;IACU,cAAc,CAAC,WAAW,GAAE,aAAwB,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;IAMpG;;;QAGI;IAIS,mBAAmB,CAAC,EAAE,EAAE,EAAE,EAAE,kBAAkB,UAAQ,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAkDxF,SAAS,CACpB,EAAE,EAAE,EAAE,EACN,EAAE,YAAY,EAAE,kBAAkB,EAAE,GAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAC;QAAC,kBAAkB,CAAC,EAAE,OAAO,CAAA;KAAO,GAClG,OAAO,CAAC,kBAAkB,CAAC;IAgBjB,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,GAAG,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAW/E,4BAA4B,IAAI,OAAO,CAAC,yBAAyB,CAAC;IASlE,kCAAkC,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/F,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAQzB,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC;IAIxC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CA2ElE"}
|
|
@@ -9,7 +9,7 @@ import { BBCircuitVerifier, TestCircuitVerifier } from '@aztec/bb-prover';
|
|
|
9
9
|
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
10
10
|
import { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
11
11
|
import { EpochCache } from '@aztec/epoch-cache';
|
|
12
|
-
import { createEthereumChain } from '@aztec/ethereum';
|
|
12
|
+
import { RegistryContract, createEthereumChain } from '@aztec/ethereum';
|
|
13
13
|
import { compactArray } from '@aztec/foundation/collection';
|
|
14
14
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
15
15
|
import { Fr } from '@aztec/foundation/fields';
|
|
@@ -18,6 +18,7 @@ import { SerialQueue } from '@aztec/foundation/queue';
|
|
|
18
18
|
import { DateProvider, Timer } from '@aztec/foundation/timer';
|
|
19
19
|
import { SiblingPath } from '@aztec/foundation/trees';
|
|
20
20
|
import { openTmpStore } from '@aztec/kv-store/lmdb';
|
|
21
|
+
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
21
22
|
import { SHA256Trunc, StandardTree, UnbalancedTree } from '@aztec/merkle-tree';
|
|
22
23
|
import { trySnapshotSync, uploadSnapshot } from '@aztec/node-lib/actions';
|
|
23
24
|
import { createP2PClient } from '@aztec/p2p';
|
|
@@ -33,6 +34,7 @@ import { PublicSimulationOutput, TxReceipt, TxStatus } from '@aztec/stdlib/tx';
|
|
|
33
34
|
import { Attributes, getTelemetryClient, trackSpan } from '@aztec/telemetry-client';
|
|
34
35
|
import { createValidatorClient } from '@aztec/validator-client';
|
|
35
36
|
import { createWorldStateSynchronizer } from '@aztec/world-state';
|
|
37
|
+
import { createPublicClient, fallback, getContract, http } from 'viem';
|
|
36
38
|
import { createSentinel } from '../sentinel/factory.js';
|
|
37
39
|
import { getPackageVersion } from './config.js';
|
|
38
40
|
import { NodeMetrics } from './node_metrics.js';
|
|
@@ -107,6 +109,27 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
107
109
|
if (config.l1ChainId !== ethereumChain.chainInfo.id) {
|
|
108
110
|
throw new Error(`RPC URL configured for chain id ${ethereumChain.chainInfo.id} but expected id ${config.l1ChainId}`);
|
|
109
111
|
}
|
|
112
|
+
const publicClient = createPublicClient({
|
|
113
|
+
chain: ethereumChain.chainInfo,
|
|
114
|
+
transport: fallback(config.l1RpcUrls.map((url)=>http(url))),
|
|
115
|
+
pollingInterval: config.viemPollingIntervalMS
|
|
116
|
+
});
|
|
117
|
+
const l1ContractsAddresses = await RegistryContract.collectAddresses(publicClient, config.l1Contracts.registryAddress, config.rollupVersion ?? 'canonical');
|
|
118
|
+
// Overwrite the passed in vars.
|
|
119
|
+
config.l1Contracts = {
|
|
120
|
+
...config.l1Contracts,
|
|
121
|
+
...l1ContractsAddresses
|
|
122
|
+
};
|
|
123
|
+
const rollup = getContract({
|
|
124
|
+
address: l1ContractsAddresses.rollupAddress.toString(),
|
|
125
|
+
abi: RollupAbi,
|
|
126
|
+
client: publicClient
|
|
127
|
+
});
|
|
128
|
+
const rollupVersionFromRollup = Number(await rollup.read.getVersion());
|
|
129
|
+
config.rollupVersion ??= rollupVersionFromRollup;
|
|
130
|
+
if (config.rollupVersion !== rollupVersionFromRollup) {
|
|
131
|
+
log.warn(`Registry looked up and returned a rollup with version (${config.rollupVersion}), but this does not match with version detected from the rollup directly: (${rollupVersionFromRollup}).`);
|
|
132
|
+
}
|
|
110
133
|
// attempt snapshot sync if possible
|
|
111
134
|
await trySnapshotSync(config, log);
|
|
112
135
|
const archiver = await createArchiver(config, blobSinkClient, {
|
|
@@ -153,7 +176,7 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
153
176
|
dateProvider,
|
|
154
177
|
blobSinkClient
|
|
155
178
|
});
|
|
156
|
-
return new AztecNodeService(config, p2pClient, archiver, archiver, archiver, archiver, worldStateSynchronizer, sequencer, validatorsSentinel, ethereumChain.chainInfo.id, config.
|
|
179
|
+
return new AztecNodeService(config, p2pClient, archiver, archiver, archiver, archiver, worldStateSynchronizer, sequencer, validatorsSentinel, ethereumChain.chainInfo.id, config.rollupVersion, new GlobalVariableBuilder(config), proofVerifier, telemetry, log);
|
|
157
180
|
}
|
|
158
181
|
/**
|
|
159
182
|
* Returns the sequencer client instance.
|
|
@@ -186,7 +209,7 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
186
209
|
return Promise.resolve(this.p2pClient.isReady() ?? false);
|
|
187
210
|
}
|
|
188
211
|
async getNodeInfo() {
|
|
189
|
-
const [nodeVersion,
|
|
212
|
+
const [nodeVersion, rollupVersion, chainId, enr, contractAddresses, protocolContractAddresses] = await Promise.all([
|
|
190
213
|
this.getNodeVersion(),
|
|
191
214
|
this.getVersion(),
|
|
192
215
|
this.getChainId(),
|
|
@@ -197,7 +220,7 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
197
220
|
const nodeInfo = {
|
|
198
221
|
nodeVersion,
|
|
199
222
|
l1ChainId: chainId,
|
|
200
|
-
|
|
223
|
+
rollupVersion,
|
|
201
224
|
enr,
|
|
202
225
|
l1ContractAddresses: contractAddresses,
|
|
203
226
|
protocolContractAddresses: protocolContractAddresses
|
|
@@ -634,7 +657,7 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
634
657
|
return Fr.ZERO;
|
|
635
658
|
}
|
|
636
659
|
const preimage = await committedDb.getLeafPreimage(MerkleTreeId.PUBLIC_DATA_TREE, lowLeafResult.index);
|
|
637
|
-
return preimage.value;
|
|
660
|
+
return preimage.leaf.value;
|
|
638
661
|
}
|
|
639
662
|
/**
|
|
640
663
|
* Returns the currently committed block header, or the initial header if no blocks have been produced.
|
|
@@ -685,6 +708,7 @@ import { NodeMetrics } from './node_metrics.js';
|
|
|
685
708
|
const validator = createValidatorForAcceptingTxs(db, this.contractDataSource, verifier, {
|
|
686
709
|
blockNumber,
|
|
687
710
|
l1ChainId: this.l1ChainId,
|
|
711
|
+
rollupVersion: this.version,
|
|
688
712
|
setupAllowList: this.config.allowedInSetup ?? await getDefaultAllowedSetupFunctions(),
|
|
689
713
|
gasFees: await this.getCurrentBaseFees(),
|
|
690
714
|
skipFeeEnforcement
|
package/dest/sentinel/config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.83.1-alpha-testnet.0",
|
|
4
4
|
"main": "dest/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -63,28 +63,30 @@
|
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@aztec/archiver": "0.
|
|
67
|
-
"@aztec/bb-prover": "0.
|
|
68
|
-
"@aztec/blob-sink": "0.
|
|
69
|
-
"@aztec/constants": "0.
|
|
70
|
-
"@aztec/epoch-cache": "0.
|
|
71
|
-
"@aztec/ethereum": "0.
|
|
72
|
-
"@aztec/foundation": "0.
|
|
73
|
-
"@aztec/kv-store": "0.
|
|
74
|
-
"@aztec/
|
|
75
|
-
"@aztec/
|
|
76
|
-
"@aztec/
|
|
77
|
-
"@aztec/
|
|
78
|
-
"@aztec/
|
|
79
|
-
"@aztec/
|
|
80
|
-
"@aztec/
|
|
81
|
-
"@aztec/
|
|
82
|
-
"@aztec/
|
|
83
|
-
"@aztec/
|
|
84
|
-
"@aztec/
|
|
66
|
+
"@aztec/archiver": "0.83.1-alpha-testnet.0",
|
|
67
|
+
"@aztec/bb-prover": "0.83.1-alpha-testnet.0",
|
|
68
|
+
"@aztec/blob-sink": "0.83.1-alpha-testnet.0",
|
|
69
|
+
"@aztec/constants": "0.83.1-alpha-testnet.0",
|
|
70
|
+
"@aztec/epoch-cache": "0.83.1-alpha-testnet.0",
|
|
71
|
+
"@aztec/ethereum": "0.83.1-alpha-testnet.0",
|
|
72
|
+
"@aztec/foundation": "0.83.1-alpha-testnet.0",
|
|
73
|
+
"@aztec/kv-store": "0.83.1-alpha-testnet.0",
|
|
74
|
+
"@aztec/l1-artifacts": "0.83.1-alpha-testnet.0",
|
|
75
|
+
"@aztec/merkle-tree": "0.83.1-alpha-testnet.0",
|
|
76
|
+
"@aztec/node-lib": "0.83.1-alpha-testnet.0",
|
|
77
|
+
"@aztec/p2p": "0.83.1-alpha-testnet.0",
|
|
78
|
+
"@aztec/protocol-contracts": "0.83.1-alpha-testnet.0",
|
|
79
|
+
"@aztec/prover-client": "0.83.1-alpha-testnet.0",
|
|
80
|
+
"@aztec/sequencer-client": "0.83.1-alpha-testnet.0",
|
|
81
|
+
"@aztec/simulator": "0.83.1-alpha-testnet.0",
|
|
82
|
+
"@aztec/stdlib": "0.83.1-alpha-testnet.0",
|
|
83
|
+
"@aztec/telemetry-client": "0.83.1-alpha-testnet.0",
|
|
84
|
+
"@aztec/validator-client": "0.83.1-alpha-testnet.0",
|
|
85
|
+
"@aztec/world-state": "0.83.1-alpha-testnet.0",
|
|
85
86
|
"koa": "^2.14.2",
|
|
86
87
|
"koa-router": "^12.0.0",
|
|
87
|
-
"tslib": "^2.4.0"
|
|
88
|
+
"tslib": "^2.4.0",
|
|
89
|
+
"viem": "2.23.7"
|
|
88
90
|
},
|
|
89
91
|
"devDependencies": {
|
|
90
92
|
"@jest/globals": "^29.5.0",
|
package/src/aztec-node/config.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { type ArchiverConfig, archiverConfigMappings } from '@aztec/archiver/config';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
type GenesisStateConfig,
|
|
4
|
+
type L1ContractAddresses,
|
|
5
|
+
genesisStateConfigMappings,
|
|
6
|
+
l1ContractAddressesMapping,
|
|
7
|
+
} from '@aztec/ethereum';
|
|
3
8
|
import { type ConfigMappingsType, booleanConfigHelper, getConfigFromMappings } from '@aztec/foundation/config';
|
|
4
9
|
import { type DataStoreConfig, dataConfigMappings } from '@aztec/kv-store/config';
|
|
5
10
|
import { type SharedNodeConfig, sharedNodeConfigMappings } from '@aztec/node-lib/config';
|
|
6
11
|
import { type P2PConfig, p2pConfigMappings } from '@aztec/p2p/config';
|
|
7
|
-
import { type
|
|
12
|
+
import { type ProverClientUserConfig, proverClientConfigMappings } from '@aztec/prover-client/config';
|
|
8
13
|
import { type SequencerClientConfig, sequencerClientConfigMappings } from '@aztec/sequencer-client/config';
|
|
9
14
|
import { type ValidatorClientConfig, validatorClientConfigMappings } from '@aztec/validator-client/config';
|
|
10
15
|
import { type WorldStateConfig, worldStateConfigMappings } from '@aztec/world-state/config';
|
|
@@ -23,13 +28,14 @@ export { sequencerClientConfigMappings, type SequencerClientConfig };
|
|
|
23
28
|
export type AztecNodeConfig = ArchiverConfig &
|
|
24
29
|
SequencerClientConfig &
|
|
25
30
|
ValidatorClientConfig &
|
|
26
|
-
|
|
31
|
+
ProverClientUserConfig &
|
|
27
32
|
WorldStateConfig &
|
|
28
|
-
Pick<
|
|
33
|
+
Pick<ProverClientUserConfig, 'bbBinaryPath' | 'bbWorkingDirectory' | 'realProofs'> &
|
|
29
34
|
P2PConfig &
|
|
30
35
|
DataStoreConfig &
|
|
31
36
|
SentinelConfig &
|
|
32
|
-
SharedNodeConfig &
|
|
37
|
+
SharedNodeConfig &
|
|
38
|
+
GenesisStateConfig & {
|
|
33
39
|
/** L1 contracts addresses */
|
|
34
40
|
l1Contracts: L1ContractAddresses;
|
|
35
41
|
/** Whether the validator is disabled for this node */
|
|
@@ -46,6 +52,7 @@ export const aztecNodeConfigMappings: ConfigMappingsType<AztecNodeConfig> = {
|
|
|
46
52
|
...p2pConfigMappings,
|
|
47
53
|
...sentinelConfigMappings,
|
|
48
54
|
...sharedNodeConfigMappings,
|
|
55
|
+
...genesisStateConfigMappings,
|
|
49
56
|
l1Contracts: {
|
|
50
57
|
description: 'The deployed L1 contract addresses',
|
|
51
58
|
nested: l1ContractAddressesMapping,
|
package/src/aztec-node/server.ts
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
type PUBLIC_DATA_TREE_HEIGHT,
|
|
11
11
|
} from '@aztec/constants';
|
|
12
12
|
import { EpochCache } from '@aztec/epoch-cache';
|
|
13
|
-
import { type L1ContractAddresses, createEthereumChain } from '@aztec/ethereum';
|
|
13
|
+
import { type L1ContractAddresses, RegistryContract, createEthereumChain } from '@aztec/ethereum';
|
|
14
14
|
import { compactArray } from '@aztec/foundation/collection';
|
|
15
15
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
16
16
|
import { Fr } from '@aztec/foundation/fields';
|
|
@@ -20,6 +20,7 @@ import { DateProvider, Timer } from '@aztec/foundation/timer';
|
|
|
20
20
|
import { SiblingPath } from '@aztec/foundation/trees';
|
|
21
21
|
import type { AztecKVStore } from '@aztec/kv-store';
|
|
22
22
|
import { openTmpStore } from '@aztec/kv-store/lmdb';
|
|
23
|
+
import { RollupAbi } from '@aztec/l1-artifacts';
|
|
23
24
|
import { SHA256Trunc, StandardTree, UnbalancedTree } from '@aztec/merkle-tree';
|
|
24
25
|
import { trySnapshotSync, uploadSnapshot } from '@aztec/node-lib/actions';
|
|
25
26
|
import { type P2P, createP2PClient } from '@aztec/p2p';
|
|
@@ -87,6 +88,8 @@ import {
|
|
|
87
88
|
import { createValidatorClient } from '@aztec/validator-client';
|
|
88
89
|
import { createWorldStateSynchronizer } from '@aztec/world-state';
|
|
89
90
|
|
|
91
|
+
import { createPublicClient, fallback, getContract, http } from 'viem';
|
|
92
|
+
|
|
90
93
|
import { createSentinel } from '../sentinel/factory.js';
|
|
91
94
|
import { Sentinel } from '../sentinel/sentinel.js';
|
|
92
95
|
import { type AztecNodeConfig, getPackageVersion } from './config.js';
|
|
@@ -173,6 +176,37 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
173
176
|
);
|
|
174
177
|
}
|
|
175
178
|
|
|
179
|
+
const publicClient = createPublicClient({
|
|
180
|
+
chain: ethereumChain.chainInfo,
|
|
181
|
+
transport: fallback(config.l1RpcUrls.map(url => http(url))),
|
|
182
|
+
pollingInterval: config.viemPollingIntervalMS,
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
const l1ContractsAddresses = await RegistryContract.collectAddresses(
|
|
186
|
+
publicClient,
|
|
187
|
+
config.l1Contracts.registryAddress,
|
|
188
|
+
config.rollupVersion ?? 'canonical',
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
// Overwrite the passed in vars.
|
|
192
|
+
config.l1Contracts = { ...config.l1Contracts, ...l1ContractsAddresses };
|
|
193
|
+
|
|
194
|
+
const rollup = getContract({
|
|
195
|
+
address: l1ContractsAddresses.rollupAddress.toString(),
|
|
196
|
+
abi: RollupAbi,
|
|
197
|
+
client: publicClient,
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
const rollupVersionFromRollup = Number(await rollup.read.getVersion());
|
|
201
|
+
|
|
202
|
+
config.rollupVersion ??= rollupVersionFromRollup;
|
|
203
|
+
|
|
204
|
+
if (config.rollupVersion !== rollupVersionFromRollup) {
|
|
205
|
+
log.warn(
|
|
206
|
+
`Registry looked up and returned a rollup with version (${config.rollupVersion}), but this does not match with version detected from the rollup directly: (${rollupVersionFromRollup}).`,
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
|
|
176
210
|
// attempt snapshot sync if possible
|
|
177
211
|
await trySnapshotSync(config, log);
|
|
178
212
|
|
|
@@ -242,7 +276,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
242
276
|
sequencer,
|
|
243
277
|
validatorsSentinel,
|
|
244
278
|
ethereumChain.chainInfo.id,
|
|
245
|
-
config.
|
|
279
|
+
config.rollupVersion,
|
|
246
280
|
new GlobalVariableBuilder(config),
|
|
247
281
|
proofVerifier,
|
|
248
282
|
telemetry,
|
|
@@ -291,20 +325,19 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
291
325
|
}
|
|
292
326
|
|
|
293
327
|
public async getNodeInfo(): Promise<NodeInfo> {
|
|
294
|
-
const [nodeVersion,
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
]);
|
|
328
|
+
const [nodeVersion, rollupVersion, chainId, enr, contractAddresses, protocolContractAddresses] = await Promise.all([
|
|
329
|
+
this.getNodeVersion(),
|
|
330
|
+
this.getVersion(),
|
|
331
|
+
this.getChainId(),
|
|
332
|
+
this.getEncodedEnr(),
|
|
333
|
+
this.getL1ContractAddresses(),
|
|
334
|
+
this.getProtocolContractAddresses(),
|
|
335
|
+
]);
|
|
303
336
|
|
|
304
337
|
const nodeInfo: NodeInfo = {
|
|
305
338
|
nodeVersion,
|
|
306
339
|
l1ChainId: chainId,
|
|
307
|
-
|
|
340
|
+
rollupVersion,
|
|
308
341
|
enr,
|
|
309
342
|
l1ContractAddresses: contractAddresses,
|
|
310
343
|
protocolContractAddresses: protocolContractAddresses,
|
|
@@ -875,7 +908,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
875
908
|
MerkleTreeId.PUBLIC_DATA_TREE,
|
|
876
909
|
lowLeafResult.index,
|
|
877
910
|
)) as PublicDataTreeLeafPreimage;
|
|
878
|
-
return preimage.value;
|
|
911
|
+
return preimage.leaf.value;
|
|
879
912
|
}
|
|
880
913
|
|
|
881
914
|
/**
|
|
@@ -955,6 +988,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
|
|
|
955
988
|
const validator = createValidatorForAcceptingTxs(db, this.contractDataSource, verifier, {
|
|
956
989
|
blockNumber,
|
|
957
990
|
l1ChainId: this.l1ChainId,
|
|
991
|
+
rollupVersion: this.version,
|
|
958
992
|
setupAllowList: this.config.allowedInSetup ?? (await getDefaultAllowedSetupFunctions()),
|
|
959
993
|
gasFees: await this.getCurrentBaseFees(),
|
|
960
994
|
skipFeeEnforcement,
|
package/src/sentinel/config.ts
CHANGED
|
@@ -14,6 +14,6 @@ export const sentinelConfigMappings: ConfigMappingsType<SentinelConfig> = {
|
|
|
14
14
|
sentinelEnabled: {
|
|
15
15
|
description: 'Whether the sentinel is enabled or not.',
|
|
16
16
|
env: 'SENTINEL_ENABLED',
|
|
17
|
-
...booleanConfigHelper(
|
|
17
|
+
...booleanConfigHelper(false),
|
|
18
18
|
},
|
|
19
19
|
};
|