@aztec/archiver 3.0.0-nightly.20250905 → 4.0.0-nightly.20250907
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/archiver/config.d.ts +0 -4
- package/dest/archiver/config.d.ts.map +1 -1
- package/dest/archiver/config.js +0 -9
- package/dest/factory.d.ts +0 -6
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +1 -14
- package/package.json +13 -13
- package/src/archiver/config.ts +0 -16
- package/src/factory.ts +1 -20
|
@@ -12,10 +12,6 @@ import { type ChainConfig } from '@aztec/stdlib/config';
|
|
|
12
12
|
* The archiver configuration.
|
|
13
13
|
*/
|
|
14
14
|
export type ArchiverConfig = {
|
|
15
|
-
/** URL for an archiver service. If set, will return an archiver client as opposed to starting a new one. */
|
|
16
|
-
archiverUrl?: string;
|
|
17
|
-
/** List of URLS for L1 consensus clients */
|
|
18
|
-
l1ConsensusHostUrls?: string[];
|
|
19
15
|
/** The polling interval in ms for retrieving new L2 blocks and encrypted logs. */
|
|
20
16
|
archiverPollingIntervalMS?: number;
|
|
21
17
|
/** The number of L2 blocks the archiver will attempt to download at a time. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/archiver/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,yBAAyB,CAAC;AACrF,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAIpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,kBAAkB,EAA6C,MAAM,0BAA0B,CAAC;AAC9G,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,sBAAsB,CAAC;AAE7E;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/archiver/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,yBAAyB,CAAC;AACrF,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAIpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,kBAAkB,EAA6C,MAAM,0BAA0B,CAAC;AAC9G,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,sBAAsB,CAAC;AAE7E;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,kFAAkF;IAClF,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,2CAA2C;IAC3C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,yCAAyC;IACzC,WAAW,EAAE,mBAAmB,CAAC;IAEjC,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,qGAAqG;IACrG,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,GAAG,cAAc,GAChB,iBAAiB,GACjB,cAAc,GACd,WAAW,CAAC;AAEd,eAAO,MAAM,sBAAsB,EAAE,kBAAkB,CAAC,cAAc,CAkCrE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,cAAc,CAEzD"}
|
package/dest/archiver/config.js
CHANGED
|
@@ -4,15 +4,6 @@ import { getConfigFromMappings, numberConfigHelper } from '@aztec/foundation/con
|
|
|
4
4
|
import { chainConfigMappings } from '@aztec/stdlib/config';
|
|
5
5
|
export const archiverConfigMappings = {
|
|
6
6
|
...blobSinkConfigMapping,
|
|
7
|
-
archiverUrl: {
|
|
8
|
-
env: 'ARCHIVER_URL',
|
|
9
|
-
description: 'URL for an archiver service. If set, will return an archiver client as opposed to starting a new one.'
|
|
10
|
-
},
|
|
11
|
-
l1ConsensusHostUrls: {
|
|
12
|
-
env: 'L1_CONSENSUS_HOST_URLS',
|
|
13
|
-
description: 'List of URLS for L1 consensus clients.',
|
|
14
|
-
parseEnv: (val)=>val.split(',').map((url)=>url.trim().replace(/\/$/, ''))
|
|
15
|
-
},
|
|
16
7
|
archiverPollingIntervalMS: {
|
|
17
8
|
env: 'ARCHIVER_POLLING_INTERVAL_MS',
|
|
18
9
|
description: 'The polling interval in ms for retrieving new L2 blocks and encrypted logs.',
|
package/dest/factory.d.ts
CHANGED
|
@@ -18,10 +18,4 @@ export declare function createArchiverStore(userConfig: Pick<ArchiverConfig, 'ar
|
|
|
18
18
|
export declare function createArchiver(config: ArchiverConfig & DataStoreConfig, deps: ArchiverDeps, opts?: {
|
|
19
19
|
blockUntilSync: boolean;
|
|
20
20
|
}): Promise<ArchiverApi & Service & L2BlockSourceEventEmitter>;
|
|
21
|
-
/**
|
|
22
|
-
* Creates a remote archiver client.
|
|
23
|
-
* @param config - The archiver configuration.
|
|
24
|
-
* @returns The remote archiver client.
|
|
25
|
-
*/
|
|
26
|
-
export declare function createRemoteArchiver(config: ArchiverConfig): ArchiverApi;
|
|
27
21
|
//# sourceMappingURL=factory.d.ts.map
|
package/dest/factory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAK9D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAE5E,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAuB,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAE7G,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAE9C,iCAAiC;AACjC,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE,wBAAwB,GAAG,SAAS,CAAC,GAAG,eAAe,gCAQzF;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,cAAc,GAAG,eAAe,EACxC,IAAI,EAAE,YAAY,EAClB,IAAI,GAAE;IAAE,cAAc,EAAE,OAAO,CAAA;CAA6B,GAC3D,OAAO,CAAC,WAAW,GAAG,OAAO,GAAG,yBAAyB,CAAC,CAI5D"}
|
package/dest/factory.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
2
|
import { createStore } from '@aztec/kv-store/lmdb-v2';
|
|
3
|
-
import {
|
|
4
|
-
import { protocolContractNames, protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
3
|
+
import { protocolContractNames } from '@aztec/protocol-contracts';
|
|
5
4
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
6
5
|
import { FunctionType, decodeFunctionSignature } from '@aztec/stdlib/abi';
|
|
7
6
|
import { computePublicBytecodeCommitment } from '@aztec/stdlib/contract';
|
|
8
|
-
import { getComponentsVersionsFromConfig } from '@aztec/stdlib/versioning';
|
|
9
7
|
import { Archiver } from './archiver/archiver.js';
|
|
10
8
|
import { ARCHIVER_DB_VERSION, KVArchiverDataStore } from './archiver/kv_archiver_store/kv_archiver_store.js';
|
|
11
|
-
import { createArchiverClient } from './rpc/index.js';
|
|
12
9
|
export const ARCHIVER_STORE_NAME = 'archiver';
|
|
13
10
|
/** Creates an archiver store. */ export async function createArchiverStore(userConfig) {
|
|
14
11
|
const config = {
|
|
@@ -32,16 +29,6 @@ export const ARCHIVER_STORE_NAME = 'archiver';
|
|
|
32
29
|
await registerProtocolContracts(archiverStore);
|
|
33
30
|
return Archiver.createAndSync(config, archiverStore, deps, opts.blockUntilSync);
|
|
34
31
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Creates a remote archiver client.
|
|
37
|
-
* @param config - The archiver configuration.
|
|
38
|
-
* @returns The remote archiver client.
|
|
39
|
-
*/ export function createRemoteArchiver(config) {
|
|
40
|
-
if (!config.archiverUrl) {
|
|
41
|
-
throw new Error('Archiver URL is required');
|
|
42
|
-
}
|
|
43
|
-
return createArchiverClient(config.archiverUrl, getComponentsVersionsFromConfig(config, protocolContractTreeRoot, getVKTreeRoot()));
|
|
44
|
-
}
|
|
45
32
|
async function registerProtocolContracts(store) {
|
|
46
33
|
const blockNumber = 0;
|
|
47
34
|
for (const name of protocolContractNames){
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/archiver",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-nightly.20250907",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -66,18 +66,18 @@
|
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@aztec/blob-lib": "
|
|
70
|
-
"@aztec/blob-sink": "
|
|
71
|
-
"@aztec/constants": "
|
|
72
|
-
"@aztec/epoch-cache": "
|
|
73
|
-
"@aztec/ethereum": "
|
|
74
|
-
"@aztec/foundation": "
|
|
75
|
-
"@aztec/kv-store": "
|
|
76
|
-
"@aztec/l1-artifacts": "
|
|
77
|
-
"@aztec/noir-protocol-circuits-types": "
|
|
78
|
-
"@aztec/protocol-contracts": "
|
|
79
|
-
"@aztec/stdlib": "
|
|
80
|
-
"@aztec/telemetry-client": "
|
|
69
|
+
"@aztec/blob-lib": "4.0.0-nightly.20250907",
|
|
70
|
+
"@aztec/blob-sink": "4.0.0-nightly.20250907",
|
|
71
|
+
"@aztec/constants": "4.0.0-nightly.20250907",
|
|
72
|
+
"@aztec/epoch-cache": "4.0.0-nightly.20250907",
|
|
73
|
+
"@aztec/ethereum": "4.0.0-nightly.20250907",
|
|
74
|
+
"@aztec/foundation": "4.0.0-nightly.20250907",
|
|
75
|
+
"@aztec/kv-store": "4.0.0-nightly.20250907",
|
|
76
|
+
"@aztec/l1-artifacts": "4.0.0-nightly.20250907",
|
|
77
|
+
"@aztec/noir-protocol-circuits-types": "4.0.0-nightly.20250907",
|
|
78
|
+
"@aztec/protocol-contracts": "4.0.0-nightly.20250907",
|
|
79
|
+
"@aztec/stdlib": "4.0.0-nightly.20250907",
|
|
80
|
+
"@aztec/telemetry-client": "4.0.0-nightly.20250907",
|
|
81
81
|
"lodash.groupby": "^4.6.0",
|
|
82
82
|
"lodash.omit": "^4.5.0",
|
|
83
83
|
"tsc-watch": "^6.0.0",
|
package/src/archiver/config.ts
CHANGED
|
@@ -21,12 +21,6 @@ import { type ChainConfig, chainConfigMappings } from '@aztec/stdlib/config';
|
|
|
21
21
|
* The archiver configuration.
|
|
22
22
|
*/
|
|
23
23
|
export type ArchiverConfig = {
|
|
24
|
-
/** URL for an archiver service. If set, will return an archiver client as opposed to starting a new one. */
|
|
25
|
-
archiverUrl?: string;
|
|
26
|
-
|
|
27
|
-
/** List of URLS for L1 consensus clients */
|
|
28
|
-
l1ConsensusHostUrls?: string[];
|
|
29
|
-
|
|
30
24
|
/** The polling interval in ms for retrieving new L2 blocks and encrypted logs. */
|
|
31
25
|
archiverPollingIntervalMS?: number;
|
|
32
26
|
|
|
@@ -51,16 +45,6 @@ export type ArchiverConfig = {
|
|
|
51
45
|
|
|
52
46
|
export const archiverConfigMappings: ConfigMappingsType<ArchiverConfig> = {
|
|
53
47
|
...blobSinkConfigMapping,
|
|
54
|
-
archiverUrl: {
|
|
55
|
-
env: 'ARCHIVER_URL',
|
|
56
|
-
description:
|
|
57
|
-
'URL for an archiver service. If set, will return an archiver client as opposed to starting a new one.',
|
|
58
|
-
},
|
|
59
|
-
l1ConsensusHostUrls: {
|
|
60
|
-
env: 'L1_CONSENSUS_HOST_URLS',
|
|
61
|
-
description: 'List of URLS for L1 consensus clients.',
|
|
62
|
-
parseEnv: (val: string) => val.split(',').map(url => url.trim().replace(/\/$/, '')),
|
|
63
|
-
},
|
|
64
48
|
archiverPollingIntervalMS: {
|
|
65
49
|
env: 'ARCHIVER_POLLING_INTERVAL_MS',
|
|
66
50
|
description: 'The polling interval in ms for retrieving new L2 blocks and encrypted logs.',
|
package/src/factory.ts
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
2
|
import type { DataStoreConfig } from '@aztec/kv-store/config';
|
|
3
3
|
import { createStore } from '@aztec/kv-store/lmdb-v2';
|
|
4
|
-
import {
|
|
5
|
-
import { protocolContractNames, protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
4
|
+
import { protocolContractNames } from '@aztec/protocol-contracts';
|
|
6
5
|
import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle';
|
|
7
6
|
import { FunctionType, decodeFunctionSignature } from '@aztec/stdlib/abi';
|
|
8
7
|
import type { L2BlockSourceEventEmitter } from '@aztec/stdlib/block';
|
|
9
8
|
import { type ContractClassPublic, computePublicBytecodeCommitment } from '@aztec/stdlib/contract';
|
|
10
9
|
import type { ArchiverApi, Service } from '@aztec/stdlib/interfaces/server';
|
|
11
|
-
import { getComponentsVersionsFromConfig } from '@aztec/stdlib/versioning';
|
|
12
10
|
|
|
13
11
|
import { Archiver, type ArchiverDeps } from './archiver/archiver.js';
|
|
14
12
|
import type { ArchiverConfig } from './archiver/config.js';
|
|
15
13
|
import { ARCHIVER_DB_VERSION, KVArchiverDataStore } from './archiver/kv_archiver_store/kv_archiver_store.js';
|
|
16
|
-
import { createArchiverClient } from './rpc/index.js';
|
|
17
14
|
|
|
18
15
|
export const ARCHIVER_STORE_NAME = 'archiver';
|
|
19
16
|
|
|
@@ -47,22 +44,6 @@ export async function createArchiver(
|
|
|
47
44
|
return Archiver.createAndSync(config, archiverStore, deps, opts.blockUntilSync);
|
|
48
45
|
}
|
|
49
46
|
|
|
50
|
-
/**
|
|
51
|
-
* Creates a remote archiver client.
|
|
52
|
-
* @param config - The archiver configuration.
|
|
53
|
-
* @returns The remote archiver client.
|
|
54
|
-
*/
|
|
55
|
-
export function createRemoteArchiver(config: ArchiverConfig): ArchiverApi {
|
|
56
|
-
if (!config.archiverUrl) {
|
|
57
|
-
throw new Error('Archiver URL is required');
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return createArchiverClient(
|
|
61
|
-
config.archiverUrl,
|
|
62
|
-
getComponentsVersionsFromConfig(config, protocolContractTreeRoot, getVKTreeRoot()),
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
47
|
async function registerProtocolContracts(store: KVArchiverDataStore) {
|
|
67
48
|
const blockNumber = 0;
|
|
68
49
|
for (const name of protocolContractNames) {
|