@aztec/archiver 3.0.0-devnet.6 → 3.0.0-devnet.6-patch.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 +67 -60
- package/dest/archiver/archiver.d.ts.map +1 -1
- package/dest/archiver/archiver.js +391 -262
- package/dest/archiver/archiver_store.d.ts +21 -27
- 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 +125 -140
- package/dest/archiver/config.d.ts +3 -2
- package/dest/archiver/config.d.ts.map +1 -1
- package/dest/archiver/config.js +13 -1
- package/dest/archiver/errors.d.ts +1 -1
- package/dest/archiver/errors.d.ts.map +1 -1
- package/dest/archiver/index.d.ts +1 -1
- package/dest/archiver/instrumentation.d.ts +5 -3
- package/dest/archiver/instrumentation.d.ts.map +1 -1
- package/dest/archiver/instrumentation.js +11 -0
- package/dest/archiver/kv_archiver_store/block_store.d.ts +10 -9
- package/dest/archiver/kv_archiver_store/block_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/block_store.js +9 -8
- 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 +23 -29
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.js +7 -15
- package/dest/archiver/kv_archiver_store/log_store.d.ts +3 -10
- package/dest/archiver/kv_archiver_store/log_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/log_store.js +4 -26
- 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 +147 -0
- package/dest/archiver/l1/calldata_retriever.d.ts +98 -0
- package/dest/archiver/l1/calldata_retriever.d.ts.map +1 -0
- package/dest/archiver/l1/calldata_retriever.js +403 -0
- package/dest/archiver/l1/data_retrieval.d.ts +87 -0
- package/dest/archiver/l1/data_retrieval.d.ts.map +1 -0
- package/dest/archiver/l1/data_retrieval.js +318 -0
- 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/data_retrieval.d.ts +1 -1
- 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 +3 -2
- package/dest/archiver/structs/published.d.ts.map +1 -1
- package/dest/archiver/validation.d.ts +10 -4
- package/dest/archiver/validation.d.ts.map +1 -1
- package/dest/archiver/validation.js +29 -21
- package/dest/factory.d.ts +3 -5
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +3 -2
- package/dest/index.d.ts +2 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -1
- package/dest/rpc/index.d.ts +2 -2
- package/dest/test/index.d.ts +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 +10 -9
- package/dest/test/mock_l2_block_source.d.ts +15 -10
- package/dest/test/mock_l2_block_source.d.ts.map +1 -1
- package/dest/test/mock_l2_block_source.js +22 -9
- 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 +18 -17
- package/src/archiver/archiver.ts +531 -345
- package/src/archiver/archiver_store.ts +24 -27
- package/src/archiver/archiver_store_test_suite.ts +151 -128
- package/src/archiver/config.ts +13 -7
- package/src/archiver/instrumentation.ts +16 -2
- package/src/archiver/kv_archiver_store/block_store.ts +18 -17
- 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 +23 -32
- package/src/archiver/kv_archiver_store/log_store.ts +4 -30
- 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 +531 -0
- package/src/archiver/{data_retrieval.ts → l1/data_retrieval.ts} +196 -250
- 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 +2 -1
- package/src/archiver/validation.ts +52 -27
- package/src/factory.ts +4 -5
- 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 +10 -9
- package/src/test/mock_l2_block_source.ts +32 -15
- 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
- package/dest/archiver/data_retrieval.js +0 -362
|
@@ -1,5 +1,6 @@
|
|
|
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';
|
|
@@ -12,7 +13,7 @@ import type {
|
|
|
12
13
|
UtilityFunctionWithMembershipProof,
|
|
13
14
|
} from '@aztec/stdlib/contract';
|
|
14
15
|
import type { GetContractClassLogsResponse, GetPublicLogsResponse } from '@aztec/stdlib/interfaces/client';
|
|
15
|
-
import type { LogFilter,
|
|
16
|
+
import type { LogFilter, TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
16
17
|
import { BlockHeader, type IndexedTxEffect, type TxHash, type TxReceipt } from '@aztec/stdlib/tx';
|
|
17
18
|
import type { UInt64 } from '@aztec/stdlib/types';
|
|
18
19
|
|
|
@@ -53,13 +54,13 @@ export interface ArchiverDataStore {
|
|
|
53
54
|
* @param blocksToUnwind - The number of blocks we are to unwind
|
|
54
55
|
* @returns True if the operation is successful
|
|
55
56
|
*/
|
|
56
|
-
unwindBlocks(from:
|
|
57
|
+
unwindBlocks(from: BlockNumber, blocksToUnwind: number): Promise<boolean>;
|
|
57
58
|
|
|
58
59
|
/**
|
|
59
60
|
* Returns the block for the given number, or undefined if not exists.
|
|
60
61
|
* @param number - The block number to return.
|
|
61
62
|
*/
|
|
62
|
-
getPublishedBlock(number:
|
|
63
|
+
getPublishedBlock(number: BlockNumber): Promise<PublishedL2Block | undefined>;
|
|
63
64
|
|
|
64
65
|
/**
|
|
65
66
|
* Returns the block for the given hash, or undefined if not exists.
|
|
@@ -79,7 +80,7 @@ export interface ArchiverDataStore {
|
|
|
79
80
|
* @param limit - The number of blocks to return.
|
|
80
81
|
* @returns The requested L2 blocks.
|
|
81
82
|
*/
|
|
82
|
-
getPublishedBlocks(from:
|
|
83
|
+
getPublishedBlocks(from: BlockNumber, limit: number): Promise<PublishedL2Block[]>;
|
|
83
84
|
|
|
84
85
|
/**
|
|
85
86
|
* Gets up to `limit` amount of L2 block headers starting from `from`.
|
|
@@ -87,7 +88,7 @@ export interface ArchiverDataStore {
|
|
|
87
88
|
* @param limit - The number of blocks to return.
|
|
88
89
|
* @returns The requested L2 block headers.
|
|
89
90
|
*/
|
|
90
|
-
getBlockHeaders(from:
|
|
91
|
+
getBlockHeaders(from: BlockNumber, limit: number): Promise<BlockHeader[]>;
|
|
91
92
|
|
|
92
93
|
/**
|
|
93
94
|
* Returns the block header for the given hash, or undefined if not exists.
|
|
@@ -131,11 +132,11 @@ export interface ArchiverDataStore {
|
|
|
131
132
|
addL1ToL2Messages(messages: InboxMessage[]): Promise<void>;
|
|
132
133
|
|
|
133
134
|
/**
|
|
134
|
-
* Gets L1 to L2 message (to be) included in a given
|
|
135
|
-
* @param
|
|
135
|
+
* Gets L1 to L2 message (to be) included in a given checkpoint.
|
|
136
|
+
* @param checkpointNumber - Checkpoint number to get messages for.
|
|
136
137
|
* @returns The L1 to L2 messages/leaves of the messages subtree (throws if not found).
|
|
137
138
|
*/
|
|
138
|
-
getL1ToL2Messages(
|
|
139
|
+
getL1ToL2Messages(checkpointNumber: CheckpointNumber): Promise<Fr[]>;
|
|
139
140
|
|
|
140
141
|
/**
|
|
141
142
|
* Gets the L1 to L2 message index in the L1 to L2 message tree.
|
|
@@ -150,14 +151,6 @@ export interface ArchiverDataStore {
|
|
|
150
151
|
*/
|
|
151
152
|
getTotalL1ToL2MessageCount(): Promise<bigint>;
|
|
152
153
|
|
|
153
|
-
/**
|
|
154
|
-
* Retrieves all private logs from up to `limit` blocks, starting from the block number `from`.
|
|
155
|
-
* @param from - The block number from which to begin retrieving logs.
|
|
156
|
-
* @param limit - The maximum number of blocks to retrieve logs from.
|
|
157
|
-
* @returns An array of private logs from the specified range of blocks.
|
|
158
|
-
*/
|
|
159
|
-
getPrivateLogs(from: number, limit: number): Promise<PrivateLog[]>;
|
|
160
|
-
|
|
161
154
|
/**
|
|
162
155
|
* Gets all logs that match any of the received tags (i.e. logs with their first field equal to a tag).
|
|
163
156
|
* @param tags - The tags to filter the logs by.
|
|
@@ -185,19 +178,19 @@ export interface ArchiverDataStore {
|
|
|
185
178
|
* Gets the number of the latest L2 block processed.
|
|
186
179
|
* @returns The number of the latest L2 block processed.
|
|
187
180
|
*/
|
|
188
|
-
getSynchedL2BlockNumber(): Promise<
|
|
181
|
+
getSynchedL2BlockNumber(): Promise<BlockNumber>;
|
|
189
182
|
|
|
190
183
|
/**
|
|
191
184
|
* Gets the number of the latest proven L2 block processed.
|
|
192
185
|
* @returns The number of the latest proven L2 block processed.
|
|
193
186
|
*/
|
|
194
|
-
getProvenL2BlockNumber(): Promise<
|
|
187
|
+
getProvenL2BlockNumber(): Promise<BlockNumber>;
|
|
195
188
|
|
|
196
189
|
/**
|
|
197
190
|
* Stores the number of the latest proven L2 block processed.
|
|
198
191
|
* @param l2BlockNumber - The number of the latest proven L2 block processed.
|
|
199
192
|
*/
|
|
200
|
-
setProvenL2BlockNumber(l2BlockNumber:
|
|
193
|
+
setProvenL2BlockNumber(l2BlockNumber: BlockNumber): Promise<void>;
|
|
201
194
|
|
|
202
195
|
/**
|
|
203
196
|
* Stores the l1 block number that blocks have been synched until
|
|
@@ -221,9 +214,13 @@ export interface ArchiverDataStore {
|
|
|
221
214
|
* @param blockNumber - Number of the L2 block the contracts were registered in.
|
|
222
215
|
* @returns True if the operation is successful.
|
|
223
216
|
*/
|
|
224
|
-
addContractClasses(
|
|
217
|
+
addContractClasses(
|
|
218
|
+
data: ContractClassPublic[],
|
|
219
|
+
bytecodeCommitments: Fr[],
|
|
220
|
+
blockNumber: BlockNumber,
|
|
221
|
+
): Promise<boolean>;
|
|
225
222
|
|
|
226
|
-
deleteContractClasses(data: ContractClassPublic[], blockNumber:
|
|
223
|
+
deleteContractClasses(data: ContractClassPublic[], blockNumber: BlockNumber): Promise<boolean>;
|
|
227
224
|
|
|
228
225
|
getBytecodeCommitment(contractClassId: Fr): Promise<Fr | undefined>;
|
|
229
226
|
|
|
@@ -239,8 +236,8 @@ export interface ArchiverDataStore {
|
|
|
239
236
|
* @param blockNumber - Number of the L2 block the instances were deployed in.
|
|
240
237
|
* @returns True if the operation is successful.
|
|
241
238
|
*/
|
|
242
|
-
addContractInstances(data: ContractInstanceWithAddress[], blockNumber:
|
|
243
|
-
deleteContractInstances(data: ContractInstanceWithAddress[], blockNumber:
|
|
239
|
+
addContractInstances(data: ContractInstanceWithAddress[], blockNumber: BlockNumber): Promise<boolean>;
|
|
240
|
+
deleteContractInstances(data: ContractInstanceWithAddress[], blockNumber: BlockNumber): Promise<boolean>;
|
|
244
241
|
|
|
245
242
|
/**
|
|
246
243
|
* Add new contract instance updates
|
|
@@ -285,8 +282,8 @@ export interface ArchiverDataStore {
|
|
|
285
282
|
/** Closes the underlying data store. */
|
|
286
283
|
close(): Promise<void>;
|
|
287
284
|
|
|
288
|
-
/** Deletes all L1 to L2 messages up until (excluding) the target
|
|
289
|
-
|
|
285
|
+
/** Deletes all L1 to L2 messages up until (excluding) the target checkpoint number. */
|
|
286
|
+
rollbackL1ToL2MessagesToCheckpoint(targetCheckpointNumber: CheckpointNumber): Promise<void>;
|
|
290
287
|
|
|
291
288
|
/** Returns an async iterator to all L1 to L2 messages on the range. */
|
|
292
289
|
iterateL1ToL2Messages(range?: CustomRange<bigint>): AsyncIterableIterator<InboxMessage>;
|