@aztec/archiver 0.0.1-commit.d431d1c → 0.0.1-commit.d58ff9d0
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 +28 -11
- package/dest/archiver.d.ts +80 -21
- package/dest/archiver.d.ts.map +1 -1
- package/dest/archiver.js +347 -167
- package/dest/config.d.ts +7 -3
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +38 -14
- package/dest/errors.d.ts +60 -9
- package/dest/errors.d.ts.map +1 -1
- package/dest/errors.js +88 -13
- package/dest/factory.d.ts +13 -6
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +59 -39
- package/dest/index.d.ts +12 -3
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +11 -2
- package/dest/l1/bin/retrieve-calldata.js +35 -32
- package/dest/l1/calldata_retriever.d.ts +81 -50
- package/dest/l1/calldata_retriever.d.ts.map +1 -1
- package/dest/l1/calldata_retriever.js +202 -260
- package/dest/l1/data_retrieval.d.ts +32 -18
- package/dest/l1/data_retrieval.d.ts.map +1 -1
- package/dest/l1/data_retrieval.js +45 -50
- package/dest/l1/spire_proposer.d.ts +5 -5
- package/dest/l1/spire_proposer.d.ts.map +1 -1
- package/dest/l1/spire_proposer.js +9 -17
- package/dest/l1/trace_tx.d.ts +12 -66
- package/dest/l1/trace_tx.d.ts.map +1 -1
- 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/l1/validate_trace.d.ts +6 -3
- package/dest/l1/validate_trace.d.ts.map +1 -1
- package/dest/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 +32 -0
- package/dest/modules/data_source_base.d.ts +75 -48
- package/dest/modules/data_source_base.d.ts.map +1 -1
- package/dest/modules/data_source_base.js +251 -220
- package/dest/modules/data_store_updater.d.ts +65 -29
- package/dest/modules/data_store_updater.d.ts.map +1 -1
- package/dest/modules/data_store_updater.js +242 -153
- package/dest/modules/instrumentation.d.ts +30 -4
- package/dest/modules/instrumentation.d.ts.map +1 -1
- package/dest/modules/instrumentation.js +83 -20
- package/dest/modules/l1_synchronizer.d.ts +16 -14
- package/dest/modules/l1_synchronizer.d.ts.map +1 -1
- package/dest/modules/l1_synchronizer.js +493 -225
- package/dest/modules/outbox_trees_resolver.d.ts +62 -0
- package/dest/modules/outbox_trees_resolver.d.ts.map +1 -0
- package/dest/modules/outbox_trees_resolver.js +162 -0
- package/dest/modules/validation.d.ts +30 -7
- package/dest/modules/validation.d.ts.map +1 -1
- package/dest/modules/validation.js +35 -17
- package/dest/store/block_store.d.ts +200 -75
- package/dest/store/block_store.d.ts.map +1 -1
- package/dest/store/block_store.js +802 -276
- package/dest/store/contract_class_store.d.ts +17 -4
- package/dest/store/contract_class_store.d.ts.map +1 -1
- package/dest/store/contract_class_store.js +51 -73
- package/dest/store/contract_instance_store.d.ts +28 -1
- package/dest/store/contract_instance_store.d.ts.map +1 -1
- package/dest/store/contract_instance_store.js +54 -2
- 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 +42 -37
- package/dest/store/log_store.d.ts.map +1 -1
- package/dest/store/log_store.js +262 -388
- package/dest/store/log_store_codec.d.ts +78 -0
- package/dest/store/log_store_codec.d.ts.map +1 -0
- package/dest/store/log_store_codec.js +110 -0
- package/dest/store/message_store.d.ts +11 -1
- package/dest/store/message_store.d.ts.map +1 -1
- package/dest/store/message_store.js +51 -9
- package/dest/test/fake_l1_state.d.ts +28 -4
- package/dest/test/fake_l1_state.d.ts.map +1 -1
- package/dest/test/fake_l1_state.js +166 -32
- package/dest/test/index.js +3 -1
- package/dest/test/mock_archiver.d.ts +1 -1
- package/dest/test/mock_archiver.d.ts.map +1 -1
- package/dest/test/mock_archiver.js +3 -2
- package/dest/test/mock_l2_block_source.d.ts +65 -51
- package/dest/test/mock_l2_block_source.d.ts.map +1 -1
- package/dest/test/mock_l2_block_source.js +309 -215
- package/dest/test/mock_structs.d.ts +6 -2
- package/dest/test/mock_structs.d.ts.map +1 -1
- package/dest/test/mock_structs.js +26 -12
- package/dest/test/noop_l1_archiver.d.ts +34 -0
- package/dest/test/noop_l1_archiver.d.ts.map +1 -0
- package/dest/test/noop_l1_archiver.js +88 -0
- package/package.json +15 -14
- package/src/archiver.ts +458 -198
- package/src/config.ts +43 -13
- package/src/errors.ts +134 -21
- package/src/factory.ts +87 -36
- package/src/index.ts +19 -2
- package/src/l1/README.md +25 -68
- package/src/l1/bin/retrieve-calldata.ts +45 -33
- package/src/l1/calldata_retriever.ts +267 -379
- package/src/l1/data_retrieval.ts +70 -74
- package/src/l1/spire_proposer.ts +7 -15
- package/src/l1/validate_historical_logs.ts +140 -0
- package/src/l1/validate_trace.ts +24 -6
- package/src/modules/contract_data_source_adapter.ts +46 -0
- package/src/modules/data_source_base.ts +336 -288
- package/src/modules/data_store_updater.ts +287 -187
- package/src/modules/instrumentation.ts +86 -21
- package/src/modules/l1_synchronizer.ts +667 -278
- package/src/modules/outbox_trees_resolver.ts +199 -0
- package/src/modules/validation.ts +80 -23
- package/src/store/block_store.ts +984 -352
- package/src/store/contract_class_store.ts +57 -107
- package/src/store/contract_instance_store.ts +68 -5
- 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 +305 -500
- package/src/store/log_store_codec.ts +143 -0
- package/src/store/message_store.ts +60 -10
- package/src/structs/inbox_message.ts +1 -1
- package/src/test/fake_l1_state.ts +215 -44
- package/src/test/index.ts +3 -0
- package/src/test/mock_archiver.ts +3 -2
- package/src/test/mock_l2_block_source.ts +381 -246
- package/src/test/mock_structs.ts +50 -17
- package/src/test/noop_l1_archiver.ts +158 -0
- package/dest/store/kv_archiver_store.d.ts +0 -336
- package/dest/store/kv_archiver_store.d.ts.map +0 -1
- package/dest/store/kv_archiver_store.js +0 -443
- package/src/store/kv_archiver_store.ts +0 -631
|
@@ -1,84 +1,126 @@
|
|
|
1
1
|
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
|
-
import {
|
|
2
|
+
import { filterAsync } from '@aztec/foundation/collection';
|
|
3
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
|
-
import { ContractClassPublishedEvent
|
|
4
|
+
import { ContractClassPublishedEvent } from '@aztec/protocol-contracts/class-registry';
|
|
5
5
|
import { ContractInstancePublishedEvent, ContractInstanceUpdatedEvent } from '@aztec/protocol-contracts/instance-registry';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { validateCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
7
|
+
import { computeContractAddressFromInstance, computeContractClassId } from '@aztec/stdlib/contract';
|
|
8
8
|
/** Operation type for contract data updates. */ var Operation = /*#__PURE__*/ function(Operation) {
|
|
9
9
|
Operation[Operation["Store"] = 0] = "Store";
|
|
10
10
|
Operation[Operation["Delete"] = 1] = "Delete";
|
|
11
11
|
return Operation;
|
|
12
12
|
}(Operation || {});
|
|
13
13
|
/** Archiver helper module to handle updates to the data store. */ export class ArchiverDataStoreUpdater {
|
|
14
|
-
|
|
14
|
+
stores;
|
|
15
|
+
l2TipsCache;
|
|
16
|
+
opts;
|
|
15
17
|
log;
|
|
16
|
-
constructor(
|
|
17
|
-
this.
|
|
18
|
+
constructor(stores, l2TipsCache, opts = {}){
|
|
19
|
+
this.stores = stores;
|
|
20
|
+
this.l2TipsCache = l2TipsCache;
|
|
21
|
+
this.opts = opts;
|
|
18
22
|
this.log = createLogger('archiver:store_updater');
|
|
19
23
|
}
|
|
20
24
|
/**
|
|
21
|
-
* Adds
|
|
22
|
-
*
|
|
23
|
-
*
|
|
25
|
+
* Adds a proposed block to the store with contract class/instance extraction from logs.
|
|
26
|
+
* This is an uncheckpointed block that has been proposed by the sequencer but not yet included in a checkpoint on L1.
|
|
27
|
+
* Extracts ContractClassPublished, ContractInstancePublished, ContractInstanceUpdated events from the block logs.
|
|
24
28
|
*
|
|
25
|
-
* @param
|
|
29
|
+
* @param block - The proposed L2 block to add.
|
|
26
30
|
* @param pendingChainValidationStatus - Optional validation status to set.
|
|
27
31
|
* @returns True if the operation is successful.
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
await this.
|
|
32
|
+
*/ async addProposedBlock(block, pendingChainValidationStatus) {
|
|
33
|
+
const result = await this.stores.db.transactionAsync(async ()=>{
|
|
34
|
+
await this.stores.blocks.addProposedBlock(block);
|
|
31
35
|
const opResults = await Promise.all([
|
|
32
36
|
// Update the pending chain validation status if provided
|
|
33
|
-
pendingChainValidationStatus && this.
|
|
34
|
-
// Add any logs emitted during the retrieved
|
|
35
|
-
this.
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
pendingChainValidationStatus && this.stores.blocks.setPendingChainValidationStatus(pendingChainValidationStatus),
|
|
38
|
+
// Add any logs emitted during the retrieved block
|
|
39
|
+
this.stores.logs.addLogs([
|
|
40
|
+
block
|
|
41
|
+
]),
|
|
42
|
+
// Unroll all logs emitted during the retrieved block and extract any contract classes and instances from it
|
|
43
|
+
this.addContractDataToDb(block)
|
|
38
44
|
]);
|
|
39
45
|
return opResults.every(Boolean);
|
|
40
46
|
});
|
|
47
|
+
await this.l2TipsCache?.refresh();
|
|
48
|
+
return result;
|
|
41
49
|
}
|
|
42
50
|
/**
|
|
43
51
|
* Reconciles local blocks with incoming checkpoints from L1.
|
|
44
|
-
* Adds checkpoints to the store with contract class/instance extraction from logs.
|
|
52
|
+
* Adds new checkpoints to the store with contract class/instance extraction from logs.
|
|
45
53
|
* Prunes any local blocks that conflict with checkpoint data (by comparing archive roots).
|
|
46
|
-
* Extracts ContractClassPublished, ContractInstancePublished, ContractInstanceUpdated events
|
|
47
|
-
*
|
|
54
|
+
* Extracts ContractClassPublished, ContractInstancePublished, ContractInstanceUpdated events from the checkpoint block logs.
|
|
55
|
+
* If `promoteProposed` is supplied, the proposed-checkpoint promotion runs inside the same transaction
|
|
56
|
+
* as the added checkpoints so both updates are applied atomically.
|
|
48
57
|
*
|
|
49
|
-
* @param checkpoints - The published checkpoints to add.
|
|
58
|
+
* @param checkpoints - The published checkpoints to add (excluding any being promoted from proposed).
|
|
50
59
|
* @param pendingChainValidationStatus - Optional validation status to set.
|
|
60
|
+
* @param promoteProposed - Optional promotion of the current proposed checkpoint (fast path when blocks are already local).
|
|
51
61
|
* @returns Result with information about any pruned blocks.
|
|
52
|
-
*/
|
|
53
|
-
|
|
62
|
+
*/ async addCheckpoints(checkpoints, pendingChainValidationStatus, promoteProposed, evictProposedFrom) {
|
|
63
|
+
for (const checkpoint of checkpoints){
|
|
64
|
+
validateCheckpoint(checkpoint.checkpoint, {
|
|
65
|
+
rollupManaLimit: this.opts?.rollupManaLimit
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
if (promoteProposed) {
|
|
69
|
+
validateCheckpoint(promoteProposed.checkpoint.checkpoint, {
|
|
70
|
+
rollupManaLimit: this.opts?.rollupManaLimit
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
const result = await this.stores.db.transactionAsync(async ()=>{
|
|
54
74
|
// Before adding checkpoints, check for conflicts with local blocks if any
|
|
55
75
|
const { prunedBlocks, lastAlreadyInsertedBlockNumber } = await this.pruneMismatchingLocalBlocks(checkpoints);
|
|
56
|
-
await this.
|
|
57
|
-
//
|
|
58
|
-
|
|
76
|
+
const insertedCheckpoints = await this.stores.blocks.addCheckpoints(checkpoints);
|
|
77
|
+
// Skip blocks already inserted via addProposedBlock() and blocks of already-stored checkpoints
|
|
78
|
+
// re-included by an L1 reorg: their logs/contract data were extracted when first inserted.
|
|
79
|
+
const newBlocks = insertedCheckpoints.flatMap((ch)=>ch.checkpoint.blocks).filter((b)=>lastAlreadyInsertedBlockNumber === undefined || b.number > lastAlreadyInsertedBlockNumber);
|
|
59
80
|
await Promise.all([
|
|
60
81
|
// Update the pending chain validation status if provided
|
|
61
|
-
pendingChainValidationStatus && this.
|
|
82
|
+
pendingChainValidationStatus && this.stores.blocks.setPendingChainValidationStatus(pendingChainValidationStatus),
|
|
62
83
|
// Add any logs emitted during the retrieved blocks
|
|
63
|
-
this.
|
|
84
|
+
this.stores.logs.addLogs(newBlocks),
|
|
64
85
|
// Unroll all logs emitted during the retrieved blocks and extract any contract classes and instances from them
|
|
65
|
-
...newBlocks.map((block)=>this.
|
|
86
|
+
...newBlocks.map((block)=>this.addContractDataToDb(block)),
|
|
87
|
+
// Promote the proposed checkpoint if requested (uses explicit checkpoint number)
|
|
88
|
+
promoteProposed ? this.stores.blocks.promoteProposedToCheckpointed(promoteProposed.checkpoint.checkpoint.number, promoteProposed.l1, promoteProposed.attestations, promoteProposed.checkpoint.checkpoint.archive.root) : undefined,
|
|
89
|
+
// Evict pending checkpoints that diverged from what L1 mined
|
|
90
|
+
evictProposedFrom !== undefined ? this.stores.blocks.evictProposedCheckpointsFrom(evictProposedFrom) : undefined
|
|
66
91
|
]);
|
|
67
92
|
return {
|
|
68
93
|
prunedBlocks,
|
|
69
94
|
lastAlreadyInsertedBlockNumber
|
|
70
95
|
};
|
|
71
96
|
});
|
|
97
|
+
await this.l2TipsCache?.refresh();
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
async addProposedCheckpoint(proposedCheckpoint) {
|
|
101
|
+
const result = await this.stores.db.transactionAsync(async ()=>{
|
|
102
|
+
await this.stores.blocks.addProposedCheckpoint(proposedCheckpoint);
|
|
103
|
+
});
|
|
104
|
+
await this.l2TipsCache?.refresh();
|
|
105
|
+
return result;
|
|
72
106
|
}
|
|
73
107
|
/**
|
|
74
108
|
* Checks for local proposed blocks that do not match the ones to be checkpointed and prunes them.
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
109
|
+
* Conflict detection is keyed on `blockNumber`: when a local proposed block and an L1
|
|
110
|
+
* checkpointed block share a block number but live at different slots (e.g. a different proposer
|
|
111
|
+
* mined the same block number one slot earlier), we still treat them as a conflict and prune.
|
|
112
|
+
* The trailing per-checkpoint prune that handles "local has extra trailing blocks within the
|
|
113
|
+
* same slot as the published checkpoint" remains scoped by slot to preserve pipelining: local
|
|
114
|
+
* blocks that live at a later slot than the checkpoint being processed represent speculation
|
|
115
|
+
* atop the just-confirmed tip (and may be referenced by a pending proposed checkpoint), so we
|
|
116
|
+
* leave them in place. This method handles multiple checkpoints but returns after pruning the
|
|
117
|
+
* first conflict found. This is correct because pruning from the first conflict point removes
|
|
118
|
+
* all subsequent blocks, and when checkpoints are added afterward, they include all the correct
|
|
119
|
+
* blocks.
|
|
78
120
|
*/ async pruneMismatchingLocalBlocks(checkpoints) {
|
|
79
121
|
const [lastCheckpointedBlockNumber, lastBlockNumber] = await Promise.all([
|
|
80
|
-
this.
|
|
81
|
-
this.
|
|
122
|
+
this.stores.blocks.getCheckpointedL2BlockNumber(),
|
|
123
|
+
this.stores.blocks.getLatestL2BlockNumber()
|
|
82
124
|
]);
|
|
83
125
|
// Exit early if there are no local uncheckpointed blocks
|
|
84
126
|
if (lastBlockNumber === lastCheckpointedBlockNumber) {
|
|
@@ -88,22 +130,25 @@ import groupBy from 'lodash.groupby';
|
|
|
88
130
|
};
|
|
89
131
|
}
|
|
90
132
|
// Get all uncheckpointed local blocks
|
|
91
|
-
const uncheckpointedLocalBlocks = await this.
|
|
133
|
+
const uncheckpointedLocalBlocks = await this.stores.blocks.getBlocksData({
|
|
134
|
+
from: BlockNumber.add(lastCheckpointedBlockNumber, 1),
|
|
135
|
+
limit: lastBlockNumber - lastCheckpointedBlockNumber
|
|
136
|
+
});
|
|
92
137
|
let lastAlreadyInsertedBlockNumber;
|
|
93
138
|
for (const publishedCheckpoint of checkpoints){
|
|
94
139
|
const checkpointBlocks = publishedCheckpoint.checkpoint.blocks;
|
|
95
140
|
const slot = publishedCheckpoint.checkpoint.slot;
|
|
96
|
-
const localBlocksInSlot = uncheckpointedLocalBlocks.filter((b)=>b.slot === slot);
|
|
97
141
|
if (checkpointBlocks.length === 0) {
|
|
98
142
|
this.log.warn(`Checkpoint ${publishedCheckpoint.checkpoint.number} for slot ${slot} has no blocks`);
|
|
99
143
|
continue;
|
|
100
144
|
}
|
|
101
|
-
// Find the first checkpoint block that conflicts with an existing local block and prune local afterwards
|
|
145
|
+
// Find the first checkpoint block that conflicts with an existing local block and prune local afterwards.
|
|
146
|
+
// Conflict detection joins on block number only — same block number at a different slot is still a conflict.
|
|
102
147
|
for (const checkpointBlock of checkpointBlocks){
|
|
103
148
|
const blockNumber = checkpointBlock.number;
|
|
104
|
-
const existingBlock =
|
|
149
|
+
const existingBlock = uncheckpointedLocalBlocks.find((b)=>b.header.getBlockNumber() === blockNumber);
|
|
105
150
|
const blockInfos = {
|
|
106
|
-
existingBlock: existingBlock?.
|
|
151
|
+
existingBlock: existingBlock?.header.toInspect(),
|
|
107
152
|
checkpointBlock: checkpointBlock.toBlockInfo()
|
|
108
153
|
};
|
|
109
154
|
if (!existingBlock) {
|
|
@@ -112,21 +157,25 @@ import groupBy from 'lodash.groupby';
|
|
|
112
157
|
this.log.verbose(`Block number ${blockNumber} already inserted and matches checkpoint`, blockInfos);
|
|
113
158
|
lastAlreadyInsertedBlockNumber = blockNumber;
|
|
114
159
|
} else {
|
|
115
|
-
this.log.
|
|
160
|
+
this.log.info(`Conflict detected at block ${blockNumber} between checkpointed and local block`, blockInfos);
|
|
116
161
|
const prunedBlocks = await this.removeBlocksAfter(BlockNumber(blockNumber - 1));
|
|
162
|
+
await this.evictProposedCheckpointsForPrunedBlocks(prunedBlocks);
|
|
117
163
|
return {
|
|
118
164
|
prunedBlocks,
|
|
119
165
|
lastAlreadyInsertedBlockNumber
|
|
120
166
|
};
|
|
121
167
|
}
|
|
122
168
|
}
|
|
123
|
-
// If
|
|
124
|
-
//
|
|
169
|
+
// If the sequencer locally proposed extra blocks within this checkpoint's slot (e.g. local has
|
|
170
|
+
// [N, N+1] but L1 confirmed just [N]), prune the extras. Scoped to the checkpoint's slot so we
|
|
171
|
+
// do not throw away speculative blocks at later slots that belong to a pending proposed checkpoint.
|
|
125
172
|
const lastCheckpointBlockNumber = checkpointBlocks.at(-1).number;
|
|
126
|
-
const
|
|
173
|
+
const localBlocksInSlot = uncheckpointedLocalBlocks.filter((b)=>b.header.getSlot() === slot);
|
|
174
|
+
const lastLocalBlockNumber = localBlocksInSlot.at(-1)?.header.getBlockNumber();
|
|
127
175
|
if (lastLocalBlockNumber !== undefined && lastLocalBlockNumber > lastCheckpointBlockNumber) {
|
|
128
176
|
this.log.warn(`Local chain for slot ${slot} ends at block ${lastLocalBlockNumber} but checkpoint ends at ${lastCheckpointBlockNumber}. Pruning blocks after block ${lastCheckpointBlockNumber}.`);
|
|
129
177
|
const prunedBlocks = await this.removeBlocksAfter(lastCheckpointBlockNumber);
|
|
178
|
+
await this.evictProposedCheckpointsForPrunedBlocks(prunedBlocks);
|
|
130
179
|
return {
|
|
131
180
|
prunedBlocks,
|
|
132
181
|
lastAlreadyInsertedBlockNumber
|
|
@@ -139,104 +188,190 @@ import groupBy from 'lodash.groupby';
|
|
|
139
188
|
};
|
|
140
189
|
}
|
|
141
190
|
/**
|
|
142
|
-
* Removes all blocks strictly after the specified block number and cleans up associated contract data.
|
|
191
|
+
* Removes all uncheckpointed blocks strictly after the specified block number and cleans up associated contract data.
|
|
143
192
|
* This handles removal of provisionally added blocks along with their contract classes/instances.
|
|
193
|
+
* Verifies that each block being removed is not part of a stored checkpoint.
|
|
144
194
|
*
|
|
145
195
|
* @param blockNumber - Remove all blocks with number greater than this.
|
|
146
196
|
* @returns The removed blocks.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
197
|
+
* @throws Error if any block to be removed is checkpointed.
|
|
198
|
+
*/ async removeUncheckpointedBlocksAfter(blockNumber) {
|
|
199
|
+
const result = await this.stores.db.transactionAsync(async ()=>{
|
|
200
|
+
// Verify we're only removing uncheckpointed blocks
|
|
201
|
+
const lastCheckpointedBlockNumber = await this.stores.blocks.getCheckpointedL2BlockNumber();
|
|
202
|
+
if (blockNumber < lastCheckpointedBlockNumber) {
|
|
203
|
+
throw new Error(`Cannot remove blocks after ${blockNumber} because checkpointed blocks exist up to ${lastCheckpointedBlockNumber}`);
|
|
204
|
+
}
|
|
205
|
+
const prunedBlocks = await this.removeBlocksAfter(blockNumber);
|
|
206
|
+
await this.evictProposedCheckpointsForPrunedBlocks(prunedBlocks);
|
|
207
|
+
return prunedBlocks;
|
|
157
208
|
});
|
|
209
|
+
await this.l2TipsCache?.refresh();
|
|
210
|
+
return result;
|
|
158
211
|
}
|
|
159
212
|
/**
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
* that
|
|
213
|
+
* Removes all blocks without a proposed checkpoint strictly after the specified block number and cleans up associated contract data.
|
|
214
|
+
* This handles removal of provisionally added blocks along with their contract classes/instances.
|
|
215
|
+
* Verifies that each block being removed is not part of a stored checkpoint (proposed or not).
|
|
216
|
+
* This differs from `removeUncheckpointedBlocksAfter` in that it also checks proposed checkpoints.
|
|
163
217
|
*
|
|
164
|
-
* @param
|
|
165
|
-
* @
|
|
166
|
-
* @
|
|
167
|
-
*/ async
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
throw new Error(`Cannot unwind checkpoints from checkpoint ${from} when the last checkpoint is ${last}`);
|
|
174
|
-
}
|
|
175
|
-
const blocks = [];
|
|
176
|
-
const lastCheckpointNumber = from + checkpointsToUnwind - 1;
|
|
177
|
-
for(let checkpointNumber = from; checkpointNumber <= lastCheckpointNumber; checkpointNumber++){
|
|
178
|
-
const blocksForCheckpoint = await this.store.getBlocksForCheckpoint(checkpointNumber);
|
|
179
|
-
if (!blocksForCheckpoint) {
|
|
180
|
-
continue;
|
|
218
|
+
* @param blockNumber - Remove all blocks with number greater than this.
|
|
219
|
+
* @returns The removed blocks.
|
|
220
|
+
* @throws Error if any block to be removed is checkpointed.
|
|
221
|
+
*/ async removeBlocksWithoutProposedCheckpointAfter(blockNumber) {
|
|
222
|
+
const result = await this.stores.db.transactionAsync(async ()=>{
|
|
223
|
+
// Verify we're only removing uncheckpointed blocks
|
|
224
|
+
const lastCheckpointedBlockNumber = await this.stores.blocks.getProposedCheckpointL2BlockNumber();
|
|
225
|
+
if (blockNumber < lastCheckpointedBlockNumber) {
|
|
226
|
+
throw new Error(`Cannot remove blocks after ${blockNumber} because proposed checkpointed blocks exist up to ${lastCheckpointedBlockNumber}`);
|
|
181
227
|
}
|
|
182
|
-
|
|
228
|
+
return await this.removeBlocksAfter(blockNumber);
|
|
229
|
+
});
|
|
230
|
+
await this.l2TipsCache?.refresh();
|
|
231
|
+
return result;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Evicts pending proposed checkpoints that referenced any of the just-pruned blocks. Pruned
|
|
235
|
+
* blocks invalidate all proposed checkpoints from the lowest pruned block's checkpoint number
|
|
236
|
+
* onwards: those checkpoints either reference the pruned blocks directly or chain off them.
|
|
237
|
+
*/ async evictProposedCheckpointsForPrunedBlocks(prunedBlocks) {
|
|
238
|
+
if (prunedBlocks.length === 0) {
|
|
239
|
+
return;
|
|
183
240
|
}
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
241
|
+
const fromCheckpointNumber = prunedBlocks[0].checkpointNumber;
|
|
242
|
+
await this.stores.blocks.evictProposedCheckpointsFrom(fromCheckpointNumber);
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Removes all blocks strictly after the given block number along with any logs and contract data.
|
|
246
|
+
* Does not remove their checkpoints.
|
|
247
|
+
*/ async removeBlocksAfter(blockNumber) {
|
|
248
|
+
// First get the blocks to be removed so we can clean up contract data
|
|
249
|
+
const removedBlocks = await this.stores.blocks.removeBlocksAfter(blockNumber);
|
|
250
|
+
// Clean up contract data and logs for the removed blocks
|
|
251
|
+
await Promise.all([
|
|
252
|
+
this.stores.logs.deleteLogs(removedBlocks),
|
|
253
|
+
...removedBlocks.map((block)=>this.removeContractDataFromDb(block))
|
|
193
254
|
]);
|
|
194
|
-
return
|
|
255
|
+
return removedBlocks;
|
|
195
256
|
}
|
|
196
|
-
/**
|
|
197
|
-
|
|
257
|
+
/**
|
|
258
|
+
* Removes all checkpoints after the given checkpoint number.
|
|
259
|
+
* Deletes ContractClassPublished, ContractInstancePublished, ContractInstanceUpdated data
|
|
260
|
+
* that was stored for the removed checkpoints. Also removes ALL blocks (both checkpointed
|
|
261
|
+
* and uncheckpointed) after the last block of the given checkpoint.
|
|
262
|
+
*
|
|
263
|
+
* @param checkpointNumber - Remove all checkpoints strictly after this one.
|
|
264
|
+
* @returns True if the operation is successful.
|
|
265
|
+
*/ async removeCheckpointsAfter(checkpointNumber) {
|
|
266
|
+
const result = await this.stores.db.transactionAsync(async ()=>{
|
|
267
|
+
const { blocksRemoved = [] } = await this.stores.blocks.removeCheckpointsAfter(checkpointNumber);
|
|
268
|
+
const opResults = await Promise.all([
|
|
269
|
+
// Prune rolls back to the last proven block, which is by definition valid
|
|
270
|
+
this.stores.blocks.setPendingChainValidationStatus({
|
|
271
|
+
valid: true
|
|
272
|
+
}),
|
|
273
|
+
// Remove contract data for all blocks being removed
|
|
274
|
+
...blocksRemoved.map((block)=>this.removeContractDataFromDb(block)),
|
|
275
|
+
this.stores.logs.deleteLogs(blocksRemoved)
|
|
276
|
+
]);
|
|
277
|
+
return opResults.every(Boolean);
|
|
278
|
+
});
|
|
279
|
+
await this.l2TipsCache?.refresh();
|
|
280
|
+
return result;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Updates the proven checkpoint number and refreshes the L2 tips cache.
|
|
284
|
+
* @param checkpointNumber - The checkpoint number to set as proven.
|
|
285
|
+
*/ async setProvenCheckpointNumber(checkpointNumber) {
|
|
286
|
+
await this.stores.db.transactionAsync(async ()=>{
|
|
287
|
+
await this.stores.blocks.setProvenCheckpointNumber(checkpointNumber);
|
|
288
|
+
});
|
|
289
|
+
await this.l2TipsCache?.refresh();
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Updates the finalized checkpoint number and refreshes the L2 tips cache.
|
|
293
|
+
* @param checkpointNumber - The checkpoint number to set as finalized.
|
|
294
|
+
*/ async setFinalizedCheckpointNumber(checkpointNumber) {
|
|
295
|
+
await this.stores.db.transactionAsync(async ()=>{
|
|
296
|
+
await this.stores.blocks.setFinalizedCheckpointNumber(checkpointNumber);
|
|
297
|
+
});
|
|
298
|
+
await this.l2TipsCache?.refresh();
|
|
299
|
+
}
|
|
300
|
+
/** Extracts and stores contract data from a single block. */ addContractDataToDb(block) {
|
|
301
|
+
return this.updateContractDataOnDb(block, 0);
|
|
198
302
|
}
|
|
199
|
-
/** Removes contract data associated with a block. */
|
|
200
|
-
return this.
|
|
303
|
+
/** Removes contract data associated with a block. */ removeContractDataFromDb(block) {
|
|
304
|
+
return this.updateContractDataOnDb(block, 1);
|
|
201
305
|
}
|
|
202
|
-
/** Adds or remove contract data associated with a block. */ async
|
|
306
|
+
/** Adds or remove contract data associated with a block. */ async updateContractDataOnDb(block, operation) {
|
|
203
307
|
const contractClassLogs = block.body.txEffects.flatMap((txEffect)=>txEffect.contractClassLogs);
|
|
204
308
|
const privateLogs = block.body.txEffects.flatMap((txEffect)=>txEffect.privateLogs);
|
|
205
309
|
const publicLogs = block.body.txEffects.flatMap((txEffect)=>txEffect.publicLogs);
|
|
206
310
|
return (await Promise.all([
|
|
207
311
|
this.updatePublishedContractClasses(contractClassLogs, block.number, operation),
|
|
208
312
|
this.updateDeployedContractInstances(privateLogs, block.number, operation),
|
|
209
|
-
this.updateUpdatedContractInstances(publicLogs, block.header.globalVariables.timestamp, operation)
|
|
210
|
-
operation === 0 ? this.storeBroadcastedIndividualFunctions(contractClassLogs, block.number) : Promise.resolve(true)
|
|
313
|
+
this.updateUpdatedContractInstances(publicLogs, block.header.globalVariables.timestamp, operation)
|
|
211
314
|
])).every(Boolean);
|
|
212
315
|
}
|
|
213
316
|
/**
|
|
214
317
|
* Extracts and stores contract classes out of ContractClassPublished events emitted by the class registry contract.
|
|
215
318
|
*/ async updatePublishedContractClasses(allLogs, blockNum, operation) {
|
|
216
319
|
const contractClassPublishedEvents = allLogs.filter((log)=>ContractClassPublishedEvent.isContractClassPublishedEvent(log)).map((log)=>ContractClassPublishedEvent.fromLog(log));
|
|
217
|
-
|
|
320
|
+
if (operation == 1) {
|
|
321
|
+
const contractClasses = contractClassPublishedEvents.map((e)=>e.toContractClassPublic());
|
|
322
|
+
if (contractClasses.length > 0) {
|
|
323
|
+
contractClasses.forEach((c)=>this.log.verbose(`${Operation[operation]} contract class ${c.id.toString()}`));
|
|
324
|
+
return await this.stores.contractClasses.deleteContractClasses(contractClasses, blockNum);
|
|
325
|
+
}
|
|
326
|
+
return true;
|
|
327
|
+
}
|
|
328
|
+
// Compute bytecode commitments and validate class IDs in a single pass.
|
|
329
|
+
const contractClasses = [];
|
|
330
|
+
for (const event of contractClassPublishedEvents){
|
|
331
|
+
const contractClass = await event.toContractClassPublicWithBytecodeCommitment();
|
|
332
|
+
const computedClassId = await computeContractClassId({
|
|
333
|
+
artifactHash: contractClass.artifactHash,
|
|
334
|
+
privateFunctionsRoot: contractClass.privateFunctionsRoot,
|
|
335
|
+
publicBytecodeCommitment: contractClass.publicBytecodeCommitment
|
|
336
|
+
});
|
|
337
|
+
if (!computedClassId.equals(contractClass.id)) {
|
|
338
|
+
this.log.warn(`Skipping contract class with mismatched id at block ${blockNum}. Claimed ${contractClass.id}, computed ${computedClassId}`, {
|
|
339
|
+
blockNum,
|
|
340
|
+
contractClassId: event.contractClassId.toString()
|
|
341
|
+
});
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
contractClasses.push(contractClass);
|
|
345
|
+
}
|
|
218
346
|
if (contractClasses.length > 0) {
|
|
219
347
|
contractClasses.forEach((c)=>this.log.verbose(`${Operation[operation]} contract class ${c.id.toString()}`));
|
|
220
|
-
|
|
221
|
-
// TODO: Will probably want to create some worker threads to compute these bytecode commitments as they are expensive
|
|
222
|
-
const commitments = await Promise.all(contractClasses.map((c)=>computePublicBytecodeCommitment(c.packedBytecode)));
|
|
223
|
-
return await this.store.addContractClasses(contractClasses, commitments, blockNum);
|
|
224
|
-
} else if (operation == 1) {
|
|
225
|
-
return await this.store.deleteContractClasses(contractClasses, blockNum);
|
|
226
|
-
}
|
|
348
|
+
return await this.stores.contractClasses.addContractClasses(contractClasses, blockNum);
|
|
227
349
|
}
|
|
228
350
|
return true;
|
|
229
351
|
}
|
|
230
352
|
/**
|
|
231
353
|
* Extracts and stores contract instances out of ContractInstancePublished events emitted by the canonical deployer contract.
|
|
232
354
|
*/ async updateDeployedContractInstances(allLogs, blockNum, operation) {
|
|
233
|
-
const
|
|
355
|
+
const allInstances = allLogs.filter((log)=>ContractInstancePublishedEvent.isContractInstancePublishedEvent(log)).map((log)=>ContractInstancePublishedEvent.fromLog(log)).map((e)=>e.toContractInstance());
|
|
356
|
+
// Verify that each instance's address matches the one derived from its fields if we're adding
|
|
357
|
+
const contractInstances = operation === 1 ? allInstances : await filterAsync(allInstances, async (instance)=>{
|
|
358
|
+
const computedAddress = await computeContractAddressFromInstance(instance);
|
|
359
|
+
if (!computedAddress.equals(instance.address)) {
|
|
360
|
+
this.log.warn(`Found contract instance with mismatched address at block ${blockNum}. Claimed ${instance.address} but computed ${computedAddress}.`, {
|
|
361
|
+
instanceAddress: instance.address.toString(),
|
|
362
|
+
computedAddress: computedAddress.toString(),
|
|
363
|
+
blockNum
|
|
364
|
+
});
|
|
365
|
+
return false;
|
|
366
|
+
}
|
|
367
|
+
return true;
|
|
368
|
+
});
|
|
234
369
|
if (contractInstances.length > 0) {
|
|
235
370
|
contractInstances.forEach((c)=>this.log.verbose(`${Operation[operation]} contract instance at ${c.address.toString()}`));
|
|
236
371
|
if (operation == 0) {
|
|
237
|
-
return await this.
|
|
372
|
+
return await this.stores.contractInstances.addContractInstances(contractInstances, blockNum);
|
|
238
373
|
} else if (operation == 1) {
|
|
239
|
-
return await this.
|
|
374
|
+
return await this.stores.contractInstances.deleteContractInstances(contractInstances);
|
|
240
375
|
}
|
|
241
376
|
}
|
|
242
377
|
return true;
|
|
@@ -248,56 +383,10 @@ import groupBy from 'lodash.groupby';
|
|
|
248
383
|
if (contractUpdates.length > 0) {
|
|
249
384
|
contractUpdates.forEach((c)=>this.log.verbose(`${Operation[operation]} contract instance update at ${c.address.toString()}`));
|
|
250
385
|
if (operation == 0) {
|
|
251
|
-
return await this.
|
|
386
|
+
return await this.stores.contractInstances.addContractInstanceUpdates(contractUpdates, timestamp);
|
|
252
387
|
} else if (operation == 1) {
|
|
253
|
-
return await this.
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
return true;
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Stores the functions that were broadcasted individually.
|
|
260
|
-
*
|
|
261
|
-
* @dev Beware that there is not a delete variant of this, since they are added to contract classes
|
|
262
|
-
* and will be deleted as part of the class if needed.
|
|
263
|
-
*/ async storeBroadcastedIndividualFunctions(allLogs, _blockNum) {
|
|
264
|
-
// Filter out private and utility function broadcast events
|
|
265
|
-
const privateFnEvents = allLogs.filter((log)=>PrivateFunctionBroadcastedEvent.isPrivateFunctionBroadcastedEvent(log)).map((log)=>PrivateFunctionBroadcastedEvent.fromLog(log));
|
|
266
|
-
const utilityFnEvents = allLogs.filter((log)=>UtilityFunctionBroadcastedEvent.isUtilityFunctionBroadcastedEvent(log)).map((log)=>UtilityFunctionBroadcastedEvent.fromLog(log));
|
|
267
|
-
// Group all events by contract class id
|
|
268
|
-
for (const [classIdString, classEvents] of Object.entries(groupBy([
|
|
269
|
-
...privateFnEvents,
|
|
270
|
-
...utilityFnEvents
|
|
271
|
-
], (e)=>e.contractClassId.toString()))){
|
|
272
|
-
const contractClassId = Fr.fromHexString(classIdString);
|
|
273
|
-
const contractClass = await this.store.getContractClass(contractClassId);
|
|
274
|
-
if (!contractClass) {
|
|
275
|
-
this.log.warn(`Skipping broadcasted functions as contract class ${contractClassId.toString()} was not found`);
|
|
276
|
-
continue;
|
|
277
|
-
}
|
|
278
|
-
// Split private and utility functions, and filter out invalid ones
|
|
279
|
-
const allFns = classEvents.map((e)=>e.toFunctionWithMembershipProof());
|
|
280
|
-
const privateFns = allFns.filter((fn)=>'utilityFunctionsTreeRoot' in fn);
|
|
281
|
-
const utilityFns = allFns.filter((fn)=>'privateFunctionsArtifactTreeRoot' in fn);
|
|
282
|
-
const privateFunctionsWithValidity = await Promise.all(privateFns.map(async (fn)=>({
|
|
283
|
-
fn,
|
|
284
|
-
valid: await isValidPrivateFunctionMembershipProof(fn, contractClass)
|
|
285
|
-
})));
|
|
286
|
-
const validPrivateFns = privateFunctionsWithValidity.filter(({ valid })=>valid).map(({ fn })=>fn);
|
|
287
|
-
const utilityFunctionsWithValidity = await Promise.all(utilityFns.map(async (fn)=>({
|
|
288
|
-
fn,
|
|
289
|
-
valid: await isValidUtilityFunctionMembershipProof(fn, contractClass)
|
|
290
|
-
})));
|
|
291
|
-
const validUtilityFns = utilityFunctionsWithValidity.filter(({ valid })=>valid).map(({ fn })=>fn);
|
|
292
|
-
const validFnCount = validPrivateFns.length + validUtilityFns.length;
|
|
293
|
-
if (validFnCount !== allFns.length) {
|
|
294
|
-
this.log.warn(`Skipping ${allFns.length - validFnCount} invalid functions`);
|
|
295
|
-
}
|
|
296
|
-
// Store the functions in the contract class in a single operation
|
|
297
|
-
if (validFnCount > 0) {
|
|
298
|
-
this.log.verbose(`Storing ${validFnCount} functions for contract class ${contractClassId.toString()}`);
|
|
388
|
+
return await this.stores.contractInstances.deleteContractInstanceUpdates(contractUpdates, timestamp);
|
|
299
389
|
}
|
|
300
|
-
return await this.store.addFunctions(contractClassId, validPrivateFns, validUtilityFns);
|
|
301
390
|
}
|
|
302
391
|
return true;
|
|
303
392
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import type { L2Block } from '@aztec/stdlib/block';
|
|
3
|
+
import type { CheckpointData } from '@aztec/stdlib/checkpoint';
|
|
4
|
+
import type { L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
|
|
2
5
|
import { type LmdbStatsCallback, type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
|
|
3
6
|
export declare class ArchiverInstrumentation {
|
|
4
7
|
private telemetry;
|
|
5
8
|
readonly tracer: Tracer;
|
|
6
9
|
private blockHeight;
|
|
10
|
+
private checkpointHeight;
|
|
7
11
|
private txCount;
|
|
8
12
|
private l1BlockHeight;
|
|
9
13
|
private proofsSubmittedDelay;
|
|
@@ -12,20 +16,32 @@ export declare class ArchiverInstrumentation {
|
|
|
12
16
|
private pruneDuration;
|
|
13
17
|
private pruneCount;
|
|
14
18
|
private syncDurationPerBlock;
|
|
19
|
+
private syncDurationPerCheckpoint;
|
|
15
20
|
private syncBlockCount;
|
|
16
21
|
private manaPerBlock;
|
|
17
22
|
private txsPerBlock;
|
|
18
23
|
private syncDurationPerMessage;
|
|
19
24
|
private syncMessageCount;
|
|
20
25
|
private blockProposalTxTargetCount;
|
|
26
|
+
private checkpointL1InclusionDelay;
|
|
27
|
+
private checkpointPromotedCount;
|
|
21
28
|
private log;
|
|
22
29
|
private constructor();
|
|
23
30
|
static new(telemetry: TelemetryClient, lmdbStats?: LmdbStatsCallback): Promise<ArchiverInstrumentation>;
|
|
24
31
|
isEnabled(): boolean;
|
|
25
|
-
|
|
32
|
+
processNewProposedBlock(syncTimePerBlock: number, block: L2Block): void;
|
|
33
|
+
processNewCheckpointedBlocks(syncTimePerCheckpoint: number, blocks: L2Block[]): void;
|
|
26
34
|
processNewMessages(count: number, syncPerMessageMs: number): void;
|
|
27
35
|
processPrune(duration: number): void;
|
|
28
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Records a pending-chain reorg, where the archiver dropped proposed blocks (and world-state follows by pruning). The
|
|
38
|
+
* type distinguishes the cause: 'uncheckpointed' (slot ended without a checkpoint), 'l1_conflict' (proposed blocks
|
|
39
|
+
* conflicting with an L1 checkpoint), 'orphan' (no matching proposed checkpoint arrived before the deadline), or
|
|
40
|
+
* 'l1_mismatch' (the local checkpointed tip diverged from L1 — an L1 reorg or a pruned/missed-proof checkpoint — so
|
|
41
|
+
* already-checkpointed blocks were rewound).
|
|
42
|
+
*/
|
|
43
|
+
recordPrune(pruneType: 'uncheckpointed' | 'l1_conflict' | 'orphan' | 'l1_mismatch'): void;
|
|
44
|
+
updateLastProvenCheckpoint(checkpoint: CheckpointData): void;
|
|
29
45
|
processProofsVerified(logs: {
|
|
30
46
|
proverId: string;
|
|
31
47
|
l2BlockNumber: bigint;
|
|
@@ -33,5 +49,15 @@ export declare class ArchiverInstrumentation {
|
|
|
33
49
|
}[]): void;
|
|
34
50
|
updateL1BlockHeight(blockNumber: bigint): void;
|
|
35
51
|
recordBlockProposalTxTarget(target: string, usedTrace: boolean): void;
|
|
52
|
+
/** Records a checkpoint promoted from proposed (blob fetch skipped). */
|
|
53
|
+
processCheckpointPromoted(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Records L1 inclusion timing for a checkpoint observed on L1 (seconds into the L2 slot).
|
|
56
|
+
*/
|
|
57
|
+
processCheckpointL1Timing(data: {
|
|
58
|
+
slotNumber: SlotNumber;
|
|
59
|
+
l1Timestamp: bigint;
|
|
60
|
+
l1Constants: Pick<L1RollupConstants, 'l1GenesisTime' | 'slotDuration'>;
|
|
61
|
+
}): void;
|
|
36
62
|
}
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdHJ1bWVudGF0aW9uLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbW9kdWxlcy9pbnN0cnVtZW50YXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFFbEUsT0FBTyxLQUFLLEVBQUUsT0FBTyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDbkQsT0FBTyxLQUFLLEVBQUUsY0FBYyxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDL0QsT0FBTyxLQUFLLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUVyRSxPQUFPLEVBS0wsS0FBSyxpQkFBaUIsRUFFdEIsS0FBSyxlQUFlLEVBQ3BCLEtBQUssTUFBTSxFQUdaLE1BQU0seUJBQXlCLENBQUM7QUFFakMscUJBQWEsdUJBQXVCO0lBK0JoQyxPQUFPLENBQUMsU0FBUztJQTlCbkIsU0FBZ0IsTUFBTSxFQUFFLE1BQU0sQ0FBQztJQUUvQixPQUFPLENBQUMsV0FBVyxDQUFRO0lBQzNCLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBUTtJQUNoQyxPQUFPLENBQUMsT0FBTyxDQUFnQjtJQUMvQixPQUFPLENBQUMsYUFBYSxDQUFRO0lBQzdCLE9BQU8sQ0FBQyxvQkFBb0IsQ0FBWTtJQUN4QyxPQUFPLENBQUMsb0JBQW9CLENBQWdCO0lBQzVDLE9BQU8sQ0FBQyxTQUFTLENBQWM7SUFFL0IsT0FBTyxDQUFDLGFBQWEsQ0FBWTtJQUNqQyxPQUFPLENBQUMsVUFBVSxDQUFnQjtJQUVsQyxPQUFPLENBQUMsb0JBQW9CLENBQVk7SUFDeEMsT0FBTyxDQUFDLHlCQUF5QixDQUFZO0lBQzdDLE9BQU8sQ0FBQyxjQUFjLENBQWdCO0lBQ3RDLE9BQU8sQ0FBQyxZQUFZLENBQVk7SUFDaEMsT0FBTyxDQUFDLFdBQVcsQ0FBWTtJQUUvQixPQUFPLENBQUMsc0JBQXNCLENBQVk7SUFDMUMsT0FBTyxDQUFDLGdCQUFnQixDQUFnQjtJQUV4QyxPQUFPLENBQUMsMEJBQTBCLENBQWdCO0lBRWxELE9BQU8sQ0FBQywwQkFBMEIsQ0FBWTtJQUM5QyxPQUFPLENBQUMsdUJBQXVCLENBQWdCO0lBRS9DLE9BQU8sQ0FBQyxHQUFHLENBQTRDO0lBRXZELE9BQU8sZUE0RE47SUFFRCxPQUFvQixHQUFHLENBQUMsU0FBUyxFQUFFLGVBQWUsRUFBRSxTQUFTLENBQUMsRUFBRSxpQkFBaUIsb0NBTWhGO0lBRU0sU0FBUyxJQUFJLE9BQU8sQ0FFMUI7SUFFTSx1QkFBdUIsQ0FBQyxnQkFBZ0IsRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLE9BQU8sUUFTdEU7SUFFTSw0QkFBNEIsQ0FBQyxxQkFBcUIsRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE9BQU8sRUFBRSxRQVNuRjtJQUVNLGtCQUFrQixDQUFDLEtBQUssRUFBRSxNQUFNLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxRQU1oRTtJQUVNLFlBQVksQ0FBQyxRQUFRLEVBQUUsTUFBTSxRQUduQztJQUVEOzs7Ozs7T0FNRztJQUNJLFdBQVcsQ0FBQyxTQUFTLEVBQUUsZ0JBQWdCLEdBQUcsYUFBYSxHQUFHLFFBQVEsR0FBRyxhQUFhLFFBRXhGO0lBRU0sMEJBQTBCLENBQUMsVUFBVSxFQUFFLGNBQWMsUUFJM0Q7SUFFTSxxQkFBcUIsQ0FBQyxJQUFJLEVBQUU7UUFBRSxRQUFRLEVBQUUsTUFBTSxDQUFDO1FBQUMsYUFBYSxFQUFFLE1BQU0sQ0FBQztRQUFDLEtBQUssRUFBRSxNQUFNLENBQUE7S0FBRSxFQUFFLFFBVzlGO0lBRU0sbUJBQW1CLENBQUMsV0FBVyxFQUFFLE1BQU0sUUFFN0M7SUFFTSwyQkFBMkIsQ0FBQyxNQUFNLEVBQUUsTUFBTSxFQUFFLFNBQVMsRUFBRSxPQUFPLFFBS3BFO0lBRUQsd0VBQXdFO0lBQ2pFLHlCQUF5QixTQUUvQjtJQUVEOztPQUVHO0lBQ0kseUJBQXlCLENBQUMsSUFBSSxFQUFFO1FBQ3JDLFVBQVUsRUFBRSxVQUFVLENBQUM7UUFDdkIsV0FBVyxFQUFFLE1BQU0sQ0FBQztRQUNwQixXQUFXLEVBQUUsSUFBSSxDQUFDLGlCQUFpQixFQUFFLGVBQWUsR0FBRyxjQUFjLENBQUMsQ0FBQztLQUN4RSxHQUFHLElBQUksQ0FJUDtDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../src/modules/instrumentation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../src/modules/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAKL,KAAK,iBAAiB,EAEtB,KAAK,eAAe,EACpB,KAAK,MAAM,EAGZ,MAAM,yBAAyB,CAAC;AAEjC,qBAAa,uBAAuB;IA+BhC,OAAO,CAAC,SAAS;IA9BnB,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,gBAAgB,CAAQ;IAChC,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,oBAAoB,CAAY;IACxC,OAAO,CAAC,oBAAoB,CAAgB;IAC5C,OAAO,CAAC,SAAS,CAAc;IAE/B,OAAO,CAAC,aAAa,CAAY;IACjC,OAAO,CAAC,UAAU,CAAgB;IAElC,OAAO,CAAC,oBAAoB,CAAY;IACxC,OAAO,CAAC,yBAAyB,CAAY;IAC7C,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,YAAY,CAAY;IAChC,OAAO,CAAC,WAAW,CAAY;IAE/B,OAAO,CAAC,sBAAsB,CAAY;IAC1C,OAAO,CAAC,gBAAgB,CAAgB;IAExC,OAAO,CAAC,0BAA0B,CAAgB;IAElD,OAAO,CAAC,0BAA0B,CAAY;IAC9C,OAAO,CAAC,uBAAuB,CAAgB;IAE/C,OAAO,CAAC,GAAG,CAA4C;IAEvD,OAAO,eA4DN;IAED,OAAoB,GAAG,CAAC,SAAS,EAAE,eAAe,EAAE,SAAS,CAAC,EAAE,iBAAiB,oCAMhF;IAEM,SAAS,IAAI,OAAO,CAE1B;IAEM,uBAAuB,CAAC,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAStE;IAEM,4BAA4B,CAAC,qBAAqB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QASnF;IAEM,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,QAMhE;IAEM,YAAY,CAAC,QAAQ,EAAE,MAAM,QAGnC;IAED;;;;;;OAMG;IACI,WAAW,CAAC,SAAS,EAAE,gBAAgB,GAAG,aAAa,GAAG,QAAQ,GAAG,aAAa,QAExF;IAEM,0BAA0B,CAAC,UAAU,EAAE,cAAc,QAI3D;IAEM,qBAAqB,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,QAW9F;IAEM,mBAAmB,CAAC,WAAW,EAAE,MAAM,QAE7C;IAEM,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,QAKpE;IAED,wEAAwE;IACjE,yBAAyB,SAE/B;IAED;;OAEG;IACI,yBAAyB,CAAC,IAAI,EAAE;QACrC,UAAU,EAAE,UAAU,CAAC;QACvB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,IAAI,CAAC,iBAAiB,EAAE,eAAe,GAAG,cAAc,CAAC,CAAC;KACxE,GAAG,IAAI,CAIP;CACF"}
|