@aztec/archiver 0.0.1-commit.9593d84 → 0.0.1-commit.96bb3f7
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/README.md +14 -14
- package/dest/archiver/archiver.d.ts +105 -85
- package/dest/archiver/archiver.d.ts.map +1 -1
- package/dest/archiver/archiver.js +949 -255
- package/dest/archiver/archiver_store.d.ts +109 -49
- 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 +1871 -390
- package/dest/archiver/config.d.ts +5 -4
- package/dest/archiver/config.d.ts.map +1 -1
- package/dest/archiver/config.js +12 -5
- package/dest/archiver/errors.d.ts +25 -1
- package/dest/archiver/errors.d.ts.map +1 -1
- package/dest/archiver/errors.js +37 -0
- package/dest/archiver/index.d.ts +2 -2
- package/dest/archiver/index.d.ts.map +1 -1
- package/dest/archiver/instrumentation.d.ts +3 -1
- package/dest/archiver/instrumentation.d.ts.map +1 -1
- package/dest/archiver/instrumentation.js +22 -59
- package/dest/archiver/kv_archiver_store/block_store.d.ts +60 -20
- package/dest/archiver/kv_archiver_store/block_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/block_store.js +345 -89
- 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_class_store.js +1 -1
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts +2 -2
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +49 -58
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.js +68 -48
- package/dest/archiver/kv_archiver_store/log_store.d.ts +12 -16
- package/dest/archiver/kv_archiver_store/log_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/log_store.js +149 -84
- package/dest/archiver/kv_archiver_store/message_store.d.ts +6 -5
- package/dest/archiver/kv_archiver_store/message_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/message_store.js +15 -14
- package/dest/archiver/l1/bin/retrieve-calldata.d.ts +3 -0
- package/dest/archiver/l1/bin/retrieve-calldata.d.ts.map +1 -0
- package/dest/archiver/l1/bin/retrieve-calldata.js +149 -0
- package/dest/archiver/l1/calldata_retriever.d.ts +112 -0
- package/dest/archiver/l1/calldata_retriever.d.ts.map +1 -0
- package/dest/archiver/l1/calldata_retriever.js +471 -0
- package/dest/archiver/l1/data_retrieval.d.ts +90 -0
- package/dest/archiver/l1/data_retrieval.d.ts.map +1 -0
- package/dest/archiver/{data_retrieval.js → l1/data_retrieval.js} +52 -107
- package/dest/archiver/l1/debug_tx.d.ts +19 -0
- package/dest/archiver/l1/debug_tx.d.ts.map +1 -0
- package/dest/archiver/l1/debug_tx.js +73 -0
- package/dest/archiver/l1/spire_proposer.d.ts +70 -0
- package/dest/archiver/l1/spire_proposer.d.ts.map +1 -0
- package/dest/archiver/l1/spire_proposer.js +157 -0
- package/dest/archiver/l1/trace_tx.d.ts +97 -0
- package/dest/archiver/l1/trace_tx.d.ts.map +1 -0
- package/dest/archiver/l1/trace_tx.js +91 -0
- package/dest/archiver/l1/types.d.ts +12 -0
- package/dest/archiver/l1/types.d.ts.map +1 -0
- package/dest/archiver/l1/types.js +3 -0
- package/dest/archiver/l1/validate_trace.d.ts +29 -0
- package/dest/archiver/l1/validate_trace.d.ts.map +1 -0
- package/dest/archiver/l1/validate_trace.js +150 -0
- package/dest/archiver/structs/inbox_message.d.ts +4 -4
- package/dest/archiver/structs/inbox_message.d.ts.map +1 -1
- package/dest/archiver/structs/inbox_message.js +6 -5
- package/dest/archiver/structs/published.d.ts +1 -2
- package/dest/archiver/structs/published.d.ts.map +1 -1
- package/dest/archiver/validation.d.ts +4 -4
- package/dest/archiver/validation.d.ts.map +1 -1
- package/dest/archiver/validation.js +1 -1
- package/dest/factory.d.ts +2 -2
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +4 -3
- package/dest/index.d.ts +2 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -1
- package/dest/test/mock_archiver.d.ts +16 -8
- package/dest/test/mock_archiver.d.ts.map +1 -1
- package/dest/test/mock_archiver.js +19 -14
- package/dest/test/mock_l1_to_l2_message_source.d.ts +7 -6
- package/dest/test/mock_l1_to_l2_message_source.d.ts.map +1 -1
- package/dest/test/mock_l1_to_l2_message_source.js +21 -11
- package/dest/test/mock_l2_block_source.d.ts +23 -8
- package/dest/test/mock_l2_block_source.d.ts.map +1 -1
- package/dest/test/mock_l2_block_source.js +95 -35
- package/dest/test/mock_structs.d.ts +3 -2
- package/dest/test/mock_structs.d.ts.map +1 -1
- package/dest/test/mock_structs.js +9 -8
- package/package.json +17 -16
- package/src/archiver/archiver.ts +751 -344
- package/src/archiver/archiver_store.ts +123 -48
- package/src/archiver/archiver_store_test_suite.ts +1943 -365
- package/src/archiver/config.ts +17 -12
- package/src/archiver/errors.ts +64 -0
- package/src/archiver/index.ts +1 -1
- package/src/archiver/instrumentation.ts +24 -59
- package/src/archiver/kv_archiver_store/block_store.ts +475 -106
- package/src/archiver/kv_archiver_store/contract_class_store.ts +1 -1
- package/src/archiver/kv_archiver_store/contract_instance_store.ts +1 -1
- package/src/archiver/kv_archiver_store/kv_archiver_store.ts +92 -72
- package/src/archiver/kv_archiver_store/log_store.ts +209 -99
- package/src/archiver/kv_archiver_store/message_store.ts +21 -18
- package/src/archiver/l1/README.md +98 -0
- package/src/archiver/l1/bin/retrieve-calldata.ts +182 -0
- package/src/archiver/l1/calldata_retriever.ts +641 -0
- package/src/archiver/{data_retrieval.ts → l1/data_retrieval.ts} +101 -165
- package/src/archiver/l1/debug_tx.ts +99 -0
- package/src/archiver/l1/spire_proposer.ts +160 -0
- package/src/archiver/l1/trace_tx.ts +128 -0
- package/src/archiver/l1/types.ts +13 -0
- package/src/archiver/l1/validate_trace.ts +211 -0
- package/src/archiver/structs/inbox_message.ts +8 -8
- package/src/archiver/structs/published.ts +0 -1
- package/src/archiver/validation.ts +6 -6
- package/src/factory.ts +4 -3
- package/src/index.ts +1 -1
- package/src/test/fixtures/debug_traceTransaction-multicall3.json +88 -0
- package/src/test/fixtures/debug_traceTransaction-multiplePropose.json +153 -0
- package/src/test/fixtures/debug_traceTransaction-proxied.json +122 -0
- package/src/test/fixtures/trace_transaction-multicall3.json +65 -0
- package/src/test/fixtures/trace_transaction-multiplePropose.json +319 -0
- package/src/test/fixtures/trace_transaction-proxied.json +128 -0
- package/src/test/fixtures/trace_transaction-randomRevert.json +216 -0
- package/src/test/mock_archiver.ts +22 -16
- package/src/test/mock_l1_to_l2_message_source.ts +18 -11
- package/src/test/mock_l2_block_source.ts +115 -37
- package/src/test/mock_structs.ts +10 -9
- package/dest/archiver/data_retrieval.d.ts +0 -79
- package/dest/archiver/data_retrieval.d.ts.map +0 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type { L1BlockId } from '@aztec/ethereum';
|
|
2
|
-
import type {
|
|
1
|
+
import type { L1BlockId } from '@aztec/ethereum/l1-types';
|
|
2
|
+
import type { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
4
|
import type { CustomRange } from '@aztec/kv-store';
|
|
4
5
|
import type { FunctionSelector } from '@aztec/stdlib/abi';
|
|
5
6
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
|
-
import type {
|
|
7
|
+
import type { CheckpointedL2Block, L2BlockNew, ValidateCheckpointResult } from '@aztec/stdlib/block';
|
|
8
|
+
import type { PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
7
9
|
import type {
|
|
8
10
|
ContractClassPublic,
|
|
9
11
|
ContractInstanceUpdateWithAddress,
|
|
@@ -12,18 +14,18 @@ import type {
|
|
|
12
14
|
UtilityFunctionWithMembershipProof,
|
|
13
15
|
} from '@aztec/stdlib/contract';
|
|
14
16
|
import type { GetContractClassLogsResponse, GetPublicLogsResponse } from '@aztec/stdlib/interfaces/client';
|
|
15
|
-
import type { LogFilter,
|
|
17
|
+
import type { LogFilter, SiloedTag, Tag, TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
16
18
|
import { BlockHeader, type IndexedTxEffect, type TxHash, type TxReceipt } from '@aztec/stdlib/tx';
|
|
17
19
|
import type { UInt64 } from '@aztec/stdlib/types';
|
|
18
20
|
|
|
21
|
+
import type { CheckpointData } from './kv_archiver_store/block_store.js';
|
|
19
22
|
import type { InboxMessage } from './structs/inbox_message.js';
|
|
20
|
-
import type { PublishedL2Block } from './structs/published.js';
|
|
21
23
|
|
|
22
24
|
/**
|
|
23
25
|
* Represents the latest L1 block processed by the archiver for various objects in L2.
|
|
24
26
|
*/
|
|
25
27
|
export type ArchiverL1SynchPoint = {
|
|
26
|
-
/** Number of the last L1 block that added a new L2
|
|
28
|
+
/** Number of the last L1 block that added a new L2 checkpoint metadata. */
|
|
27
29
|
blocksSynchedTo?: bigint;
|
|
28
30
|
/** Last L1 block checked for L1 to L2 messages. */
|
|
29
31
|
messagesSynchedTo?: L1BlockId;
|
|
@@ -44,34 +46,95 @@ export interface ArchiverDataStore {
|
|
|
44
46
|
* @param opts.force - If true, the blocks will be added even if they have gaps.
|
|
45
47
|
* @returns True if the operation is successful.
|
|
46
48
|
*/
|
|
47
|
-
addBlocks(blocks:
|
|
49
|
+
addBlocks(blocks: L2BlockNew[], opts?: { force?: boolean }): Promise<boolean>;
|
|
48
50
|
|
|
49
51
|
/**
|
|
50
|
-
*
|
|
52
|
+
* Appends new checkpoints, and their blocks to the store's collection
|
|
53
|
+
* @param checkpoints The collectionn of checkpoints to be added
|
|
54
|
+
* @returns True if the operation is successful
|
|
55
|
+
*/
|
|
56
|
+
addCheckpoints(checkpoints: PublishedCheckpoint[]): Promise<boolean>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Retrieves all blocks for the requested chackpoint
|
|
60
|
+
* @param checkpointNumber Retreieves all blocks for the given checkpoint
|
|
61
|
+
* @returns The collection of blocks for the requested checkpoint if available (undefined otherwise)
|
|
62
|
+
*/
|
|
63
|
+
getBlocksForCheckpoint(checkpointNumber: CheckpointNumber): Promise<L2BlockNew[] | undefined>;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Returns an array of checkpoint objects
|
|
67
|
+
* @param from The first checkpoint number to be retrieved
|
|
68
|
+
* @param limit The maximum number of chackpoints to retrieve
|
|
69
|
+
* @returns The array of requested checkpoint data objects
|
|
70
|
+
*/
|
|
71
|
+
getRangeOfCheckpoints(from: CheckpointNumber, limit: number): Promise<CheckpointData[]>;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Unwinds checkpoints from the database
|
|
51
75
|
* @param from - The tip of the chain, passed for verification purposes,
|
|
52
76
|
* ensuring that we don't end up deleting something we did not intend
|
|
53
|
-
* @param
|
|
77
|
+
* @param checkpointsToUnwind - The number of checkpoints we are to unwind
|
|
54
78
|
* @returns True if the operation is successful
|
|
55
79
|
*/
|
|
56
|
-
|
|
80
|
+
unwindCheckpoints(from: CheckpointNumber, checkpointsToUnwind: number): Promise<boolean>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Returns the block for the given number, or undefined if not exists.
|
|
84
|
+
* @param number - The block number to return.
|
|
85
|
+
*/
|
|
86
|
+
getCheckpointedBlock(number: number): Promise<CheckpointedL2Block | undefined>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Gets up to `limit` amount of checkpointed L2 blocks starting from `from`.
|
|
90
|
+
* @param from - Number of the first block to return (inclusive).
|
|
91
|
+
* @param limit - The number of blocks to return.
|
|
92
|
+
* @returns The requested checkpointed L2 blocks.
|
|
93
|
+
*/
|
|
94
|
+
getCheckpointedBlocks(from: number, limit: number): Promise<CheckpointedL2Block[]>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Returns the block for the given hash, or undefined if not exists.
|
|
98
|
+
* @param blockHash - The block hash to return.
|
|
99
|
+
*/
|
|
100
|
+
getCheckpointedBlockByHash(blockHash: Fr): Promise<CheckpointedL2Block | undefined>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Returns the block for the given archive root, or undefined if not exists.
|
|
104
|
+
* @param archive - The archive root to return.
|
|
105
|
+
*/
|
|
106
|
+
getCheckpointedBlockByArchive(archive: Fr): Promise<CheckpointedL2Block | undefined>;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Returns checkpoint data for the requested checkpoint number
|
|
110
|
+
* @param checkpointNumber - The checkpoint requested
|
|
111
|
+
* @returns The checkpoint data or undefined if not found
|
|
112
|
+
*/
|
|
113
|
+
getCheckpointData(checkpointNumber: CheckpointNumber): Promise<CheckpointData | undefined>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Returns the number of the latest block
|
|
117
|
+
* @returns The number of the latest block
|
|
118
|
+
*/
|
|
119
|
+
getLatestBlockNumber(): Promise<BlockNumber>;
|
|
57
120
|
|
|
58
121
|
/**
|
|
59
122
|
* Returns the block for the given number, or undefined if not exists.
|
|
60
123
|
* @param number - The block number to return.
|
|
61
124
|
*/
|
|
62
|
-
|
|
125
|
+
getBlock(number: number): Promise<L2BlockNew | undefined>;
|
|
63
126
|
|
|
64
127
|
/**
|
|
65
128
|
* Returns the block for the given hash, or undefined if not exists.
|
|
66
129
|
* @param blockHash - The block hash to return.
|
|
67
130
|
*/
|
|
68
|
-
|
|
131
|
+
getBlockByHash(blockHash: Fr): Promise<L2BlockNew | undefined>;
|
|
69
132
|
|
|
70
133
|
/**
|
|
71
134
|
* Returns the block for the given archive root, or undefined if not exists.
|
|
72
135
|
* @param archive - The archive root to return.
|
|
73
136
|
*/
|
|
74
|
-
|
|
137
|
+
getBlockByArchive(archive: Fr): Promise<L2BlockNew | undefined>;
|
|
75
138
|
|
|
76
139
|
/**
|
|
77
140
|
* Gets up to `limit` amount of published L2 blocks starting from `from`.
|
|
@@ -79,7 +142,7 @@ export interface ArchiverDataStore {
|
|
|
79
142
|
* @param limit - The number of blocks to return.
|
|
80
143
|
* @returns The requested L2 blocks.
|
|
81
144
|
*/
|
|
82
|
-
|
|
145
|
+
getBlocks(from: number, limit: number): Promise<L2BlockNew[]>;
|
|
83
146
|
|
|
84
147
|
/**
|
|
85
148
|
* Gets up to `limit` amount of L2 block headers starting from `from`.
|
|
@@ -87,7 +150,7 @@ export interface ArchiverDataStore {
|
|
|
87
150
|
* @param limit - The number of blocks to return.
|
|
88
151
|
* @returns The requested L2 block headers.
|
|
89
152
|
*/
|
|
90
|
-
getBlockHeaders(from:
|
|
153
|
+
getBlockHeaders(from: BlockNumber, limit: number): Promise<BlockHeader[]>;
|
|
91
154
|
|
|
92
155
|
/**
|
|
93
156
|
* Returns the block header for the given hash, or undefined if not exists.
|
|
@@ -120,8 +183,8 @@ export interface ArchiverDataStore {
|
|
|
120
183
|
* @param blocks - The blocks for which to add the logs.
|
|
121
184
|
* @returns True if the operation is successful.
|
|
122
185
|
*/
|
|
123
|
-
addLogs(blocks:
|
|
124
|
-
deleteLogs(blocks:
|
|
186
|
+
addLogs(blocks: L2BlockNew[]): Promise<boolean>;
|
|
187
|
+
deleteLogs(blocks: L2BlockNew[]): Promise<boolean>;
|
|
125
188
|
|
|
126
189
|
/**
|
|
127
190
|
* Append L1 to L2 messages to the store.
|
|
@@ -131,11 +194,11 @@ export interface ArchiverDataStore {
|
|
|
131
194
|
addL1ToL2Messages(messages: InboxMessage[]): Promise<void>;
|
|
132
195
|
|
|
133
196
|
/**
|
|
134
|
-
* Gets L1 to L2 message (to be) included in a given
|
|
135
|
-
* @param
|
|
197
|
+
* Gets L1 to L2 message (to be) included in a given checkpoint.
|
|
198
|
+
* @param checkpointNumber - Checkpoint number to get messages for.
|
|
136
199
|
* @returns The L1 to L2 messages/leaves of the messages subtree (throws if not found).
|
|
137
200
|
*/
|
|
138
|
-
getL1ToL2Messages(
|
|
201
|
+
getL1ToL2Messages(checkpointNumber: CheckpointNumber): Promise<Fr[]>;
|
|
139
202
|
|
|
140
203
|
/**
|
|
141
204
|
* Gets the L1 to L2 message index in the L1 to L2 message tree.
|
|
@@ -151,21 +214,17 @@ export interface ArchiverDataStore {
|
|
|
151
214
|
getTotalL1ToL2MessageCount(): Promise<bigint>;
|
|
152
215
|
|
|
153
216
|
/**
|
|
154
|
-
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* @returns An array of private logs from the specified range of blocks.
|
|
217
|
+
/**
|
|
218
|
+
* Gets all private logs that match any of the `tags`. For each tag, an array of matching logs is returned. An empty
|
|
219
|
+
* array implies no logs match that tag.
|
|
158
220
|
*/
|
|
159
|
-
|
|
221
|
+
getPrivateLogsByTags(tags: SiloedTag[]): Promise<TxScopedL2Log[][]>;
|
|
160
222
|
|
|
161
223
|
/**
|
|
162
|
-
* Gets all logs that match any of the
|
|
163
|
-
*
|
|
164
|
-
* @param logsPerTag - The number of logs to return per tag. Defaults to everything
|
|
165
|
-
* @returns For each received tag, an array of matching logs is returned. An empty array implies no logs match
|
|
166
|
-
* that tag.
|
|
224
|
+
* Gets all public logs that match any of the `tags` from the specified contract. For each tag, an array of matching
|
|
225
|
+
* logs is returned. An empty array implies no logs match that tag.
|
|
167
226
|
*/
|
|
168
|
-
|
|
227
|
+
getPublicLogsByTagsFromContract(contractAddress: AztecAddress, tags: Tag[]): Promise<TxScopedL2Log[][]>;
|
|
169
228
|
|
|
170
229
|
/**
|
|
171
230
|
* Gets public logs based on the provided filter.
|
|
@@ -185,25 +244,37 @@ export interface ArchiverDataStore {
|
|
|
185
244
|
* Gets the number of the latest L2 block processed.
|
|
186
245
|
* @returns The number of the latest L2 block processed.
|
|
187
246
|
*/
|
|
188
|
-
|
|
247
|
+
getCheckpointedL2BlockNumber(): Promise<BlockNumber>;
|
|
189
248
|
|
|
190
249
|
/**
|
|
191
|
-
* Gets the number of the latest
|
|
192
|
-
* @returns The number of the latest
|
|
250
|
+
* Gets the number of the latest published checkpoint processed.
|
|
251
|
+
* @returns The number of the latest published checkpoint processed
|
|
193
252
|
*/
|
|
194
|
-
|
|
253
|
+
getSynchedCheckpointNumber(): Promise<CheckpointNumber>;
|
|
195
254
|
|
|
196
255
|
/**
|
|
197
|
-
*
|
|
198
|
-
* @
|
|
256
|
+
* Gets the number of the latest proven checkpoint processed.
|
|
257
|
+
* @returns The number of the latest proven checkpoint processed.
|
|
199
258
|
*/
|
|
200
|
-
|
|
259
|
+
getProvenCheckpointNumber(): Promise<CheckpointNumber>;
|
|
201
260
|
|
|
202
261
|
/**
|
|
203
|
-
*
|
|
262
|
+
* Returns the number of the most recent proven block
|
|
263
|
+
* @returns The number of the most recent proven block
|
|
264
|
+
*/
|
|
265
|
+
getProvenBlockNumber(): Promise<BlockNumber>;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Stores the number of the latest proven checkpoint processed.
|
|
269
|
+
* @param checkpointNumber - The number of the latest proven checkpoint processed.
|
|
270
|
+
*/
|
|
271
|
+
setProvenCheckpointNumber(checkpointNumber: CheckpointNumber): Promise<void>;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Stores the l1 block number that checkpoints have been synched until
|
|
204
275
|
* @param l1BlockNumber - The l1 block number
|
|
205
276
|
*/
|
|
206
|
-
|
|
277
|
+
setCheckpointSynchedL1BlockNumber(l1BlockNumber: bigint): Promise<void>;
|
|
207
278
|
|
|
208
279
|
/**
|
|
209
280
|
* Stores the l1 block that messages have been synched until
|
|
@@ -221,9 +292,13 @@ export interface ArchiverDataStore {
|
|
|
221
292
|
* @param blockNumber - Number of the L2 block the contracts were registered in.
|
|
222
293
|
* @returns True if the operation is successful.
|
|
223
294
|
*/
|
|
224
|
-
addContractClasses(
|
|
295
|
+
addContractClasses(
|
|
296
|
+
data: ContractClassPublic[],
|
|
297
|
+
bytecodeCommitments: Fr[],
|
|
298
|
+
blockNumber: BlockNumber,
|
|
299
|
+
): Promise<boolean>;
|
|
225
300
|
|
|
226
|
-
deleteContractClasses(data: ContractClassPublic[], blockNumber:
|
|
301
|
+
deleteContractClasses(data: ContractClassPublic[], blockNumber: BlockNumber): Promise<boolean>;
|
|
227
302
|
|
|
228
303
|
getBytecodeCommitment(contractClassId: Fr): Promise<Fr | undefined>;
|
|
229
304
|
|
|
@@ -239,8 +314,8 @@ export interface ArchiverDataStore {
|
|
|
239
314
|
* @param blockNumber - Number of the L2 block the instances were deployed in.
|
|
240
315
|
* @returns True if the operation is successful.
|
|
241
316
|
*/
|
|
242
|
-
addContractInstances(data: ContractInstanceWithAddress[], blockNumber:
|
|
243
|
-
deleteContractInstances(data: ContractInstanceWithAddress[], blockNumber:
|
|
317
|
+
addContractInstances(data: ContractInstanceWithAddress[], blockNumber: BlockNumber): Promise<boolean>;
|
|
318
|
+
deleteContractInstances(data: ContractInstanceWithAddress[], blockNumber: BlockNumber): Promise<boolean>;
|
|
244
319
|
|
|
245
320
|
/**
|
|
246
321
|
* Add new contract instance updates
|
|
@@ -285,8 +360,8 @@ export interface ArchiverDataStore {
|
|
|
285
360
|
/** Closes the underlying data store. */
|
|
286
361
|
close(): Promise<void>;
|
|
287
362
|
|
|
288
|
-
/** Deletes all L1 to L2 messages up until (excluding) the target
|
|
289
|
-
|
|
363
|
+
/** Deletes all L1 to L2 messages up until (excluding) the target checkpoint number. */
|
|
364
|
+
rollbackL1ToL2MessagesToCheckpoint(targetCheckpointNumber: CheckpointNumber): Promise<void>;
|
|
290
365
|
|
|
291
366
|
/** Returns an async iterator to all L1 to L2 messages on the range. */
|
|
292
367
|
iterateL1ToL2Messages(range?: CustomRange<bigint>): AsyncIterableIterator<InboxMessage>;
|
|
@@ -298,8 +373,8 @@ export interface ArchiverDataStore {
|
|
|
298
373
|
getLastL1ToL2Message(): Promise<InboxMessage | undefined>;
|
|
299
374
|
|
|
300
375
|
/** Returns the last synced validation status of the pending chain. */
|
|
301
|
-
getPendingChainValidationStatus(): Promise<
|
|
376
|
+
getPendingChainValidationStatus(): Promise<ValidateCheckpointResult | undefined>;
|
|
302
377
|
|
|
303
378
|
/** Sets the last synced validation status of the pending chain. */
|
|
304
|
-
setPendingChainValidationStatus(status:
|
|
379
|
+
setPendingChainValidationStatus(status: ValidateCheckpointResult | undefined): Promise<void>;
|
|
305
380
|
}
|