@aztec/archiver 0.0.0-test.1 → 0.0.1-commit.b655e406

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.
Files changed (102) hide show
  1. package/README.md +27 -6
  2. package/dest/archiver/archiver.d.ts +126 -46
  3. package/dest/archiver/archiver.d.ts.map +1 -1
  4. package/dest/archiver/archiver.js +683 -261
  5. package/dest/archiver/archiver_store.d.ts +84 -49
  6. package/dest/archiver/archiver_store.d.ts.map +1 -1
  7. package/dest/archiver/archiver_store_test_suite.d.ts.map +1 -1
  8. package/dest/archiver/archiver_store_test_suite.js +707 -213
  9. package/dest/archiver/config.d.ts +4 -20
  10. package/dest/archiver/config.d.ts.map +1 -1
  11. package/dest/archiver/config.js +16 -12
  12. package/dest/archiver/data_retrieval.d.ts +25 -20
  13. package/dest/archiver/data_retrieval.d.ts.map +1 -1
  14. package/dest/archiver/data_retrieval.js +147 -68
  15. package/dest/archiver/errors.d.ts +8 -0
  16. package/dest/archiver/errors.d.ts.map +1 -1
  17. package/dest/archiver/errors.js +12 -0
  18. package/dest/archiver/index.d.ts +2 -3
  19. package/dest/archiver/index.d.ts.map +1 -1
  20. package/dest/archiver/index.js +1 -2
  21. package/dest/archiver/instrumentation.d.ts +9 -3
  22. package/dest/archiver/instrumentation.d.ts.map +1 -1
  23. package/dest/archiver/instrumentation.js +58 -17
  24. package/dest/archiver/kv_archiver_store/block_store.d.ts +47 -10
  25. package/dest/archiver/kv_archiver_store/block_store.d.ts.map +1 -1
  26. package/dest/archiver/kv_archiver_store/block_store.js +216 -63
  27. package/dest/archiver/kv_archiver_store/contract_class_store.d.ts +2 -2
  28. package/dest/archiver/kv_archiver_store/contract_class_store.d.ts.map +1 -1
  29. package/dest/archiver/kv_archiver_store/contract_class_store.js +12 -18
  30. package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts +10 -7
  31. package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts.map +1 -1
  32. package/dest/archiver/kv_archiver_store/contract_instance_store.js +30 -16
  33. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +49 -34
  34. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +1 -1
  35. package/dest/archiver/kv_archiver_store/kv_archiver_store.js +88 -46
  36. package/dest/archiver/kv_archiver_store/log_store.d.ts +1 -1
  37. package/dest/archiver/kv_archiver_store/log_store.d.ts.map +1 -1
  38. package/dest/archiver/kv_archiver_store/log_store.js +18 -46
  39. package/dest/archiver/kv_archiver_store/message_store.d.ts +22 -16
  40. package/dest/archiver/kv_archiver_store/message_store.d.ts.map +1 -1
  41. package/dest/archiver/kv_archiver_store/message_store.js +150 -48
  42. package/dest/archiver/structs/inbox_message.d.ts +15 -0
  43. package/dest/archiver/structs/inbox_message.d.ts.map +1 -0
  44. package/dest/archiver/structs/inbox_message.js +38 -0
  45. package/dest/archiver/structs/published.d.ts +1 -10
  46. package/dest/archiver/structs/published.d.ts.map +1 -1
  47. package/dest/archiver/structs/published.js +1 -1
  48. package/dest/archiver/validation.d.ts +11 -0
  49. package/dest/archiver/validation.d.ts.map +1 -0
  50. package/dest/archiver/validation.js +90 -0
  51. package/dest/factory.d.ts +7 -12
  52. package/dest/factory.d.ts.map +1 -1
  53. package/dest/factory.js +18 -49
  54. package/dest/rpc/index.d.ts +1 -2
  55. package/dest/rpc/index.d.ts.map +1 -1
  56. package/dest/rpc/index.js +1 -4
  57. package/dest/test/mock_archiver.d.ts +1 -1
  58. package/dest/test/mock_l1_to_l2_message_source.d.ts +4 -2
  59. package/dest/test/mock_l1_to_l2_message_source.d.ts.map +1 -1
  60. package/dest/test/mock_l1_to_l2_message_source.js +14 -1
  61. package/dest/test/mock_l2_block_source.d.ts +32 -5
  62. package/dest/test/mock_l2_block_source.d.ts.map +1 -1
  63. package/dest/test/mock_l2_block_source.js +118 -7
  64. package/dest/test/mock_structs.d.ts +9 -0
  65. package/dest/test/mock_structs.d.ts.map +1 -0
  66. package/dest/test/mock_structs.js +37 -0
  67. package/package.json +25 -27
  68. package/src/archiver/archiver.ts +858 -317
  69. package/src/archiver/archiver_store.ts +97 -55
  70. package/src/archiver/archiver_store_test_suite.ts +663 -210
  71. package/src/archiver/config.ts +23 -41
  72. package/src/archiver/data_retrieval.ts +215 -92
  73. package/src/archiver/errors.ts +21 -0
  74. package/src/archiver/index.ts +2 -3
  75. package/src/archiver/instrumentation.ts +75 -20
  76. package/src/archiver/kv_archiver_store/block_store.ts +270 -72
  77. package/src/archiver/kv_archiver_store/contract_class_store.ts +13 -23
  78. package/src/archiver/kv_archiver_store/contract_instance_store.ts +35 -27
  79. package/src/archiver/kv_archiver_store/kv_archiver_store.ts +127 -63
  80. package/src/archiver/kv_archiver_store/log_store.ts +24 -62
  81. package/src/archiver/kv_archiver_store/message_store.ts +209 -53
  82. package/src/archiver/structs/inbox_message.ts +41 -0
  83. package/src/archiver/structs/published.ts +1 -11
  84. package/src/archiver/validation.ts +99 -0
  85. package/src/factory.ts +24 -66
  86. package/src/rpc/index.ts +1 -5
  87. package/src/test/mock_archiver.ts +1 -1
  88. package/src/test/mock_l1_to_l2_message_source.ts +14 -3
  89. package/src/test/mock_l2_block_source.ts +152 -8
  90. package/src/test/mock_structs.ts +49 -0
  91. package/dest/archiver/kv_archiver_store/nullifier_store.d.ts +0 -12
  92. package/dest/archiver/kv_archiver_store/nullifier_store.d.ts.map +0 -1
  93. package/dest/archiver/kv_archiver_store/nullifier_store.js +0 -73
  94. package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.d.ts +0 -23
  95. package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.d.ts.map +0 -1
  96. package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.js +0 -49
  97. package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts +0 -175
  98. package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts.map +0 -1
  99. package/dest/archiver/memory_archiver_store/memory_archiver_store.js +0 -636
  100. package/src/archiver/kv_archiver_store/nullifier_store.ts +0 -97
  101. package/src/archiver/memory_archiver_store/l1_to_l2_message_store.ts +0 -61
  102. package/src/archiver/memory_archiver_store/memory_archiver_store.ts +0 -801
package/README.md CHANGED
@@ -1,16 +1,37 @@
1
1
  # Archiver
2
2
 
3
- Archiver is a service which is used to fetch data on-chain data and present them in a nice-to-consume form.
4
- The on-chain data specifically are the following events:
3
+ Archiver is a service which is used to fetch data onchain data and present them in a nice-to-consume form.
4
+
5
+ The onchain data specifically are the following events:
5
6
 
6
7
  1. `L2BlockProposed` event emitted on Rollup contract,
7
8
  2. `MessageAdded` event emitted on Inbox contract,
8
9
 
9
10
  The interfaces defining how the data can be consumed from the archiver are `L2BlockSource`, `L2LogsSource` and `ContractDataSource`.
10
11
 
11
- ## Usage
12
+ ## Sync process
13
+
14
+ The archiver sync process periodically checks its current state against the Rollup contract on L1 and updates its local state.
15
+
16
+ ### Handling invalid blocks
17
+
18
+ After the implementation of [delayed attestation verification](https://github.com/AztecProtocol/engineering-designs/pull/69), the Rollup contract on L1 no longer validates committee attestations. Instead, these are posted in calldata, and L2 nodes are expected to verify them as they download blocks. The archiver handles this validation during its sync process.
19
+
20
+ Whenever the archiver detects a block with invalid attestations, it skips it. These blocks are not meant to be part of the chain, so the archiver ignores them and continues processing the next blocks. It is expected that an honest proposer will eventually invalidate these blocks, removing them from the chain on L1, and then resume the sequence of valid blocks.
21
+
22
+ > [!WARNING]
23
+ > If the committee for the epoch is also malicious and attests to a descendant of an invalid block, nodes should also ignore these descendants, unless they become proven. This is currently not implemented. Nodes assume that the majority of the committee is honest.
24
+
25
+ When the current node is elected as proposer, the `sequencer` needs to know whether there is an invalid block in L1 that needs to be purged before posting their own block. To support this, the archiver exposes a `pendingChainValidationStatus`, which is the state of the tip of the pending chain. This status can be valid in the happy path, or invalid if the tip of the pending chain has invalid attestations. If invalid, this status also contains all the data needed for purging the block from L1 via an `invalidate` call to the Rollup contract. Note that, if the head of the chain has more than one invalid consecutive block, this status will reference the earliest one that needs to be purged, since a call to purge an invalid block will automatically purge all descendants. Refer to the [InvalidateLib.sol](`l1-contracts/src/core/libraries/rollup/InvalidateLib.sol`) for more info.
26
+
27
+ > [!TIP]
28
+ > The archiver can be configured to `skipValidateBlockAttestations`, which will make it skip this validation. This cannot be set via environment variables, only via a call to `nodeAdmin_setConfig`. This setting is only meant for testing purposes.
12
29
 
13
- To install dependencies and build the package run `yarn install` followed by `yarn build`.
14
- To run test execute `yarn test`.
30
+ As an example, let's say the chain has been progressing normally up until block 10, and then:
31
+ 1. Block 11 is posted with invalid attestations. The archiver will report 10 as the latest block, but the `pendingChainValidationStatus` will point to block 11.
32
+ 2. Block 11 is purged, but another block 11 with invalid attestations is posted in its place. The archiver will still report 10 as latest, and the `pendingChainValidationStatus` will point to the new block 11 that needs to be purged.
33
+ 3. Block 12 with invalid attestations is posted. No changes in the archiver.
34
+ 4. Block 13 is posted with valid attestations, due to a malicious committee. The archiver will try to sync it and fail, since 13 does not follow 10. This scenario is not gracefully handled yet.
35
+ 5. Blocks 11 to 13 are purged. The archiver status will not yet be changed: 10 will still be the latest block, and the `pendingChainValidationStatus` will point to 11. This is because the archiver does **not** follow `BlockInvalidated` events.
36
+ 6. Block 11 with valid attestations is posted. The archiver pending chain now reports 11 as latest, and its status is valid.
15
37
 
16
- To start the service export `ETHEREUM_HOSTS` (defaults to `http://127.0.0.1:8545/`), `ARCHIVER_POLLING_INTERVAL_MS` (defaults to `1000 ms`), `ROLLUP_CONTRACT_ADDRESS`, `INBOX_CONTRACT_ADDRESS` environmental variables and start the service with `yarn start`.
@@ -1,51 +1,65 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { BlobSinkClientInterface } from '@aztec/blob-sink/client';
3
- import { type ViemPublicClient } from '@aztec/ethereum';
2
+ import { EpochCache } from '@aztec/epoch-cache';
3
+ import { type L1BlockId, type ViemPublicClient } from '@aztec/ethereum';
4
+ import { Buffer32 } from '@aztec/foundation/buffer';
4
5
  import type { EthAddress } from '@aztec/foundation/eth-address';
5
6
  import { Fr } from '@aztec/foundation/fields';
6
7
  import { type Logger } from '@aztec/foundation/log';
8
+ import { DateProvider } from '@aztec/foundation/timer';
9
+ import type { CustomRange } from '@aztec/kv-store';
7
10
  import type { FunctionSelector } from '@aztec/stdlib/abi';
8
11
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
9
- import { type InBlock, type L2Block, type L2BlockSource, type L2Tips, type NullifierWithBlockSource } from '@aztec/stdlib/block';
10
- import { type ContractClassPublic, type ContractDataSource, type ContractInstanceWithAddress, type PublicFunction } from '@aztec/stdlib/contract';
12
+ import { type ArchiverEmitter, type L2Block, type L2BlockSource, type L2Tips } from '@aztec/stdlib/block';
13
+ import { type ContractClassPublic, type ContractDataSource, type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
11
14
  import { type L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
12
15
  import type { GetContractClassLogsResponse, GetPublicLogsResponse } from '@aztec/stdlib/interfaces/client';
13
16
  import type { L2LogsSource } from '@aztec/stdlib/interfaces/server';
14
17
  import { type LogFilter, type PrivateLog, TxScopedL2Log } from '@aztec/stdlib/logs';
15
18
  import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
16
- import { type BlockHeader, TxEffect, TxHash, TxReceipt } from '@aztec/stdlib/tx';
19
+ import { type BlockHeader, type IndexedTxEffect, TxHash, TxReceipt } from '@aztec/stdlib/tx';
20
+ import type { UInt64 } from '@aztec/stdlib/types';
17
21
  import { type TelemetryClient, type Traceable, type Tracer } from '@aztec/telemetry-client';
18
- import { EventEmitter } from 'events';
19
- import type { ArchiverDataStore } from './archiver_store.js';
22
+ import type { ArchiverDataStore, ArchiverL1SynchPoint } from './archiver_store.js';
20
23
  import type { ArchiverConfig } from './config.js';
21
24
  import { ArchiverInstrumentation } from './instrumentation.js';
25
+ import type { InboxMessage } from './structs/inbox_message.js';
26
+ import type { PublishedL2Block } from './structs/published.js';
27
+ import { type ValidateBlockResult } from './validation.js';
22
28
  /**
23
29
  * Helper interface to combine all sources this archiver implementation provides.
24
30
  */
25
- export type ArchiveSource = L2BlockSource & L2LogsSource & ContractDataSource & L1ToL2MessageSource & NullifierWithBlockSource;
31
+ export type ArchiveSource = L2BlockSource & L2LogsSource & ContractDataSource & L1ToL2MessageSource;
32
+ export type ArchiverDeps = {
33
+ telemetry?: TelemetryClient;
34
+ blobSinkClient: BlobSinkClientInterface;
35
+ epochCache?: EpochCache;
36
+ dateProvider?: DateProvider;
37
+ };
38
+ declare const Archiver_base: new () => ArchiverEmitter;
26
39
  /**
27
40
  * Pulls L2 blocks in a non-blocking manner and provides interface for their retrieval.
28
41
  * Responsible for handling robust L1 polling so that other components do not need to
29
42
  * concern themselves with it.
30
43
  */
31
- export declare class Archiver extends EventEmitter implements ArchiveSource, Traceable {
44
+ export declare class Archiver extends Archiver_base implements ArchiveSource, Traceable {
32
45
  private readonly publicClient;
33
46
  private readonly l1Addresses;
34
47
  readonly dataStore: ArchiverDataStore;
35
- private readonly config;
48
+ private config;
36
49
  private readonly blobSinkClient;
50
+ private readonly epochCache;
37
51
  private readonly instrumentation;
38
52
  private readonly l1constants;
39
53
  private readonly log;
40
- /**
41
- * A promise in which we will be continually fetching new L2 blocks.
42
- */
54
+ /** A loop in which we will be continually fetching new L2 blocks. */
43
55
  private runningPromise?;
44
56
  private rollup;
45
57
  private inbox;
46
58
  private store;
47
- l1BlockNumber: bigint | undefined;
48
- l1Timestamp: bigint | undefined;
59
+ private l1BlockNumber;
60
+ private l1Timestamp;
61
+ private initialSyncComplete;
62
+ private initialSyncPromise;
49
63
  readonly tracer: Tracer;
50
64
  /**
51
65
  * Creates a new instance of the Archiver.
@@ -64,7 +78,11 @@ export declare class Archiver extends EventEmitter implements ArchiveSource, Tra
64
78
  }, dataStore: ArchiverDataStore, config: {
65
79
  pollingIntervalMs: number;
66
80
  batchSize: number;
67
- }, blobSinkClient: BlobSinkClientInterface, instrumentation: ArchiverInstrumentation, l1constants: L1RollupConstants, log?: Logger);
81
+ skipValidateBlockAttestations?: boolean;
82
+ }, blobSinkClient: BlobSinkClientInterface, epochCache: EpochCache, instrumentation: ArchiverInstrumentation, l1constants: L1RollupConstants & {
83
+ l1StartBlockHash: Buffer32;
84
+ genesisArchiveRoot: Fr;
85
+ }, log?: Logger);
68
86
  /**
69
87
  * Creates a new instance of the Archiver and blocks until it syncs from chain.
70
88
  * @param config - The archiver's desired configuration.
@@ -72,41 +90,55 @@ export declare class Archiver extends EventEmitter implements ArchiveSource, Tra
72
90
  * @param blockUntilSynced - If true, blocks until the archiver has fully synced.
73
91
  * @returns - An instance of the archiver.
74
92
  */
75
- static createAndSync(config: ArchiverConfig, archiverStore: ArchiverDataStore, deps: {
76
- telemetry: TelemetryClient;
77
- blobSinkClient: BlobSinkClientInterface;
78
- }, blockUntilSynced?: boolean): Promise<Archiver>;
93
+ static createAndSync(config: ArchiverConfig, archiverStore: ArchiverDataStore, deps: ArchiverDeps, blockUntilSynced?: boolean): Promise<Archiver>;
94
+ /** Updates archiver config */
95
+ updateConfig(newConfig: Partial<ArchiverConfig>): void;
79
96
  /**
80
97
  * Starts sync process.
81
98
  * @param blockUntilSynced - If true, blocks until the archiver has fully synced.
82
99
  */
83
100
  start(blockUntilSynced: boolean): Promise<void>;
101
+ syncImmediate(): Promise<void>;
102
+ waitForInitialSync(): Promise<void>;
84
103
  private syncSafe;
85
104
  /**
86
105
  * Fetches logs from L1 contracts and processes them.
87
106
  */
88
107
  private sync;
89
- /** Queries the rollup contract on whether a prune can be executed on the immediatenext L1 block. */
108
+ /** Queries the rollup contract on whether a prune can be executed on the immediate next L1 block. */
90
109
  private canPrune;
91
110
  /** Checks if there'd be a reorg for the next block submission and start pruning now. */
92
111
  private handleEpochPrune;
93
112
  private nextRange;
94
113
  private handleL1ToL2Messages;
114
+ private retrieveL1ToL2Message;
115
+ private rollbackL1ToL2Messages;
116
+ private getL1BlockHash;
95
117
  private handleL2blocks;
118
+ private checkForNewBlocksBeforeL1SyncPoint;
119
+ /** Resumes the archiver after a stop. */
120
+ resume(): void;
96
121
  /**
97
122
  * Stops the archiver.
98
123
  * @returns A promise signalling completion of the stop process.
99
124
  */
100
125
  stop(): Promise<void>;
126
+ backupTo(destPath: string): Promise<string>;
101
127
  getL1Constants(): Promise<L1RollupConstants>;
128
+ getGenesisValues(): Promise<{
129
+ genesisArchiveRoot: Fr;
130
+ }>;
102
131
  getRollupAddress(): Promise<EthAddress>;
103
132
  getRegistryAddress(): Promise<EthAddress>;
104
- getL1BlockNumber(): bigint;
105
- getL1Timestamp(): bigint;
106
- getL2SlotNumber(): Promise<bigint>;
107
- getL2EpochNumber(): Promise<bigint>;
133
+ getL1BlockNumber(): bigint | undefined;
134
+ getL1Timestamp(): Promise<bigint | undefined>;
135
+ getL2SlotNumber(): Promise<bigint | undefined>;
136
+ getL2EpochNumber(): Promise<bigint | undefined>;
108
137
  getBlocksForEpoch(epochNumber: bigint): Promise<L2Block[]>;
138
+ getBlockHeadersForEpoch(epochNumber: bigint): Promise<BlockHeader[]>;
109
139
  isEpochComplete(epochNumber: bigint): Promise<boolean>;
140
+ /** Returns whether the archiver has completed an initial sync run successfully. */
141
+ isInitialSyncComplete(): boolean;
110
142
  /**
111
143
  * Gets up to `limit` amount of L2 blocks starting from `from`.
112
144
  * @param from - Number of the first block to return (inclusive).
@@ -115,6 +147,12 @@ export declare class Archiver extends EventEmitter implements ArchiveSource, Tra
115
147
  * @returns The requested L2 blocks.
116
148
  */
117
149
  getBlocks(from: number, limit: number, proven?: boolean): Promise<L2Block[]>;
150
+ /** Equivalent to getBlocks but includes publish data. */
151
+ getPublishedBlocks(from: number, limit: number, proven?: boolean): Promise<PublishedL2Block[]>;
152
+ getPublishedBlockByHash(blockHash: Fr): Promise<PublishedL2Block | undefined>;
153
+ getPublishedBlockByArchive(archive: Fr): Promise<PublishedL2Block | undefined>;
154
+ getBlockHeaderByHash(blockHash: Fr): Promise<BlockHeader | undefined>;
155
+ getBlockHeaderByArchive(archive: Fr): Promise<BlockHeader | undefined>;
118
156
  /**
119
157
  * Gets an l2 block.
120
158
  * @param number - The block number to return.
@@ -122,15 +160,8 @@ export declare class Archiver extends EventEmitter implements ArchiveSource, Tra
122
160
  */
123
161
  getBlock(number: number): Promise<L2Block | undefined>;
124
162
  getBlockHeader(number: number | 'latest'): Promise<BlockHeader | undefined>;
125
- getTxEffect(txHash: TxHash): Promise<InBlock<TxEffect> | undefined>;
163
+ getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
126
164
  getSettledTxReceipt(txHash: TxHash): Promise<TxReceipt | undefined>;
127
- /**
128
- * Gets the public function data for a contract.
129
- * @param address - The contract address containing the function to fetch.
130
- * @param selector - The function selector of the function to fetch.
131
- * @returns The public function data (if found).
132
- */
133
- getPublicFunction(address: AztecAddress, selector: FunctionSelector): Promise<PublicFunction | undefined>;
134
165
  /**
135
166
  * Retrieves all private logs from up to `limit` blocks, starting from the block number `from`.
136
167
  * @param from - The block number from which to begin retrieving logs.
@@ -145,14 +176,6 @@ export declare class Archiver extends EventEmitter implements ArchiveSource, Tra
145
176
  * that tag.
146
177
  */
147
178
  getLogsByTags(tags: Fr[]): Promise<TxScopedL2Log[][]>;
148
- /**
149
- * Returns the provided nullifier indexes scoped to the block
150
- * they were first included in, or undefined if they're not present in the tree
151
- * @param blockNumber Max block number to search for the nullifiers
152
- * @param nullifiers Nullifiers to get
153
- * @returns The block scoped indexes of the provided nullifiers, or undefined if the nullifier doesn't exist in the tree
154
- */
155
- findNullifiersIndexesWithBlock(blockNumber: number, nullifiers: Fr[]): Promise<(InBlock<bigint> | undefined)[]>;
156
179
  /**
157
180
  * Gets public logs based on the provided filter.
158
181
  * @param filter - The filter to apply to the logs.
@@ -175,13 +198,13 @@ export declare class Archiver extends EventEmitter implements ArchiveSource, Tra
175
198
  setProvenBlockNumber(blockNumber: number): Promise<void>;
176
199
  getContractClass(id: Fr): Promise<ContractClassPublic | undefined>;
177
200
  getBytecodeCommitment(id: Fr): Promise<Fr | undefined>;
178
- getContract(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
201
+ getContract(address: AztecAddress, maybeTimestamp?: UInt64): Promise<ContractInstanceWithAddress | undefined>;
179
202
  /**
180
203
  * Gets L1 to L2 message (to be) included in a given block.
181
204
  * @param blockNumber - L2 block number to get messages for.
182
205
  * @returns The L1 to L2 messages/leaves of the messages subtree (throws if not found).
183
206
  */
184
- getL1ToL2Messages(blockNumber: bigint): Promise<Fr[]>;
207
+ getL1ToL2Messages(blockNumber: number): Promise<Fr[]>;
185
208
  /**
186
209
  * Gets the L1 to L2 message index in the L1 to L2 message tree.
187
210
  * @param l1ToL2Message - The L1 to L2 message.
@@ -189,9 +212,66 @@ export declare class Archiver extends EventEmitter implements ArchiveSource, Tra
189
212
  */
190
213
  getL1ToL2MessageIndex(l1ToL2Message: Fr): Promise<bigint | undefined>;
191
214
  getContractClassIds(): Promise<Fr[]>;
192
- addContractClass(contractClass: ContractClassPublic): Promise<void>;
193
- registerContractFunctionSignatures(address: AztecAddress, signatures: string[]): Promise<void>;
194
- getContractFunctionName(address: AztecAddress, selector: FunctionSelector): Promise<string | undefined>;
215
+ registerContractFunctionSignatures(signatures: string[]): Promise<void>;
216
+ getDebugFunctionName(address: AztecAddress, selector: FunctionSelector): Promise<string | undefined>;
217
+ getPendingChainValidationStatus(): Promise<ValidateBlockResult>;
218
+ isPendingChainInvalid(): Promise<boolean>;
195
219
  getL2Tips(): Promise<L2Tips>;
220
+ rollbackTo(targetL2BlockNumber: number): Promise<void>;
221
+ }
222
+ /**
223
+ * A helper class that we use to deal with some of the logic needed when adding blocks.
224
+ *
225
+ * I would have preferred to not have this type. But it is useful for handling the logic that any
226
+ * store would need to include otherwise while exposing fewer functions and logic directly to the archiver.
227
+ */
228
+ export declare class ArchiverStoreHelper implements Omit<ArchiverDataStore, 'addLogs' | 'deleteLogs' | 'addContractClasses' | 'deleteContractClasses' | 'addContractInstances' | 'deleteContractInstances' | 'addContractInstanceUpdates' | 'deleteContractInstanceUpdates' | 'addFunctions' | 'backupTo' | 'close' | 'transactionAsync' | 'addBlocks'> {
229
+ #private;
230
+ protected readonly store: ArchiverDataStore;
231
+ constructor(store: ArchiverDataStore);
232
+ addBlocks(blocks: PublishedL2Block[], pendingChainValidationStatus?: ValidateBlockResult): Promise<boolean>;
233
+ unwindBlocks(from: number, blocksToUnwind: number): Promise<boolean>;
234
+ getPublishedBlocks(from: number, limit: number): Promise<PublishedL2Block[]>;
235
+ getPublishedBlock(number: number): Promise<PublishedL2Block | undefined>;
236
+ getPublishedBlockByHash(blockHash: Fr): Promise<PublishedL2Block | undefined>;
237
+ getPublishedBlockByArchive(archive: Fr): Promise<PublishedL2Block | undefined>;
238
+ getBlockHeaders(from: number, limit: number): Promise<BlockHeader[]>;
239
+ getBlockHeaderByHash(blockHash: Fr): Promise<BlockHeader | undefined>;
240
+ getBlockHeaderByArchive(archive: Fr): Promise<BlockHeader | undefined>;
241
+ getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
242
+ getSettledTxReceipt(txHash: TxHash): Promise<TxReceipt | undefined>;
243
+ addL1ToL2Messages(messages: InboxMessage[]): Promise<void>;
244
+ getL1ToL2Messages(blockNumber: number): Promise<Fr[]>;
245
+ getL1ToL2MessageIndex(l1ToL2Message: Fr): Promise<bigint | undefined>;
246
+ getPrivateLogs(from: number, limit: number): Promise<PrivateLog[]>;
247
+ getLogsByTags(tags: Fr[], logsPerTag?: number): Promise<TxScopedL2Log[][]>;
248
+ getPublicLogs(filter: LogFilter): Promise<GetPublicLogsResponse>;
249
+ getContractClassLogs(filter: LogFilter): Promise<GetContractClassLogsResponse>;
250
+ getSynchedL2BlockNumber(): Promise<number>;
251
+ getProvenL2BlockNumber(): Promise<number>;
252
+ setProvenL2BlockNumber(l2BlockNumber: number): Promise<void>;
253
+ setBlockSynchedL1BlockNumber(l1BlockNumber: bigint): Promise<void>;
254
+ setMessageSynchedL1Block(l1Block: L1BlockId): Promise<void>;
255
+ getSynchPoint(): Promise<ArchiverL1SynchPoint>;
256
+ getContractClass(id: Fr): Promise<ContractClassPublic | undefined>;
257
+ getBytecodeCommitment(contractClassId: Fr): Promise<Fr | undefined>;
258
+ getContractInstance(address: AztecAddress, timestamp: UInt64): Promise<ContractInstanceWithAddress | undefined>;
259
+ getContractClassIds(): Promise<Fr[]>;
260
+ registerContractFunctionSignatures(signatures: string[]): Promise<void>;
261
+ getDebugFunctionName(address: AztecAddress, selector: FunctionSelector): Promise<string | undefined>;
262
+ getTotalL1ToL2MessageCount(): Promise<bigint>;
263
+ estimateSize(): Promise<{
264
+ mappingSize: number;
265
+ physicalFileSize: number;
266
+ actualSize: number;
267
+ numItems: number;
268
+ }>;
269
+ rollbackL1ToL2MessagesToL2Block(targetBlockNumber: number): Promise<void>;
270
+ iterateL1ToL2Messages(range?: CustomRange<bigint>): AsyncIterableIterator<InboxMessage>;
271
+ removeL1ToL2Messages(startIndex: bigint): Promise<void>;
272
+ getLastL1ToL2Message(): Promise<InboxMessage | undefined>;
273
+ getPendingChainValidationStatus(): Promise<ValidateBlockResult | undefined>;
274
+ setPendingChainValidationStatus(status: ValidateBlockResult | undefined): Promise<void>;
196
275
  }
276
+ export {};
197
277
  //# sourceMappingURL=archiver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/archiver/archiver.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,KAAK,gBAAgB,EAAuB,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAclE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AA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