@aztec/archiver 0.32.0 → 0.32.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/archiver/archiver.d.ts +9 -9
- package/dest/archiver/archiver.d.ts.map +1 -1
- package/dest/archiver/archiver.js +1 -1
- package/dest/archiver/archiver_store.d.ts +5 -5
- package/dest/archiver/archiver_store.d.ts.map +1 -1
- package/dest/archiver/archiver_store_test_suite.d.ts +1 -1
- package/dest/archiver/archiver_store_test_suite.d.ts.map +1 -1
- package/dest/archiver/archiver_store_test_suite.js +2 -2
- package/dest/archiver/config.d.ts +1 -1
- package/dest/archiver/config.d.ts.map +1 -1
- package/dest/archiver/data_retrieval.d.ts +4 -4
- package/dest/archiver/data_retrieval.d.ts.map +1 -1
- package/dest/archiver/eth_log_handlers.d.ts +2 -2
- package/dest/archiver/eth_log_handlers.d.ts.map +1 -1
- package/dest/archiver/eth_log_handlers.js +1 -1
- package/dest/archiver/kv_archiver_store/block_body_store.d.ts +1 -1
- package/dest/archiver/kv_archiver_store/block_body_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/block_store.d.ts +5 -5
- package/dest/archiver/kv_archiver_store/block_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/block_store.js +1 -1
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts +2 -2
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts +3 -3
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/contract_instance_store.js +1 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +7 -7
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/log_store.d.ts +3 -3
- package/dest/archiver/kv_archiver_store/log_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/message_store.d.ts +3 -3
- package/dest/archiver/kv_archiver_store/message_store.d.ts.map +1 -1
- package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.d.ts +2 -2
- package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.d.ts.map +1 -1
- package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts +5 -5
- package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts.map +1 -1
- package/dest/rpc/archiver_client.d.ts +1 -1
- package/dest/rpc/archiver_client.d.ts.map +1 -1
- package/dest/rpc/archiver_server.d.ts +1 -1
- package/dest/rpc/archiver_server.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/archiver/archiver.ts +26 -26
- package/src/archiver/archiver_store.ts +20 -20
- package/src/archiver/archiver_store_test_suite.ts +7 -3
- package/src/archiver/config.ts +1 -1
- package/src/archiver/data_retrieval.ts +4 -4
- package/src/archiver/eth_log_handlers.ts +2 -2
- package/src/archiver/kv_archiver_store/block_body_store.ts +1 -1
- package/src/archiver/kv_archiver_store/block_store.ts +5 -5
- package/src/archiver/kv_archiver_store/contract_class_store.ts +4 -4
- package/src/archiver/kv_archiver_store/contract_instance_store.ts +3 -3
- package/src/archiver/kv_archiver_store/kv_archiver_store.ts +22 -22
- package/src/archiver/kv_archiver_store/log_store.ts +7 -7
- package/src/archiver/kv_archiver_store/message_store.ts +3 -3
- package/src/archiver/memory_archiver_store/l1_to_l2_message_store.ts +2 -2
- package/src/archiver/memory_archiver_store/memory_archiver_store.ts +18 -18
- package/src/rpc/archiver_client.ts +1 -1
- package/src/rpc/archiver_server.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { InboxLeaf } from '@aztec/circuit-types';
|
|
1
|
+
import { type InboxLeaf } from '@aztec/circuit-types';
|
|
2
2
|
import { Fr } from '@aztec/circuits.js';
|
|
3
|
-
import { AztecKVStore } from '@aztec/kv-store';
|
|
4
|
-
import { DataRetrieval } from '../data_retrieval.js';
|
|
3
|
+
import { type AztecKVStore } from '@aztec/kv-store';
|
|
4
|
+
import { type DataRetrieval } from '../data_retrieval.js';
|
|
5
5
|
/**
|
|
6
6
|
* LMDB implementation of the ArchiverDataStore interface.
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_store.d.ts","sourceRoot":"","sources":["../../../src/archiver/kv_archiver_store/message_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"message_store.d.ts","sourceRoot":"","sources":["../../../src/archiver/kv_archiver_store/message_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,EAAE,EAIH,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,KAAK,YAAY,EAAsC,MAAM,iBAAiB,CAAC;AAExF,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;GAEG;AACH,qBAAa,YAAY;;IASX,OAAO,CAAC,EAAE;gBAAF,EAAE,EAAE,YAAY;IAMpC;;;OAGG;IACH,uBAAuB,IAAI,MAAM;IAIjC;;;;OAIG;IACH,iBAAiB,CAAC,QAAQ,EAAE,aAAa,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IA6BvE;;;;;OAKG;IACH,qBAAqB,CAAC,aAAa,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAMzF,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,EAAE,EAAE;CAoB7C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InboxLeaf } from '@aztec/circuit-types';
|
|
2
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
1
|
+
import { type InboxLeaf } from '@aztec/circuit-types';
|
|
2
|
+
import { type Fr } from '@aztec/foundation/fields';
|
|
3
3
|
/**
|
|
4
4
|
* A simple in-memory implementation of an L1 to L2 message store.
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"l1_to_l2_message_store.d.ts","sourceRoot":"","sources":["../../../src/archiver/memory_archiver_store/l1_to_l2_message_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"l1_to_l2_message_store.d.ts","sourceRoot":"","sources":["../../../src/archiver/memory_archiver_store/l1_to_l2_message_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAMtD,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD;;GAEG;AACH,qBAAa,kBAAkB;;IAC7B;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAa;;IAM7C,UAAU,CAAC,OAAO,EAAE,SAAS;IAQ7B,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,EAAE,EAAE;IAqBtC;;;;;OAKG;IACH,eAAe,CAAC,aAAa,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAe3E"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
import { Body, EncryptedL2BlockL2Logs, FromLogType, GetUnencryptedLogsResponse, InboxLeaf, L2Block, L2BlockL2Logs, LogFilter, LogType, TxEffect, TxHash, TxReceipt, UnencryptedL2BlockL2Logs } from '@aztec/circuit-types';
|
|
2
|
+
import { type Body, type EncryptedL2BlockL2Logs, type FromLogType, type GetUnencryptedLogsResponse, type InboxLeaf, type L2Block, type L2BlockL2Logs, type LogFilter, LogType, type TxEffect, type TxHash, TxReceipt, type UnencryptedL2BlockL2Logs } from '@aztec/circuit-types';
|
|
3
3
|
import { Fr } from '@aztec/circuits.js';
|
|
4
|
-
import { AztecAddress } from '@aztec/foundation/aztec-address';
|
|
5
|
-
import { ContractClassPublic, ContractInstanceWithAddress, ExecutablePrivateFunctionWithMembershipProof, UnconstrainedFunctionWithMembershipProof } from '@aztec/types/contracts';
|
|
6
|
-
import { ArchiverDataStore, ArchiverL1SynchPoint } from '../archiver_store.js';
|
|
7
|
-
import { DataRetrieval } from '../data_retrieval.js';
|
|
4
|
+
import { type AztecAddress } from '@aztec/foundation/aztec-address';
|
|
5
|
+
import { type ContractClassPublic, type ContractInstanceWithAddress, type ExecutablePrivateFunctionWithMembershipProof, type UnconstrainedFunctionWithMembershipProof } from '@aztec/types/contracts';
|
|
6
|
+
import { type ArchiverDataStore, type ArchiverL1SynchPoint } from '../archiver_store.js';
|
|
7
|
+
import { type DataRetrieval } from '../data_retrieval.js';
|
|
8
8
|
/**
|
|
9
9
|
* Simple, in-memory implementation of an archiver data store.
|
|
10
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory_archiver_store.d.ts","sourceRoot":"","sources":["../../../src/archiver/memory_archiver_store/memory_archiver_store.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,IAAI,
|
|
1
|
+
{"version":3,"file":"memory_archiver_store.d.ts","sourceRoot":"","sources":["../../../src/archiver/memory_archiver_store/memory_archiver_store.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,sBAAsB,EAE3B,KAAK,WAAW,EAChB,KAAK,0BAA0B,EAC/B,KAAK,SAAS,EACd,KAAK,OAAO,EAEZ,KAAK,aAAa,EAClB,KAAK,SAAS,EAEd,OAAO,EACP,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,SAAS,EAET,KAAK,wBAAwB,EAC9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,EAAE,EAAwB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EACL,KAAK,m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IACH,OAAO,CAAC,QAAQ,SAAS,OAAO,EAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,QAAQ,GAChB,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;IAelD;;;;;OAKG;IACH,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,0BAA0B,CAAC;IA8E1E;;;OAGG;IACI,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC;IAO1C,aAAa,IAAI,OAAO,CAAC,oBAAoB,CAAC;CAMtD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ArchiveSource } from '../archiver/archiver.js';
|
|
1
|
+
import { type ArchiveSource } from '../archiver/archiver.js';
|
|
2
2
|
export declare const createArchiverClient: (url: string, fetch?: (host: string, rpcMethod: string, body: any, useApiEndpoints: boolean) => Promise<any>) => ArchiveSource;
|
|
3
3
|
//# sourceMappingURL=archiver_client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archiver_client.d.ts","sourceRoot":"","sources":["../../src/rpc/archiver_client.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"archiver_client.d.ts","sourceRoot":"","sources":["../../src/rpc/archiver_client.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,eAAO,MAAM,oBAAoB,QAAS,MAAM,qGAAuC,aAenE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonRpcServer } from '@aztec/foundation/json-rpc/server';
|
|
2
|
-
import { Archiver } from '../archiver/archiver.js';
|
|
2
|
+
import { type Archiver } from '../archiver/archiver.js';
|
|
3
3
|
/**
|
|
4
4
|
* Wrap an Archiver instance with a JSON RPC HTTP server.
|
|
5
5
|
* @param archiverService - The Archiver instance
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archiver_server.d.ts","sourceRoot":"","sources":["../../src/rpc/archiver_server.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"archiver_server.d.ts","sourceRoot":"","sources":["../../src/rpc/archiver_server.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,eAAe,EAAE,QAAQ,GAAG,aAAa,CAehF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/archiver",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"typedocOptions": {
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"workerThreads": true
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@aztec/circuit-types": "0.32.
|
|
39
|
-
"@aztec/circuits.js": "0.32.
|
|
40
|
-
"@aztec/ethereum": "0.32.
|
|
41
|
-
"@aztec/foundation": "0.32.
|
|
42
|
-
"@aztec/kv-store": "0.32.
|
|
43
|
-
"@aztec/l1-artifacts": "0.32.
|
|
44
|
-
"@aztec/protocol-contracts": "0.32.
|
|
45
|
-
"@aztec/types": "0.32.
|
|
38
|
+
"@aztec/circuit-types": "0.32.1",
|
|
39
|
+
"@aztec/circuits.js": "0.32.1",
|
|
40
|
+
"@aztec/ethereum": "0.32.1",
|
|
41
|
+
"@aztec/foundation": "0.32.1",
|
|
42
|
+
"@aztec/kv-store": "0.32.1",
|
|
43
|
+
"@aztec/l1-artifacts": "0.32.1",
|
|
44
|
+
"@aztec/protocol-contracts": "0.32.1",
|
|
45
|
+
"@aztec/types": "0.32.1",
|
|
46
46
|
"debug": "^4.3.4",
|
|
47
47
|
"lmdb": "^2.9.2",
|
|
48
48
|
"lodash.groupby": "^4.6.0",
|
package/src/archiver/archiver.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
-
FromLogType,
|
|
3
|
-
GetUnencryptedLogsResponse,
|
|
4
|
-
L1ToL2MessageSource,
|
|
2
|
+
type FromLogType,
|
|
3
|
+
type GetUnencryptedLogsResponse,
|
|
4
|
+
type L1ToL2MessageSource,
|
|
5
5
|
L2Block,
|
|
6
|
-
L2BlockL2Logs,
|
|
7
|
-
L2BlockSource,
|
|
8
|
-
L2LogsSource,
|
|
9
|
-
LogFilter,
|
|
10
|
-
LogType,
|
|
11
|
-
TxEffect,
|
|
12
|
-
TxHash,
|
|
13
|
-
TxReceipt,
|
|
14
|
-
UnencryptedL2Log,
|
|
6
|
+
type L2BlockL2Logs,
|
|
7
|
+
type L2BlockSource,
|
|
8
|
+
type L2LogsSource,
|
|
9
|
+
type LogFilter,
|
|
10
|
+
type LogType,
|
|
11
|
+
type TxEffect,
|
|
12
|
+
type TxHash,
|
|
13
|
+
type TxReceipt,
|
|
14
|
+
type UnencryptedL2Log,
|
|
15
15
|
} from '@aztec/circuit-types';
|
|
16
|
-
import { ContractClassRegisteredEvent, FunctionSelector } from '@aztec/circuits.js';
|
|
16
|
+
import { ContractClassRegisteredEvent, type FunctionSelector } from '@aztec/circuits.js';
|
|
17
17
|
import {
|
|
18
18
|
ContractInstanceDeployedEvent,
|
|
19
19
|
PrivateFunctionBroadcastedEvent,
|
|
@@ -22,28 +22,28 @@ import {
|
|
|
22
22
|
isValidUnconstrainedFunctionMembershipProof,
|
|
23
23
|
} from '@aztec/circuits.js/contract';
|
|
24
24
|
import { createEthereumChain } from '@aztec/ethereum';
|
|
25
|
-
import { AztecAddress } from '@aztec/foundation/aztec-address';
|
|
26
|
-
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
25
|
+
import { type AztecAddress } from '@aztec/foundation/aztec-address';
|
|
26
|
+
import { type EthAddress } from '@aztec/foundation/eth-address';
|
|
27
27
|
import { Fr } from '@aztec/foundation/fields';
|
|
28
|
-
import { DebugLogger, createDebugLogger } from '@aztec/foundation/log';
|
|
28
|
+
import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log';
|
|
29
29
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
30
30
|
import { getCanonicalClassRegistererAddress } from '@aztec/protocol-contracts/class-registerer';
|
|
31
31
|
import {
|
|
32
|
-
ContractClassPublic,
|
|
33
|
-
ContractDataSource,
|
|
34
|
-
ContractInstanceWithAddress,
|
|
35
|
-
ExecutablePrivateFunctionWithMembershipProof,
|
|
36
|
-
PublicFunction,
|
|
37
|
-
UnconstrainedFunctionWithMembershipProof,
|
|
32
|
+
type ContractClassPublic,
|
|
33
|
+
type ContractDataSource,
|
|
34
|
+
type ContractInstanceWithAddress,
|
|
35
|
+
type ExecutablePrivateFunctionWithMembershipProof,
|
|
36
|
+
type PublicFunction,
|
|
37
|
+
type UnconstrainedFunctionWithMembershipProof,
|
|
38
38
|
} from '@aztec/types/contracts';
|
|
39
39
|
|
|
40
40
|
import groupBy from 'lodash.groupby';
|
|
41
|
-
import { Chain, HttpTransport, PublicClient, createPublicClient, http } from 'viem';
|
|
41
|
+
import { type Chain, type HttpTransport, type PublicClient, createPublicClient, http } from 'viem';
|
|
42
42
|
|
|
43
|
-
import { ArchiverDataStore } from './archiver_store.js';
|
|
44
|
-
import { ArchiverConfig } from './config.js';
|
|
43
|
+
import { type ArchiverDataStore } from './archiver_store.js';
|
|
44
|
+
import { type ArchiverConfig } from './config.js';
|
|
45
45
|
import {
|
|
46
|
-
DataRetrieval,
|
|
46
|
+
type DataRetrieval,
|
|
47
47
|
retrieveBlockBodiesFromAvailabilityOracle,
|
|
48
48
|
retrieveBlockMetadataFromRollup,
|
|
49
49
|
retrieveL1ToL2Messages,
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Body,
|
|
3
|
-
EncryptedL2BlockL2Logs,
|
|
4
|
-
FromLogType,
|
|
5
|
-
GetUnencryptedLogsResponse,
|
|
6
|
-
InboxLeaf,
|
|
7
|
-
L2Block,
|
|
8
|
-
L2BlockL2Logs,
|
|
9
|
-
LogFilter,
|
|
10
|
-
LogType,
|
|
11
|
-
TxEffect,
|
|
12
|
-
TxHash,
|
|
13
|
-
TxReceipt,
|
|
14
|
-
UnencryptedL2BlockL2Logs,
|
|
2
|
+
type Body,
|
|
3
|
+
type EncryptedL2BlockL2Logs,
|
|
4
|
+
type FromLogType,
|
|
5
|
+
type GetUnencryptedLogsResponse,
|
|
6
|
+
type InboxLeaf,
|
|
7
|
+
type L2Block,
|
|
8
|
+
type L2BlockL2Logs,
|
|
9
|
+
type LogFilter,
|
|
10
|
+
type LogType,
|
|
11
|
+
type TxEffect,
|
|
12
|
+
type TxHash,
|
|
13
|
+
type TxReceipt,
|
|
14
|
+
type UnencryptedL2BlockL2Logs,
|
|
15
15
|
} from '@aztec/circuit-types';
|
|
16
|
-
import { Fr } from '@aztec/circuits.js';
|
|
17
|
-
import { AztecAddress } from '@aztec/foundation/aztec-address';
|
|
16
|
+
import { type Fr } from '@aztec/circuits.js';
|
|
17
|
+
import { type AztecAddress } from '@aztec/foundation/aztec-address';
|
|
18
18
|
import {
|
|
19
|
-
ContractClassPublic,
|
|
20
|
-
ContractInstanceWithAddress,
|
|
21
|
-
ExecutablePrivateFunctionWithMembershipProof,
|
|
22
|
-
UnconstrainedFunctionWithMembershipProof,
|
|
19
|
+
type ContractClassPublic,
|
|
20
|
+
type ContractInstanceWithAddress,
|
|
21
|
+
type ExecutablePrivateFunctionWithMembershipProof,
|
|
22
|
+
type UnconstrainedFunctionWithMembershipProof,
|
|
23
23
|
} from '@aztec/types/contracts';
|
|
24
24
|
|
|
25
|
-
import { DataRetrieval } from './data_retrieval.js';
|
|
25
|
+
import { type DataRetrieval } from './data_retrieval.js';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Represents the latest L1 block processed by the archiver for various objects in L2.
|
|
@@ -8,10 +8,14 @@ import {
|
|
|
8
8
|
} from '@aztec/circuits.js/testing';
|
|
9
9
|
import { times } from '@aztec/foundation/collection';
|
|
10
10
|
import { randomBytes, randomInt } from '@aztec/foundation/crypto';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
type ContractClassPublic,
|
|
13
|
+
type ContractInstanceWithAddress,
|
|
14
|
+
SerializableContractInstance,
|
|
15
|
+
} from '@aztec/types/contracts';
|
|
12
16
|
|
|
13
|
-
import { ArchiverDataStore } from './archiver_store.js';
|
|
14
|
-
import { DataRetrieval } from './data_retrieval.js';
|
|
17
|
+
import { type ArchiverDataStore } from './archiver_store.js';
|
|
18
|
+
import { type DataRetrieval } from './data_retrieval.js';
|
|
15
19
|
|
|
16
20
|
/**
|
|
17
21
|
* @param testName - The name of the test suite.
|
package/src/archiver/config.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Body, InboxLeaf } from '@aztec/circuit-types';
|
|
2
|
-
import { AppendOnlyTreeSnapshot, Header } from '@aztec/circuits.js';
|
|
3
|
-
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
1
|
+
import { type Body, type InboxLeaf } from '@aztec/circuit-types';
|
|
2
|
+
import { type AppendOnlyTreeSnapshot, type Header } from '@aztec/circuits.js';
|
|
3
|
+
import { type EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
|
|
5
|
-
import { PublicClient } from 'viem';
|
|
5
|
+
import { type PublicClient } from 'viem';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
getL2BlockProcessedLogs,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Body, InboxLeaf } from '@aztec/circuit-types';
|
|
2
2
|
import { AppendOnlyTreeSnapshot, Header } from '@aztec/circuits.js';
|
|
3
|
-
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
+
import { type EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import { Fr } from '@aztec/foundation/fields';
|
|
5
5
|
import { numToUInt32BE } from '@aztec/foundation/serialize';
|
|
6
6
|
import { AvailabilityOracleAbi, InboxAbi, RollupAbi } from '@aztec/l1-artifacts';
|
|
7
7
|
|
|
8
|
-
import { Hex, Log, PublicClient, decodeFunctionData, getAbiItem, getAddress, hexToBytes } from 'viem';
|
|
8
|
+
import { type Hex, type Log, type PublicClient, decodeFunctionData, getAbiItem, getAddress, hexToBytes } from 'viem';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Processes newly received MessageSent (L1 to L2) logs.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { L2Block, TxEffect, TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types';
|
|
2
|
-
import { AppendOnlyTreeSnapshot, AztecAddress, Header, INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js';
|
|
1
|
+
import { L2Block, type TxEffect, type TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types';
|
|
2
|
+
import { AppendOnlyTreeSnapshot, type AztecAddress, Header, INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js';
|
|
3
3
|
import { createDebugLogger } from '@aztec/foundation/log';
|
|
4
|
-
import { AztecKVStore, AztecMap, AztecSingleton, Range } from '@aztec/kv-store';
|
|
4
|
+
import { type AztecKVStore, type AztecMap, type AztecSingleton, type Range } from '@aztec/kv-store';
|
|
5
5
|
|
|
6
|
-
import { DataRetrieval } from '../data_retrieval.js';
|
|
7
|
-
import { BlockBodyStore } from './block_body_store.js';
|
|
6
|
+
import { type DataRetrieval } from '../data_retrieval.js';
|
|
7
|
+
import { type BlockBodyStore } from './block_body_store.js';
|
|
8
8
|
|
|
9
9
|
type BlockIndexValue = [blockNumber: number, index: number];
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Fr, FunctionSelector, Vector } from '@aztec/circuits.js';
|
|
2
2
|
import { BufferReader, numToUInt8, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
3
|
-
import { AztecKVStore, AztecMap } from '@aztec/kv-store';
|
|
3
|
+
import { type AztecKVStore, type AztecMap } from '@aztec/kv-store';
|
|
4
4
|
import {
|
|
5
|
-
ContractClassPublic,
|
|
6
|
-
ExecutablePrivateFunctionWithMembershipProof,
|
|
7
|
-
UnconstrainedFunctionWithMembershipProof,
|
|
5
|
+
type ContractClassPublic,
|
|
6
|
+
type ExecutablePrivateFunctionWithMembershipProof,
|
|
7
|
+
type UnconstrainedFunctionWithMembershipProof,
|
|
8
8
|
} from '@aztec/types/contracts';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AztecAddress } from '@aztec/circuits.js';
|
|
2
|
-
import { AztecKVStore, AztecMap } from '@aztec/kv-store';
|
|
3
|
-
import { ContractInstanceWithAddress, SerializableContractInstance } from '@aztec/types/contracts';
|
|
1
|
+
import { type AztecAddress } from '@aztec/circuits.js';
|
|
2
|
+
import { type AztecKVStore, type AztecMap } from '@aztec/kv-store';
|
|
3
|
+
import { type ContractInstanceWithAddress, SerializableContractInstance } from '@aztec/types/contracts';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* LMDB implementation of the ArchiverDataStore interface.
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Body,
|
|
3
|
-
EncryptedL2BlockL2Logs,
|
|
4
|
-
FromLogType,
|
|
5
|
-
GetUnencryptedLogsResponse,
|
|
6
|
-
InboxLeaf,
|
|
7
|
-
L2Block,
|
|
8
|
-
L2BlockL2Logs,
|
|
9
|
-
LogFilter,
|
|
10
|
-
LogType,
|
|
11
|
-
TxEffect,
|
|
12
|
-
TxHash,
|
|
13
|
-
TxReceipt,
|
|
14
|
-
UnencryptedL2BlockL2Logs,
|
|
2
|
+
type Body,
|
|
3
|
+
type EncryptedL2BlockL2Logs,
|
|
4
|
+
type FromLogType,
|
|
5
|
+
type GetUnencryptedLogsResponse,
|
|
6
|
+
type InboxLeaf,
|
|
7
|
+
type L2Block,
|
|
8
|
+
type L2BlockL2Logs,
|
|
9
|
+
type LogFilter,
|
|
10
|
+
type LogType,
|
|
11
|
+
type TxEffect,
|
|
12
|
+
type TxHash,
|
|
13
|
+
type TxReceipt,
|
|
14
|
+
type UnencryptedL2BlockL2Logs,
|
|
15
15
|
} from '@aztec/circuit-types';
|
|
16
|
-
import { Fr } from '@aztec/circuits.js';
|
|
17
|
-
import { AztecAddress } from '@aztec/foundation/aztec-address';
|
|
16
|
+
import { type Fr } from '@aztec/circuits.js';
|
|
17
|
+
import { type AztecAddress } from '@aztec/foundation/aztec-address';
|
|
18
18
|
import { createDebugLogger } from '@aztec/foundation/log';
|
|
19
|
-
import { AztecKVStore } from '@aztec/kv-store';
|
|
19
|
+
import { type AztecKVStore } from '@aztec/kv-store';
|
|
20
20
|
import {
|
|
21
|
-
ContractClassPublic,
|
|
22
|
-
ContractInstanceWithAddress,
|
|
23
|
-
ExecutablePrivateFunctionWithMembershipProof,
|
|
24
|
-
UnconstrainedFunctionWithMembershipProof,
|
|
21
|
+
type ContractClassPublic,
|
|
22
|
+
type ContractInstanceWithAddress,
|
|
23
|
+
type ExecutablePrivateFunctionWithMembershipProof,
|
|
24
|
+
type UnconstrainedFunctionWithMembershipProof,
|
|
25
25
|
} from '@aztec/types/contracts';
|
|
26
26
|
|
|
27
|
-
import { ArchiverDataStore, ArchiverL1SynchPoint } from '../archiver_store.js';
|
|
28
|
-
import { DataRetrieval } from '../data_retrieval.js';
|
|
27
|
+
import { type ArchiverDataStore, type ArchiverL1SynchPoint } from '../archiver_store.js';
|
|
28
|
+
import { type DataRetrieval } from '../data_retrieval.js';
|
|
29
29
|
import { BlockBodyStore } from './block_body_store.js';
|
|
30
30
|
import { BlockStore } from './block_store.js';
|
|
31
31
|
import { ContractClassStore } from './contract_class_store.js';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EncryptedL2BlockL2Logs,
|
|
3
3
|
ExtendedUnencryptedL2Log,
|
|
4
|
-
FromLogType,
|
|
5
|
-
GetUnencryptedLogsResponse,
|
|
6
|
-
L2BlockL2Logs,
|
|
7
|
-
LogFilter,
|
|
4
|
+
type FromLogType,
|
|
5
|
+
type GetUnencryptedLogsResponse,
|
|
6
|
+
type L2BlockL2Logs,
|
|
7
|
+
type LogFilter,
|
|
8
8
|
LogId,
|
|
9
9
|
LogType,
|
|
10
10
|
UnencryptedL2BlockL2Logs,
|
|
11
|
-
UnencryptedL2Log,
|
|
11
|
+
type UnencryptedL2Log,
|
|
12
12
|
} from '@aztec/circuit-types';
|
|
13
13
|
import { INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js/constants';
|
|
14
14
|
import { createDebugLogger } from '@aztec/foundation/log';
|
|
15
|
-
import { AztecKVStore, AztecMap } from '@aztec/kv-store';
|
|
15
|
+
import { type AztecKVStore, type AztecMap } from '@aztec/kv-store';
|
|
16
16
|
|
|
17
|
-
import { BlockStore } from './block_store.js';
|
|
17
|
+
import { type BlockStore } from './block_store.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* A store for logs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InboxLeaf } from '@aztec/circuit-types';
|
|
1
|
+
import { type InboxLeaf } from '@aztec/circuit-types';
|
|
2
2
|
import {
|
|
3
3
|
Fr,
|
|
4
4
|
INITIAL_L2_BLOCK_NUM,
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP,
|
|
7
7
|
} from '@aztec/circuits.js';
|
|
8
8
|
import { createDebugLogger } from '@aztec/foundation/log';
|
|
9
|
-
import { AztecKVStore, AztecMap, AztecSingleton } from '@aztec/kv-store';
|
|
9
|
+
import { type AztecKVStore, type AztecMap, type AztecSingleton } from '@aztec/kv-store';
|
|
10
10
|
|
|
11
|
-
import { DataRetrieval } from '../data_retrieval.js';
|
|
11
|
+
import { type DataRetrieval } from '../data_retrieval.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* LMDB implementation of the ArchiverDataStore interface.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { InboxLeaf } from '@aztec/circuit-types';
|
|
1
|
+
import { type InboxLeaf } from '@aztec/circuit-types';
|
|
2
2
|
import {
|
|
3
3
|
INITIAL_L2_BLOCK_NUM,
|
|
4
4
|
L1_TO_L2_MSG_SUBTREE_HEIGHT,
|
|
5
5
|
NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP,
|
|
6
6
|
} from '@aztec/circuits.js/constants';
|
|
7
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
7
|
+
import { type Fr } from '@aztec/foundation/fields';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* A simple in-memory implementation of an L1 to L2 message store.
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Body,
|
|
3
|
-
EncryptedL2BlockL2Logs,
|
|
2
|
+
type Body,
|
|
3
|
+
type EncryptedL2BlockL2Logs,
|
|
4
4
|
ExtendedUnencryptedL2Log,
|
|
5
|
-
FromLogType,
|
|
6
|
-
GetUnencryptedLogsResponse,
|
|
7
|
-
InboxLeaf,
|
|
8
|
-
L2Block,
|
|
5
|
+
type FromLogType,
|
|
6
|
+
type GetUnencryptedLogsResponse,
|
|
7
|
+
type InboxLeaf,
|
|
8
|
+
type L2Block,
|
|
9
9
|
L2BlockContext,
|
|
10
|
-
L2BlockL2Logs,
|
|
11
|
-
LogFilter,
|
|
10
|
+
type L2BlockL2Logs,
|
|
11
|
+
type LogFilter,
|
|
12
12
|
LogId,
|
|
13
13
|
LogType,
|
|
14
|
-
TxEffect,
|
|
15
|
-
TxHash,
|
|
14
|
+
type TxEffect,
|
|
15
|
+
type TxHash,
|
|
16
16
|
TxReceipt,
|
|
17
17
|
TxStatus,
|
|
18
|
-
UnencryptedL2BlockL2Logs,
|
|
18
|
+
type UnencryptedL2BlockL2Logs,
|
|
19
19
|
} from '@aztec/circuit-types';
|
|
20
20
|
import { Fr, INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js';
|
|
21
|
-
import { AztecAddress } from '@aztec/foundation/aztec-address';
|
|
21
|
+
import { type AztecAddress } from '@aztec/foundation/aztec-address';
|
|
22
22
|
import {
|
|
23
|
-
ContractClassPublic,
|
|
24
|
-
ContractInstanceWithAddress,
|
|
25
|
-
ExecutablePrivateFunctionWithMembershipProof,
|
|
26
|
-
UnconstrainedFunctionWithMembershipProof,
|
|
23
|
+
type ContractClassPublic,
|
|
24
|
+
type ContractInstanceWithAddress,
|
|
25
|
+
type ExecutablePrivateFunctionWithMembershipProof,
|
|
26
|
+
type UnconstrainedFunctionWithMembershipProof,
|
|
27
27
|
} from '@aztec/types/contracts';
|
|
28
28
|
|
|
29
|
-
import { ArchiverDataStore, ArchiverL1SynchPoint } from '../archiver_store.js';
|
|
30
|
-
import { DataRetrieval } from '../data_retrieval.js';
|
|
29
|
+
import { type ArchiverDataStore, type ArchiverL1SynchPoint } from '../archiver_store.js';
|
|
30
|
+
import { type DataRetrieval } from '../data_retrieval.js';
|
|
31
31
|
import { L1ToL2MessageStore } from './l1_to_l2_message_store.js';
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { EthAddress, Fr } from '@aztec/circuits.js';
|
|
10
10
|
import { createJsonRpcClient, makeFetch } from '@aztec/foundation/json-rpc/client';
|
|
11
11
|
|
|
12
|
-
import { ArchiveSource } from '../archiver/archiver.js';
|
|
12
|
+
import { type ArchiveSource } from '../archiver/archiver.js';
|
|
13
13
|
|
|
14
14
|
export const createArchiverClient = (url: string, fetch = makeFetch([1, 2, 3], true)): ArchiveSource =>
|
|
15
15
|
createJsonRpcClient<ArchiveSource>(
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import { EthAddress, Fr } from '@aztec/circuits.js';
|
|
11
11
|
import { JsonRpcServer } from '@aztec/foundation/json-rpc/server';
|
|
12
12
|
|
|
13
|
-
import { Archiver } from '../archiver/archiver.js';
|
|
13
|
+
import { type Archiver } from '../archiver/archiver.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Wrap an Archiver instance with a JSON RPC HTTP server.
|