@aztec/archiver 0.0.1-commit.96bb3f7 → 0.0.1-commit.993d240
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 +164 -22
- package/dest/archiver.d.ts +158 -0
- package/dest/archiver.d.ts.map +1 -0
- package/dest/archiver.js +881 -0
- package/dest/config.d.ts +33 -0
- package/dest/config.d.ts.map +1 -0
- package/dest/{archiver/config.js → config.js} +31 -14
- package/dest/errors.d.ts +87 -0
- package/dest/errors.d.ts.map +1 -0
- package/dest/errors.js +129 -0
- package/dest/factory.d.ts +16 -10
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +112 -20
- package/dest/index.d.ts +19 -4
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +17 -3
- package/dest/interfaces.d.ts +9 -0
- package/dest/interfaces.d.ts.map +1 -0
- package/dest/interfaces.js +3 -0
- package/dest/{archiver/l1 → l1}/bin/retrieve-calldata.d.ts +1 -1
- package/dest/l1/bin/retrieve-calldata.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/bin/retrieve-calldata.js +35 -32
- package/dest/l1/calldata_retriever.d.ts +136 -0
- package/dest/l1/calldata_retriever.d.ts.map +1 -0
- package/dest/l1/calldata_retriever.js +412 -0
- package/dest/l1/data_retrieval.d.ts +97 -0
- package/dest/l1/data_retrieval.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/data_retrieval.js +65 -89
- package/dest/{archiver/l1 → l1}/debug_tx.d.ts +1 -1
- package/dest/l1/debug_tx.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/spire_proposer.d.ts +5 -5
- package/dest/l1/spire_proposer.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/spire_proposer.js +9 -17
- package/dest/l1/trace_tx.d.ts +43 -0
- package/dest/l1/trace_tx.d.ts.map +1 -0
- package/dest/l1/types.d.ts +12 -0
- package/dest/l1/types.d.ts.map +1 -0
- package/dest/l1/validate_historical_logs.d.ts +23 -0
- package/dest/l1/validate_historical_logs.d.ts.map +1 -0
- package/dest/l1/validate_historical_logs.js +108 -0
- package/dest/{archiver/l1 → l1}/validate_trace.d.ts +6 -3
- package/dest/l1/validate_trace.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/validate_trace.js +13 -9
- package/dest/modules/contract_data_source_adapter.d.ts +25 -0
- package/dest/modules/contract_data_source_adapter.d.ts.map +1 -0
- package/dest/modules/contract_data_source_adapter.js +40 -0
- package/dest/modules/data_source_base.d.ts +113 -0
- package/dest/modules/data_source_base.d.ts.map +1 -0
- package/dest/modules/data_source_base.js +351 -0
- package/dest/modules/data_store_updater.d.ts +105 -0
- package/dest/modules/data_store_updater.d.ts.map +1 -0
- package/dest/modules/data_store_updater.js +392 -0
- package/dest/modules/instrumentation.d.ts +55 -0
- package/dest/modules/instrumentation.d.ts.map +1 -0
- package/dest/{archiver → modules}/instrumentation.js +61 -19
- package/dest/modules/l1_synchronizer.d.ts +77 -0
- package/dest/modules/l1_synchronizer.d.ts.map +1 -0
- package/dest/modules/l1_synchronizer.js +1344 -0
- package/dest/modules/validation.d.ts +18 -0
- package/dest/modules/validation.d.ts.map +1 -0
- package/dest/{archiver → modules}/validation.js +12 -6
- package/dest/store/block_store.d.ts +300 -0
- package/dest/store/block_store.d.ts.map +1 -0
- package/dest/store/block_store.js +1219 -0
- package/dest/store/contract_class_store.d.ts +31 -0
- package/dest/store/contract_class_store.d.ts.map +1 -0
- package/dest/store/contract_class_store.js +80 -0
- package/dest/store/contract_instance_store.d.ts +51 -0
- package/dest/store/contract_instance_store.d.ts.map +1 -0
- package/dest/{archiver/kv_archiver_store → store}/contract_instance_store.js +38 -3
- package/dest/store/data_stores.d.ts +68 -0
- package/dest/store/data_stores.d.ts.map +1 -0
- package/dest/store/data_stores.js +54 -0
- package/dest/store/function_names_cache.d.ts +17 -0
- package/dest/store/function_names_cache.d.ts.map +1 -0
- package/dest/store/function_names_cache.js +30 -0
- package/dest/store/l2_tips_cache.d.ts +25 -0
- package/dest/store/l2_tips_cache.d.ts.map +1 -0
- package/dest/store/l2_tips_cache.js +26 -0
- package/dest/store/log_store.d.ts +59 -0
- package/dest/store/log_store.d.ts.map +1 -0
- package/dest/store/log_store.js +310 -0
- package/dest/store/log_store_codec.d.ts +70 -0
- package/dest/store/log_store_codec.d.ts.map +1 -0
- package/dest/store/log_store_codec.js +101 -0
- package/dest/store/message_store.d.ts +50 -0
- package/dest/store/message_store.d.ts.map +1 -0
- package/dest/{archiver/kv_archiver_store → store}/message_store.js +51 -9
- package/dest/{archiver/structs → structs}/data_retrieval.d.ts +1 -1
- package/dest/structs/data_retrieval.d.ts.map +1 -0
- package/dest/structs/inbox_message.d.ts +15 -0
- package/dest/structs/inbox_message.d.ts.map +1 -0
- package/dest/{archiver/structs → structs}/published.d.ts +1 -1
- package/dest/structs/published.d.ts.map +1 -0
- package/dest/test/fake_l1_state.d.ts +214 -0
- package/dest/test/fake_l1_state.d.ts.map +1 -0
- package/dest/test/fake_l1_state.js +517 -0
- package/dest/test/index.d.ts +2 -1
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +4 -1
- package/dest/test/mock_archiver.d.ts +2 -2
- package/dest/test/mock_archiver.d.ts.map +1 -1
- package/dest/test/mock_archiver.js +3 -3
- package/dest/test/mock_l1_to_l2_message_source.d.ts +1 -1
- package/dest/test/mock_l1_to_l2_message_source.d.ts.map +1 -1
- package/dest/test/mock_l1_to_l2_message_source.js +2 -1
- package/dest/test/mock_l2_block_source.d.ts +65 -41
- package/dest/test/mock_l2_block_source.d.ts.map +1 -1
- package/dest/test/mock_l2_block_source.js +330 -151
- package/dest/test/mock_structs.d.ts +81 -3
- package/dest/test/mock_structs.d.ts.map +1 -1
- package/dest/test/mock_structs.js +152 -7
- package/dest/test/noop_l1_archiver.d.ts +29 -0
- package/dest/test/noop_l1_archiver.d.ts.map +1 -0
- package/dest/test/noop_l1_archiver.js +85 -0
- package/package.json +17 -18
- package/src/archiver.ts +681 -0
- package/src/{archiver/config.ts → config.ts} +43 -12
- package/src/errors.ts +203 -0
- package/src/factory.ts +175 -22
- package/src/index.ts +27 -3
- package/src/interfaces.ts +9 -0
- package/src/l1/README.md +55 -0
- package/src/{archiver/l1 → l1}/bin/retrieve-calldata.ts +45 -33
- package/src/l1/calldata_retriever.ts +522 -0
- package/src/{archiver/l1 → l1}/data_retrieval.ts +106 -134
- package/src/{archiver/l1 → l1}/spire_proposer.ts +7 -15
- package/src/l1/validate_historical_logs.ts +140 -0
- package/src/{archiver/l1 → l1}/validate_trace.ts +24 -6
- package/src/modules/contract_data_source_adapter.ts +55 -0
- package/src/modules/data_source_base.ts +493 -0
- package/src/modules/data_store_updater.ts +518 -0
- package/src/{archiver → modules}/instrumentation.ts +72 -20
- package/src/modules/l1_synchronizer.ts +1257 -0
- package/src/{archiver → modules}/validation.ts +15 -9
- package/src/store/block_store.ts +1590 -0
- package/src/store/contract_class_store.ts +108 -0
- package/src/{archiver/kv_archiver_store → store}/contract_instance_store.ts +52 -6
- package/src/store/data_stores.ts +104 -0
- package/src/store/function_names_cache.ts +37 -0
- package/src/store/l2_tips_cache.ts +35 -0
- package/src/store/log_store.ts +379 -0
- package/src/store/log_store_codec.ts +132 -0
- package/src/{archiver/kv_archiver_store → store}/message_store.ts +60 -10
- package/src/{archiver/structs → structs}/inbox_message.ts +1 -1
- package/src/test/fake_l1_state.ts +770 -0
- package/src/test/index.ts +4 -0
- package/src/test/mock_archiver.ts +4 -3
- package/src/test/mock_l1_to_l2_message_source.ts +1 -0
- package/src/test/mock_l2_block_source.ts +403 -171
- package/src/test/mock_structs.ts +283 -8
- package/src/test/noop_l1_archiver.ts +139 -0
- package/dest/archiver/archiver.d.ts +0 -307
- package/dest/archiver/archiver.d.ts.map +0 -1
- package/dest/archiver/archiver.js +0 -2102
- package/dest/archiver/archiver_store.d.ts +0 -315
- package/dest/archiver/archiver_store.d.ts.map +0 -1
- package/dest/archiver/archiver_store.js +0 -4
- package/dest/archiver/archiver_store_test_suite.d.ts +0 -8
- package/dest/archiver/archiver_store_test_suite.d.ts.map +0 -1
- package/dest/archiver/archiver_store_test_suite.js +0 -2770
- package/dest/archiver/config.d.ts +0 -22
- package/dest/archiver/config.d.ts.map +0 -1
- package/dest/archiver/errors.d.ts +0 -36
- package/dest/archiver/errors.d.ts.map +0 -1
- package/dest/archiver/errors.js +0 -54
- package/dest/archiver/index.d.ts +0 -7
- package/dest/archiver/index.d.ts.map +0 -1
- package/dest/archiver/index.js +0 -4
- package/dest/archiver/instrumentation.d.ts +0 -37
- package/dest/archiver/instrumentation.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/block_store.d.ts +0 -164
- package/dest/archiver/kv_archiver_store/block_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/block_store.js +0 -626
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts +0 -18
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/contract_class_store.js +0 -120
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts +0 -24
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +0 -159
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.js +0 -316
- package/dest/archiver/kv_archiver_store/log_store.d.ts +0 -45
- package/dest/archiver/kv_archiver_store/log_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/log_store.js +0 -401
- package/dest/archiver/kv_archiver_store/message_store.d.ts +0 -40
- package/dest/archiver/kv_archiver_store/message_store.d.ts.map +0 -1
- package/dest/archiver/l1/bin/retrieve-calldata.d.ts.map +0 -1
- package/dest/archiver/l1/calldata_retriever.d.ts +0 -112
- package/dest/archiver/l1/calldata_retriever.d.ts.map +0 -1
- package/dest/archiver/l1/calldata_retriever.js +0 -471
- package/dest/archiver/l1/data_retrieval.d.ts +0 -90
- package/dest/archiver/l1/data_retrieval.d.ts.map +0 -1
- package/dest/archiver/l1/debug_tx.d.ts.map +0 -1
- package/dest/archiver/l1/spire_proposer.d.ts.map +0 -1
- package/dest/archiver/l1/trace_tx.d.ts +0 -97
- package/dest/archiver/l1/trace_tx.d.ts.map +0 -1
- package/dest/archiver/l1/types.d.ts +0 -12
- package/dest/archiver/l1/types.d.ts.map +0 -1
- package/dest/archiver/l1/validate_trace.d.ts.map +0 -1
- package/dest/archiver/structs/data_retrieval.d.ts.map +0 -1
- package/dest/archiver/structs/inbox_message.d.ts +0 -15
- package/dest/archiver/structs/inbox_message.d.ts.map +0 -1
- package/dest/archiver/structs/published.d.ts.map +0 -1
- package/dest/archiver/validation.d.ts +0 -17
- package/dest/archiver/validation.d.ts.map +0 -1
- package/dest/rpc/index.d.ts +0 -9
- package/dest/rpc/index.d.ts.map +0 -1
- package/dest/rpc/index.js +0 -15
- package/src/archiver/archiver.ts +0 -2265
- package/src/archiver/archiver_store.ts +0 -380
- package/src/archiver/archiver_store_test_suite.ts +0 -2842
- package/src/archiver/errors.ts +0 -90
- package/src/archiver/index.ts +0 -6
- package/src/archiver/kv_archiver_store/block_store.ts +0 -850
- package/src/archiver/kv_archiver_store/contract_class_store.ts +0 -176
- package/src/archiver/kv_archiver_store/kv_archiver_store.ts +0 -442
- package/src/archiver/kv_archiver_store/log_store.ts +0 -516
- package/src/archiver/l1/README.md +0 -98
- package/src/archiver/l1/calldata_retriever.ts +0 -641
- package/src/rpc/index.ts +0 -16
- /package/dest/{archiver/l1 → l1}/debug_tx.js +0 -0
- /package/dest/{archiver/l1 → l1}/trace_tx.js +0 -0
- /package/dest/{archiver/l1 → l1}/types.js +0 -0
- /package/dest/{archiver/structs → structs}/data_retrieval.js +0 -0
- /package/dest/{archiver/structs → structs}/inbox_message.js +0 -0
- /package/dest/{archiver/structs → structs}/published.js +0 -0
- /package/src/{archiver/l1 → l1}/debug_tx.ts +0 -0
- /package/src/{archiver/l1 → l1}/trace_tx.ts +0 -0
- /package/src/{archiver/l1 → l1}/types.ts +0 -0
- /package/src/{archiver/structs → structs}/data_retrieval.ts +0 -0
- /package/src/{archiver/structs → structs}/published.ts +0 -0
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
2
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
-
import { L2BlockNew } from '@aztec/stdlib/block';
|
|
4
|
-
import type { GetContractClassLogsResponse, GetPublicLogsResponse } from '@aztec/stdlib/interfaces/client';
|
|
5
|
-
import { type LogFilter, type SiloedTag, Tag, TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
6
|
-
import type { BlockStore } from './block_store.js';
|
|
7
|
-
/**
|
|
8
|
-
* A store for logs
|
|
9
|
-
*/
|
|
10
|
-
export declare class LogStore {
|
|
11
|
-
#private;
|
|
12
|
-
private db;
|
|
13
|
-
private blockStore;
|
|
14
|
-
constructor(db: AztecAsyncKVStore, blockStore: BlockStore, logsMaxPageSize?: number);
|
|
15
|
-
/**
|
|
16
|
-
* Append new logs to the store's list.
|
|
17
|
-
* @param blocks - The blocks for which to add the logs.
|
|
18
|
-
* @returns True if the operation is successful.
|
|
19
|
-
*/
|
|
20
|
-
addLogs(blocks: L2BlockNew[]): Promise<boolean>;
|
|
21
|
-
deleteLogs(blocks: L2BlockNew[]): Promise<boolean>;
|
|
22
|
-
/**
|
|
23
|
-
* Gets all private logs that match any of the `tags`. For each tag, an array of matching logs is returned. An empty
|
|
24
|
-
* array implies no logs match that tag.
|
|
25
|
-
*/
|
|
26
|
-
getPrivateLogsByTags(tags: SiloedTag[]): Promise<TxScopedL2Log[][]>;
|
|
27
|
-
/**
|
|
28
|
-
* Gets all public logs that match any of the `tags` from the specified contract. For each tag, an array of matching
|
|
29
|
-
* logs is returned. An empty array implies no logs match that tag.
|
|
30
|
-
*/
|
|
31
|
-
getPublicLogsByTagsFromContract(contractAddress: AztecAddress, tags: Tag[]): Promise<TxScopedL2Log[][]>;
|
|
32
|
-
/**
|
|
33
|
-
* Gets public logs based on the provided filter.
|
|
34
|
-
* @param filter - The filter to apply to the logs.
|
|
35
|
-
* @returns The requested logs.
|
|
36
|
-
*/
|
|
37
|
-
getPublicLogs(filter: LogFilter): Promise<GetPublicLogsResponse>;
|
|
38
|
-
/**
|
|
39
|
-
* Gets contract class logs based on the provided filter.
|
|
40
|
-
* @param filter - The filter to apply to the logs.
|
|
41
|
-
* @returns The requested logs.
|
|
42
|
-
*/
|
|
43
|
-
getContractClassLogs(filter: LogFilter): Promise<GetContractClassLogsResponse>;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nX3N0b3JlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXJjaGl2ZXIva3ZfYXJjaGl2ZXJfc3RvcmUvbG9nX3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUtBLE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFpQixNQUFNLGlCQUFpQixDQUFDO0FBQ3hFLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ2hFLE9BQU8sRUFBZSxVQUFVLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUM5RCxPQUFPLEtBQUssRUFBRSw0QkFBNEIsRUFBRSxxQkFBcUIsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQzNHLE9BQU8sRUFJTCxLQUFLLFNBQVMsRUFHZCxLQUFLLFNBQVMsRUFDZCxHQUFHLEVBQ0gsYUFBYSxFQUNkLE1BQU0sb0JBQW9CLENBQUM7QUFFNUIsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFbkQ7O0dBRUc7QUFDSCxxQkFBYSxRQUFROztJQWF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,OAAO,EAAe,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC3G,OAAO,EAIL,KAAK,SAAS,EAGd,KAAK,SAAS,EACd,GAAG,EACH,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,qBAAa,QAAQ;;IAajB,OAAO,CAAC,EAAE;IACV,OAAO,CAAC,UAAU;IAFpB,YACU,EAAE,EAAE,iBAAiB,EACrB,UAAU,EAAE,UAAU,EAC9B,eAAe,GAAE,MAAa,EAU/B;IA+FD;;;;OAIG;IACH,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAmF9C;IAgBD,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CA2BjD;IAED;;;OAGG;IACG,oBAAoB,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAIxE;IAED;;;OAGG;IACG,+BAA+B,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAQ5G;IAED;;;;OAIG;IACH,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAQ/D;IA6ED;;;;OAIG;IACH,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAQ7E;CA6GF"}
|
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
import { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
2
|
-
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
|
-
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
-
import { BufferReader, numToUInt32BE } from '@aztec/foundation/serialize';
|
|
6
|
-
import { L2BlockHash } from '@aztec/stdlib/block';
|
|
7
|
-
import { ContractClassLog, ExtendedContractClassLog, ExtendedPublicLog, LogId, PublicLog, TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
8
|
-
/**
|
|
9
|
-
* A store for logs
|
|
10
|
-
*/ export class LogStore {
|
|
11
|
-
db;
|
|
12
|
-
blockStore;
|
|
13
|
-
// `tag` --> private logs
|
|
14
|
-
#privateLogsByTag;
|
|
15
|
-
// `{contractAddress}_${tag}` --> public logs
|
|
16
|
-
#publicLogsByContractAndTag;
|
|
17
|
-
#privateLogKeysByBlock;
|
|
18
|
-
#publicLogKeysByBlock;
|
|
19
|
-
#publicLogsByBlock;
|
|
20
|
-
#contractClassLogsByBlock;
|
|
21
|
-
#logsMaxPageSize;
|
|
22
|
-
#log;
|
|
23
|
-
constructor(db, blockStore, logsMaxPageSize = 1000){
|
|
24
|
-
this.db = db;
|
|
25
|
-
this.blockStore = blockStore;
|
|
26
|
-
this.#log = createLogger('archiver:log_store');
|
|
27
|
-
this.#privateLogsByTag = db.openMap('archiver_private_tagged_logs_by_tag');
|
|
28
|
-
this.#publicLogsByContractAndTag = db.openMap('archiver_public_tagged_logs_by_tag');
|
|
29
|
-
this.#privateLogKeysByBlock = db.openMap('archiver_private_log_keys_by_block');
|
|
30
|
-
this.#publicLogKeysByBlock = db.openMap('archiver_public_log_keys_by_block');
|
|
31
|
-
this.#publicLogsByBlock = db.openMap('archiver_public_logs_by_block');
|
|
32
|
-
this.#contractClassLogsByBlock = db.openMap('archiver_contract_class_logs_by_block');
|
|
33
|
-
this.#logsMaxPageSize = logsMaxPageSize;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Extracts tagged logs from a single block, grouping them into private and public maps.
|
|
37
|
-
*
|
|
38
|
-
* @param block - The L2 block to extract logs from.
|
|
39
|
-
* @returns An object containing the private and public tagged logs for the block.
|
|
40
|
-
*/ #extractTaggedLogsFromBlock(block) {
|
|
41
|
-
// SiloedTag (as string) -> array of log buffers.
|
|
42
|
-
const privateTaggedLogs = new Map();
|
|
43
|
-
// "{contractAddress}_{tag}" (as string) -> array of log buffers.
|
|
44
|
-
const publicTaggedLogs = new Map();
|
|
45
|
-
block.body.txEffects.forEach((txEffect)=>{
|
|
46
|
-
const txHash = txEffect.txHash;
|
|
47
|
-
txEffect.privateLogs.forEach((log)=>{
|
|
48
|
-
// Private logs use SiloedTag (already siloed by kernel)
|
|
49
|
-
const tag = log.fields[0];
|
|
50
|
-
this.#log.debug(`Found private log with tag ${tag.toString()} in block ${block.number}`);
|
|
51
|
-
const currentLogs = privateTaggedLogs.get(tag.toString()) ?? [];
|
|
52
|
-
currentLogs.push(new TxScopedL2Log(txHash, block.number, block.timestamp, log.getEmittedFields(), txEffect.noteHashes, txEffect.nullifiers[0]).toBuffer());
|
|
53
|
-
privateTaggedLogs.set(tag.toString(), currentLogs);
|
|
54
|
-
});
|
|
55
|
-
txEffect.publicLogs.forEach((log)=>{
|
|
56
|
-
// Public logs use Tag directly (not siloed) and are stored with contract address
|
|
57
|
-
const tag = log.fields[0];
|
|
58
|
-
const contractAddress = log.contractAddress;
|
|
59
|
-
const key = `${contractAddress.toString()}_${tag.toString()}`;
|
|
60
|
-
this.#log.debug(`Found public log with tag ${tag.toString()} from contract ${contractAddress.toString()} in block ${block.number}`);
|
|
61
|
-
const currentLogs = publicTaggedLogs.get(key) ?? [];
|
|
62
|
-
currentLogs.push(new TxScopedL2Log(txHash, block.number, block.timestamp, log.getEmittedFields(), txEffect.noteHashes, txEffect.nullifiers[0]).toBuffer());
|
|
63
|
-
publicTaggedLogs.set(key, currentLogs);
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
return {
|
|
67
|
-
privateTaggedLogs,
|
|
68
|
-
publicTaggedLogs
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Extracts and aggregates tagged logs from a list of blocks.
|
|
73
|
-
* @param blocks - The blocks to extract logs from.
|
|
74
|
-
* @returns A map from tag (as string) to an array of serialized private logs belonging to that tag, and a map from
|
|
75
|
-
* "{contractAddress}_{tag}" (as string) to an array of serialized public logs belonging to that key.
|
|
76
|
-
*/ #extractTaggedLogs(blocks) {
|
|
77
|
-
const taggedLogsInBlocks = blocks.map((block)=>this.#extractTaggedLogsFromBlock(block));
|
|
78
|
-
// Now we merge the maps from each block into a single map.
|
|
79
|
-
const privateTaggedLogs = taggedLogsInBlocks.reduce((acc, { privateTaggedLogs })=>{
|
|
80
|
-
for (const [tag, logs] of privateTaggedLogs.entries()){
|
|
81
|
-
const currentLogs = acc.get(tag) ?? [];
|
|
82
|
-
acc.set(tag, currentLogs.concat(logs));
|
|
83
|
-
}
|
|
84
|
-
return acc;
|
|
85
|
-
}, new Map());
|
|
86
|
-
const publicTaggedLogs = taggedLogsInBlocks.reduce((acc, { publicTaggedLogs })=>{
|
|
87
|
-
for (const [key, logs] of publicTaggedLogs.entries()){
|
|
88
|
-
const currentLogs = acc.get(key) ?? [];
|
|
89
|
-
acc.set(key, currentLogs.concat(logs));
|
|
90
|
-
}
|
|
91
|
-
return acc;
|
|
92
|
-
}, new Map());
|
|
93
|
-
return {
|
|
94
|
-
privateTaggedLogs,
|
|
95
|
-
publicTaggedLogs
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Append new logs to the store's list.
|
|
100
|
-
* @param blocks - The blocks for which to add the logs.
|
|
101
|
-
* @returns True if the operation is successful.
|
|
102
|
-
*/ addLogs(blocks) {
|
|
103
|
-
const { privateTaggedLogs, publicTaggedLogs } = this.#extractTaggedLogs(blocks);
|
|
104
|
-
const keysOfPrivateLogsToUpdate = Array.from(privateTaggedLogs.keys());
|
|
105
|
-
const keysOfPublicLogsToUpdate = Array.from(publicTaggedLogs.keys());
|
|
106
|
-
return this.db.transactionAsync(async ()=>{
|
|
107
|
-
const currentPrivateTaggedLogs = await Promise.all(keysOfPrivateLogsToUpdate.map(async (key)=>({
|
|
108
|
-
tag: key,
|
|
109
|
-
logBuffers: await this.#privateLogsByTag.getAsync(key)
|
|
110
|
-
})));
|
|
111
|
-
currentPrivateTaggedLogs.forEach((taggedLogBuffer)=>{
|
|
112
|
-
if (taggedLogBuffer.logBuffers && taggedLogBuffer.logBuffers.length > 0) {
|
|
113
|
-
privateTaggedLogs.set(taggedLogBuffer.tag, taggedLogBuffer.logBuffers.concat(privateTaggedLogs.get(taggedLogBuffer.tag)));
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
const currentPublicTaggedLogs = await Promise.all(keysOfPublicLogsToUpdate.map(async (key)=>({
|
|
117
|
-
key,
|
|
118
|
-
logBuffers: await this.#publicLogsByContractAndTag.getAsync(key)
|
|
119
|
-
})));
|
|
120
|
-
currentPublicTaggedLogs.forEach((taggedLogBuffer)=>{
|
|
121
|
-
if (taggedLogBuffer.logBuffers && taggedLogBuffer.logBuffers.length > 0) {
|
|
122
|
-
publicTaggedLogs.set(taggedLogBuffer.key, taggedLogBuffer.logBuffers.concat(publicTaggedLogs.get(taggedLogBuffer.key)));
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
for (const block of blocks){
|
|
126
|
-
const blockHash = await block.hash();
|
|
127
|
-
const privateTagsInBlock = [];
|
|
128
|
-
for (const [tag, logs] of privateTaggedLogs.entries()){
|
|
129
|
-
await this.#privateLogsByTag.set(tag, logs);
|
|
130
|
-
privateTagsInBlock.push(tag);
|
|
131
|
-
}
|
|
132
|
-
await this.#privateLogKeysByBlock.set(block.number, privateTagsInBlock);
|
|
133
|
-
const publicKeysInBlock = [];
|
|
134
|
-
for (const [key, logs] of publicTaggedLogs.entries()){
|
|
135
|
-
await this.#publicLogsByContractAndTag.set(key, logs);
|
|
136
|
-
publicKeysInBlock.push(key);
|
|
137
|
-
}
|
|
138
|
-
await this.#publicLogKeysByBlock.set(block.number, publicKeysInBlock);
|
|
139
|
-
const publicLogsInBlock = block.body.txEffects.map((txEffect, txIndex)=>[
|
|
140
|
-
numToUInt32BE(txIndex),
|
|
141
|
-
numToUInt32BE(txEffect.publicLogs.length),
|
|
142
|
-
txEffect.publicLogs.map((log)=>log.toBuffer())
|
|
143
|
-
].flat()).flat();
|
|
144
|
-
const contractClassLogsInBlock = block.body.txEffects.map((txEffect, txIndex)=>[
|
|
145
|
-
numToUInt32BE(txIndex),
|
|
146
|
-
numToUInt32BE(txEffect.contractClassLogs.length),
|
|
147
|
-
txEffect.contractClassLogs.map((log)=>log.toBuffer())
|
|
148
|
-
].flat()).flat();
|
|
149
|
-
await this.#publicLogsByBlock.set(block.number, this.#packWithBlockHash(blockHash, publicLogsInBlock));
|
|
150
|
-
await this.#contractClassLogsByBlock.set(block.number, this.#packWithBlockHash(blockHash, contractClassLogsInBlock));
|
|
151
|
-
}
|
|
152
|
-
return true;
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
#packWithBlockHash(blockHash, data) {
|
|
156
|
-
return Buffer.concat([
|
|
157
|
-
blockHash.toBuffer(),
|
|
158
|
-
...data
|
|
159
|
-
]);
|
|
160
|
-
}
|
|
161
|
-
#unpackBlockHash(reader) {
|
|
162
|
-
const blockHash = reader.remainingBytes() > 0 ? reader.readObject(Fr) : undefined;
|
|
163
|
-
if (!blockHash) {
|
|
164
|
-
throw new Error('Failed to read block hash from log entry buffer');
|
|
165
|
-
}
|
|
166
|
-
return L2BlockHash.fromField(blockHash);
|
|
167
|
-
}
|
|
168
|
-
deleteLogs(blocks) {
|
|
169
|
-
return this.db.transactionAsync(async ()=>{
|
|
170
|
-
await Promise.all(blocks.map(async (block)=>{
|
|
171
|
-
// Delete private logs
|
|
172
|
-
const privateKeys = await this.#privateLogKeysByBlock.getAsync(block.number) ?? [];
|
|
173
|
-
await Promise.all(privateKeys.map((tag)=>this.#privateLogsByTag.delete(tag)));
|
|
174
|
-
// Delete public logs
|
|
175
|
-
const publicKeys = await this.#publicLogKeysByBlock.getAsync(block.number) ?? [];
|
|
176
|
-
await Promise.all(publicKeys.map((key)=>this.#publicLogsByContractAndTag.delete(key)));
|
|
177
|
-
}));
|
|
178
|
-
await Promise.all(blocks.map((block)=>Promise.all([
|
|
179
|
-
this.#publicLogsByBlock.delete(block.number),
|
|
180
|
-
this.#privateLogKeysByBlock.delete(block.number),
|
|
181
|
-
this.#publicLogKeysByBlock.delete(block.number),
|
|
182
|
-
this.#contractClassLogsByBlock.delete(block.number)
|
|
183
|
-
])));
|
|
184
|
-
return true;
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Gets all private logs that match any of the `tags`. For each tag, an array of matching logs is returned. An empty
|
|
189
|
-
* array implies no logs match that tag.
|
|
190
|
-
*/ async getPrivateLogsByTags(tags) {
|
|
191
|
-
const logs = await Promise.all(tags.map((tag)=>this.#privateLogsByTag.getAsync(tag.toString())));
|
|
192
|
-
return logs.map((logBuffers)=>logBuffers?.map((logBuffer)=>TxScopedL2Log.fromBuffer(logBuffer)) ?? []);
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Gets all public logs that match any of the `tags` from the specified contract. For each tag, an array of matching
|
|
196
|
-
* logs is returned. An empty array implies no logs match that tag.
|
|
197
|
-
*/ async getPublicLogsByTagsFromContract(contractAddress, tags) {
|
|
198
|
-
const logs = await Promise.all(tags.map((tag)=>{
|
|
199
|
-
const key = `${contractAddress.toString()}_${tag.value.toString()}`;
|
|
200
|
-
return this.#publicLogsByContractAndTag.getAsync(key);
|
|
201
|
-
}));
|
|
202
|
-
return logs.map((logBuffers)=>logBuffers?.map((logBuffer)=>TxScopedL2Log.fromBuffer(logBuffer)) ?? []);
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Gets public logs based on the provided filter.
|
|
206
|
-
* @param filter - The filter to apply to the logs.
|
|
207
|
-
* @returns The requested logs.
|
|
208
|
-
*/ getPublicLogs(filter) {
|
|
209
|
-
if (filter.afterLog) {
|
|
210
|
-
return this.#filterPublicLogsBetweenBlocks(filter);
|
|
211
|
-
} else if (filter.txHash) {
|
|
212
|
-
return this.#filterPublicLogsOfTx(filter);
|
|
213
|
-
} else {
|
|
214
|
-
return this.#filterPublicLogsBetweenBlocks(filter);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
async #filterPublicLogsOfTx(filter) {
|
|
218
|
-
if (!filter.txHash) {
|
|
219
|
-
throw new Error('Missing txHash');
|
|
220
|
-
}
|
|
221
|
-
const [blockNumber, txIndex] = await this.blockStore.getTxLocation(filter.txHash) ?? [];
|
|
222
|
-
if (typeof blockNumber !== 'number' || typeof txIndex !== 'number') {
|
|
223
|
-
return {
|
|
224
|
-
logs: [],
|
|
225
|
-
maxLogsHit: false
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
const buffer = await this.#publicLogsByBlock.getAsync(blockNumber) ?? Buffer.alloc(0);
|
|
229
|
-
const publicLogsInBlock = [
|
|
230
|
-
[]
|
|
231
|
-
];
|
|
232
|
-
const reader = new BufferReader(buffer);
|
|
233
|
-
const blockHash = this.#unpackBlockHash(reader);
|
|
234
|
-
while(reader.remainingBytes() > 0){
|
|
235
|
-
const indexOfTx = reader.readNumber();
|
|
236
|
-
const numLogsInTx = reader.readNumber();
|
|
237
|
-
publicLogsInBlock[indexOfTx] = [];
|
|
238
|
-
for(let i = 0; i < numLogsInTx; i++){
|
|
239
|
-
publicLogsInBlock[indexOfTx].push(reader.readObject(PublicLog));
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
const txLogs = publicLogsInBlock[txIndex];
|
|
243
|
-
const logs = [];
|
|
244
|
-
const maxLogsHit = this.#accumulateLogs(logs, blockNumber, blockHash, txIndex, txLogs, filter);
|
|
245
|
-
return {
|
|
246
|
-
logs,
|
|
247
|
-
maxLogsHit
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
async #filterPublicLogsBetweenBlocks(filter) {
|
|
251
|
-
const start = filter.afterLog?.blockNumber ?? Math.max(filter.fromBlock ?? INITIAL_L2_BLOCK_NUM, INITIAL_L2_BLOCK_NUM);
|
|
252
|
-
const end = filter.toBlock;
|
|
253
|
-
if (typeof end === 'number' && end < start) {
|
|
254
|
-
return {
|
|
255
|
-
logs: [],
|
|
256
|
-
maxLogsHit: true
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
const logs = [];
|
|
260
|
-
let maxLogsHit = false;
|
|
261
|
-
loopOverBlocks: for await (const [blockNumber, logBuffer] of this.#publicLogsByBlock.entriesAsync({
|
|
262
|
-
start,
|
|
263
|
-
end
|
|
264
|
-
})){
|
|
265
|
-
const publicLogsInBlock = [
|
|
266
|
-
[]
|
|
267
|
-
];
|
|
268
|
-
const reader = new BufferReader(logBuffer);
|
|
269
|
-
const blockHash = this.#unpackBlockHash(reader);
|
|
270
|
-
while(reader.remainingBytes() > 0){
|
|
271
|
-
const indexOfTx = reader.readNumber();
|
|
272
|
-
const numLogsInTx = reader.readNumber();
|
|
273
|
-
publicLogsInBlock[indexOfTx] = [];
|
|
274
|
-
for(let i = 0; i < numLogsInTx; i++){
|
|
275
|
-
publicLogsInBlock[indexOfTx].push(reader.readObject(PublicLog));
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
for(let txIndex = filter.afterLog?.txIndex ?? 0; txIndex < publicLogsInBlock.length; txIndex++){
|
|
279
|
-
const txLogs = publicLogsInBlock[txIndex];
|
|
280
|
-
maxLogsHit = this.#accumulateLogs(logs, blockNumber, blockHash, txIndex, txLogs, filter);
|
|
281
|
-
if (maxLogsHit) {
|
|
282
|
-
this.#log.debug(`Max logs hit at block ${blockNumber}`);
|
|
283
|
-
break loopOverBlocks;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
return {
|
|
288
|
-
logs,
|
|
289
|
-
maxLogsHit
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Gets contract class logs based on the provided filter.
|
|
294
|
-
* @param filter - The filter to apply to the logs.
|
|
295
|
-
* @returns The requested logs.
|
|
296
|
-
*/ getContractClassLogs(filter) {
|
|
297
|
-
if (filter.afterLog) {
|
|
298
|
-
return this.#filterContractClassLogsBetweenBlocks(filter);
|
|
299
|
-
} else if (filter.txHash) {
|
|
300
|
-
return this.#filterContractClassLogsOfTx(filter);
|
|
301
|
-
} else {
|
|
302
|
-
return this.#filterContractClassLogsBetweenBlocks(filter);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
async #filterContractClassLogsOfTx(filter) {
|
|
306
|
-
if (!filter.txHash) {
|
|
307
|
-
throw new Error('Missing txHash');
|
|
308
|
-
}
|
|
309
|
-
const [blockNumber, txIndex] = await this.blockStore.getTxLocation(filter.txHash) ?? [];
|
|
310
|
-
if (typeof blockNumber !== 'number' || typeof txIndex !== 'number') {
|
|
311
|
-
return {
|
|
312
|
-
logs: [],
|
|
313
|
-
maxLogsHit: false
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
const contractClassLogsBuffer = await this.#contractClassLogsByBlock.getAsync(blockNumber) ?? Buffer.alloc(0);
|
|
317
|
-
const contractClassLogsInBlock = [
|
|
318
|
-
[]
|
|
319
|
-
];
|
|
320
|
-
const reader = new BufferReader(contractClassLogsBuffer);
|
|
321
|
-
const blockHash = this.#unpackBlockHash(reader);
|
|
322
|
-
while(reader.remainingBytes() > 0){
|
|
323
|
-
const indexOfTx = reader.readNumber();
|
|
324
|
-
const numLogsInTx = reader.readNumber();
|
|
325
|
-
contractClassLogsInBlock[indexOfTx] = [];
|
|
326
|
-
for(let i = 0; i < numLogsInTx; i++){
|
|
327
|
-
contractClassLogsInBlock[indexOfTx].push(reader.readObject(ContractClassLog));
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
const txLogs = contractClassLogsInBlock[txIndex];
|
|
331
|
-
const logs = [];
|
|
332
|
-
const maxLogsHit = this.#accumulateLogs(logs, blockNumber, blockHash, txIndex, txLogs, filter);
|
|
333
|
-
return {
|
|
334
|
-
logs,
|
|
335
|
-
maxLogsHit
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
async #filterContractClassLogsBetweenBlocks(filter) {
|
|
339
|
-
const start = filter.afterLog?.blockNumber ?? Math.max(filter.fromBlock ?? INITIAL_L2_BLOCK_NUM, INITIAL_L2_BLOCK_NUM);
|
|
340
|
-
const end = filter.toBlock;
|
|
341
|
-
if (typeof end === 'number' && end < start) {
|
|
342
|
-
return {
|
|
343
|
-
logs: [],
|
|
344
|
-
maxLogsHit: true
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
const logs = [];
|
|
348
|
-
let maxLogsHit = false;
|
|
349
|
-
loopOverBlocks: for await (const [blockNumber, logBuffer] of this.#contractClassLogsByBlock.entriesAsync({
|
|
350
|
-
start,
|
|
351
|
-
end
|
|
352
|
-
})){
|
|
353
|
-
const contractClassLogsInBlock = [
|
|
354
|
-
[]
|
|
355
|
-
];
|
|
356
|
-
const reader = new BufferReader(logBuffer);
|
|
357
|
-
const blockHash = this.#unpackBlockHash(reader);
|
|
358
|
-
while(reader.remainingBytes() > 0){
|
|
359
|
-
const indexOfTx = reader.readNumber();
|
|
360
|
-
const numLogsInTx = reader.readNumber();
|
|
361
|
-
contractClassLogsInBlock[indexOfTx] = [];
|
|
362
|
-
for(let i = 0; i < numLogsInTx; i++){
|
|
363
|
-
contractClassLogsInBlock[indexOfTx].push(reader.readObject(ContractClassLog));
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
for(let txIndex = filter.afterLog?.txIndex ?? 0; txIndex < contractClassLogsInBlock.length; txIndex++){
|
|
367
|
-
const txLogs = contractClassLogsInBlock[txIndex];
|
|
368
|
-
maxLogsHit = this.#accumulateLogs(logs, blockNumber, blockHash, txIndex, txLogs, filter);
|
|
369
|
-
if (maxLogsHit) {
|
|
370
|
-
this.#log.debug(`Max logs hit at block ${blockNumber}`);
|
|
371
|
-
break loopOverBlocks;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
return {
|
|
376
|
-
logs,
|
|
377
|
-
maxLogsHit
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
#accumulateLogs(results, blockNumber, blockHash, txIndex, txLogs, filter = {}) {
|
|
381
|
-
let maxLogsHit = false;
|
|
382
|
-
let logIndex = typeof filter.afterLog?.logIndex === 'number' ? filter.afterLog.logIndex + 1 : 0;
|
|
383
|
-
for(; logIndex < txLogs.length; logIndex++){
|
|
384
|
-
const log = txLogs[logIndex];
|
|
385
|
-
if (!filter.contractAddress || log.contractAddress.equals(filter.contractAddress)) {
|
|
386
|
-
if (log instanceof ContractClassLog) {
|
|
387
|
-
results.push(new ExtendedContractClassLog(new LogId(BlockNumber(blockNumber), blockHash, txIndex, logIndex), log));
|
|
388
|
-
} else if (log instanceof PublicLog) {
|
|
389
|
-
results.push(new ExtendedPublicLog(new LogId(BlockNumber(blockNumber), blockHash, txIndex, logIndex), log));
|
|
390
|
-
} else {
|
|
391
|
-
throw new Error('Unknown log type');
|
|
392
|
-
}
|
|
393
|
-
if (results.length >= this.#logsMaxPageSize) {
|
|
394
|
-
maxLogsHit = true;
|
|
395
|
-
break;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
return maxLogsHit;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { L1BlockId } from '@aztec/ethereum/l1-types';
|
|
2
|
-
import { CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
3
|
-
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
-
import { type AztecAsyncKVStore, type CustomRange } from '@aztec/kv-store';
|
|
5
|
-
import { type InboxMessage } from '../structs/inbox_message.js';
|
|
6
|
-
export declare class MessageStoreError extends Error {
|
|
7
|
-
readonly inboxMessage: InboxMessage;
|
|
8
|
-
constructor(message: string, inboxMessage: InboxMessage);
|
|
9
|
-
}
|
|
10
|
-
export declare class MessageStore {
|
|
11
|
-
#private;
|
|
12
|
-
private db;
|
|
13
|
-
constructor(db: AztecAsyncKVStore);
|
|
14
|
-
getTotalL1ToL2MessageCount(): Promise<bigint>;
|
|
15
|
-
/** Gets the last L1 block synced. */
|
|
16
|
-
getSynchedL1Block(): Promise<L1BlockId | undefined>;
|
|
17
|
-
/** Sets the last L1 block synced */
|
|
18
|
-
setSynchedL1Block(l1Block: L1BlockId): Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* Append L1 to L2 messages to the store.
|
|
21
|
-
* Requires new messages to be in order and strictly after the last message added.
|
|
22
|
-
* Throws if out of order messages are added or if the rolling hash is invalid.
|
|
23
|
-
*/
|
|
24
|
-
addL1ToL2Messages(messages: InboxMessage[]): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Gets the L1 to L2 message index in the L1 to L2 message tree.
|
|
27
|
-
* @param l1ToL2Message - The L1 to L2 message.
|
|
28
|
-
* @returns The index of the L1 to L2 message in the L1 to L2 message tree (undefined if not found).
|
|
29
|
-
*/
|
|
30
|
-
getL1ToL2MessageIndex(l1ToL2Message: Fr): Promise<bigint | undefined>;
|
|
31
|
-
getLastMessage(): Promise<InboxMessage | undefined>;
|
|
32
|
-
getL1ToL2Messages(checkpointNumber: CheckpointNumber): Promise<Fr[]>;
|
|
33
|
-
iterateL1ToL2Messages(range?: CustomRange<bigint>): AsyncIterableIterator<InboxMessage>;
|
|
34
|
-
removeL1ToL2Messages(startIndex: bigint): Promise<void>;
|
|
35
|
-
rollbackL1ToL2MessagesToCheckpoint(targetCheckpointNumber: CheckpointNumber): Promise<void>;
|
|
36
|
-
private indexToKey;
|
|
37
|
-
private leafToIndexKey;
|
|
38
|
-
private increaseTotalMessageCount;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZV9zdG9yZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXM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IAF5C,YACE,OAAO,EAAE,MAAM,EACC,YAAY,EAAE,YAAY,EAI3C;CACF;AAED,qBAAa,YAAY;;IAYX,OAAO,CAAC,EAAE;IAAtB,YAAoB,EAAE,EAAE,iBAAiB,EAKxC;IAEY,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,CAEzD;IAED,qCAAqC;IACxB,iBAAiB,IAAI,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAQ/D;IAED,oCAAoC;IACvB,iBAAiB,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhE;IAED;;;;OAIG;IACI,iBAAiB,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA6FhE;IAED;;;;OAIG;IACI,qBAAqB,CAAC,aAAa,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE3E;IAEY,cAAc,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAG/D;IAEY,iBAAiB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,EAAE,EAAE,CAAC,CAuBhF;IAEa,qBAAqB,CAAC,KAAK,GAAE,WAAW,CAAC,MAAM,CAAM,GAAG,qBAAqB,CAAC,YAAY,CAAC,CAKxG;IAEM,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB7D;IAEM,kCAAkC,CAAC,sBAAsB,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIjG;IAED,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,cAAc;YAIR,yBAAyB;CASxC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retrieve-calldata.d.ts","sourceRoot":"","sources":["../../../../src/archiver/l1/bin/retrieve-calldata.ts"],"names":[],"mappings":""}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import type { ViemPublicClient, ViemPublicDebugClient } from '@aztec/ethereum/types';
|
|
2
|
-
import { CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
3
|
-
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
-
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
|
-
import type { Logger } from '@aztec/foundation/log';
|
|
6
|
-
import { CommitteeAttestation } from '@aztec/stdlib/block';
|
|
7
|
-
import { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
8
|
-
import { type Hex, type Transaction } from 'viem';
|
|
9
|
-
import type { ArchiverInstrumentation } from '../instrumentation.js';
|
|
10
|
-
/**
|
|
11
|
-
* Extracts calldata to the `propose` method of the rollup contract from an L1 transaction
|
|
12
|
-
* in order to reconstruct an L2 block header.
|
|
13
|
-
*/
|
|
14
|
-
export declare class CalldataRetriever {
|
|
15
|
-
private readonly publicClient;
|
|
16
|
-
private readonly debugClient;
|
|
17
|
-
private readonly targetCommitteeSize;
|
|
18
|
-
private readonly instrumentation;
|
|
19
|
-
private readonly logger;
|
|
20
|
-
/** Pre-computed valid contract calls for validation */
|
|
21
|
-
private readonly validContractCalls;
|
|
22
|
-
private readonly rollupAddress;
|
|
23
|
-
constructor(publicClient: ViemPublicClient, debugClient: ViemPublicDebugClient, targetCommitteeSize: number, instrumentation: ArchiverInstrumentation | undefined, logger: Logger, contractAddresses: {
|
|
24
|
-
rollupAddress: EthAddress;
|
|
25
|
-
governanceProposerAddress: EthAddress;
|
|
26
|
-
slashingProposerAddress: EthAddress;
|
|
27
|
-
slashFactoryAddress?: EthAddress;
|
|
28
|
-
});
|
|
29
|
-
/**
|
|
30
|
-
* Gets checkpoint header and metadata from the calldata of an L1 transaction.
|
|
31
|
-
* Tries multicall3 decoding, falls back to trace-based extraction.
|
|
32
|
-
* @param txHash - Hash of the tx that published it.
|
|
33
|
-
* @param blobHashes - Blob hashes for the checkpoint.
|
|
34
|
-
* @param checkpointNumber - Checkpoint number.
|
|
35
|
-
* @param expectedHashes - Optional expected hashes from the CheckpointProposed event for validation
|
|
36
|
-
* @returns Checkpoint header and metadata from the calldata, deserialized
|
|
37
|
-
*/
|
|
38
|
-
getCheckpointFromRollupTx(txHash: `0x${string}`, _blobHashes: Buffer[], checkpointNumber: CheckpointNumber, expectedHashes: {
|
|
39
|
-
attestationsHash?: Hex;
|
|
40
|
-
payloadDigest?: Hex;
|
|
41
|
-
}): Promise<{
|
|
42
|
-
checkpointNumber: CheckpointNumber;
|
|
43
|
-
archiveRoot: Fr;
|
|
44
|
-
header: CheckpointHeader;
|
|
45
|
-
attestations: CommitteeAttestation[];
|
|
46
|
-
blockHash: string;
|
|
47
|
-
}>;
|
|
48
|
-
/** Gets rollup propose calldata from a transaction */
|
|
49
|
-
protected getProposeCallData(tx: Transaction, checkpointNumber: CheckpointNumber): Promise<Hex>;
|
|
50
|
-
/**
|
|
51
|
-
* Attempts to decode a transaction as a Spire Proposer multicall wrapper.
|
|
52
|
-
* If successful, extracts the wrapped call and validates it as either multicall3 or direct propose.
|
|
53
|
-
* @param tx - The transaction to decode
|
|
54
|
-
* @returns The propose calldata if successfully decoded and validated, undefined otherwise
|
|
55
|
-
*/
|
|
56
|
-
protected tryDecodeSpireProposer(tx: Transaction): Promise<Hex | undefined>;
|
|
57
|
-
/**
|
|
58
|
-
* Attempts to decode transaction input as multicall3 and extract propose calldata.
|
|
59
|
-
* Returns undefined if validation fails.
|
|
60
|
-
* @param tx - The transaction-like object with to, input, and hash
|
|
61
|
-
* @returns The propose calldata if successfully validated, undefined otherwise
|
|
62
|
-
*/
|
|
63
|
-
protected tryDecodeMulticall3(tx: {
|
|
64
|
-
to: Hex | null | undefined;
|
|
65
|
-
input: Hex;
|
|
66
|
-
hash: Hex;
|
|
67
|
-
}): Hex | undefined;
|
|
68
|
-
/**
|
|
69
|
-
* Attempts to decode transaction as a direct propose call to the rollup contract.
|
|
70
|
-
* Returns undefined if validation fails.
|
|
71
|
-
* @param tx - The transaction-like object with to, input, and hash
|
|
72
|
-
* @returns The propose calldata if successfully validated, undefined otherwise
|
|
73
|
-
*/
|
|
74
|
-
protected tryDecodeDirectPropose(tx: {
|
|
75
|
-
to: Hex | null | undefined;
|
|
76
|
-
input: Hex;
|
|
77
|
-
hash: Hex;
|
|
78
|
-
}): Hex | undefined;
|
|
79
|
-
/**
|
|
80
|
-
* Uses debug/trace RPC to extract the actual calldata from the successful propose call.
|
|
81
|
-
* This is the definitive fallback that works for any transaction pattern.
|
|
82
|
-
* Tries trace_transaction first, then falls back to debug_traceTransaction.
|
|
83
|
-
* @param txHash - The transaction hash to trace
|
|
84
|
-
* @returns The propose calldata from the successful call
|
|
85
|
-
*/
|
|
86
|
-
protected extractCalldataViaTrace(txHash: Hex): Promise<Hex>;
|
|
87
|
-
/**
|
|
88
|
-
* Extracts the CommitteeAttestations struct definition from RollupAbi.
|
|
89
|
-
* Finds the _attestations parameter by name in the propose function.
|
|
90
|
-
* Lazy-loaded to avoid issues during module initialization.
|
|
91
|
-
*/
|
|
92
|
-
private getCommitteeAttestationsStructDef;
|
|
93
|
-
/**
|
|
94
|
-
* Decodes propose calldata and builds the checkpoint header structure.
|
|
95
|
-
* @param proposeCalldata - The propose function calldata
|
|
96
|
-
* @param blockHash - The L1 block hash containing this transaction
|
|
97
|
-
* @param checkpointNumber - The checkpoint number
|
|
98
|
-
* @param expectedHashes - Optional expected hashes from the CheckpointProposed event for validation
|
|
99
|
-
* @returns The decoded checkpoint header and metadata
|
|
100
|
-
*/
|
|
101
|
-
protected decodeAndBuildCheckpoint(proposeCalldata: Hex, blockHash: Hex, checkpointNumber: CheckpointNumber, expectedHashes: {
|
|
102
|
-
attestationsHash?: Hex;
|
|
103
|
-
payloadDigest?: Hex;
|
|
104
|
-
}): {
|
|
105
|
-
checkpointNumber: CheckpointNumber;
|
|
106
|
-
archiveRoot: Fr;
|
|
107
|
-
header: CheckpointHeader;
|
|
108
|
-
attestations: CommitteeAttestation[];
|
|
109
|
-
blockHash: string;
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
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