@aztec/archiver 0.0.1-commit.5de5ca79e → 0.0.1-commit.6201a7b05
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 +12 -6
- package/dest/archiver.d.ts +16 -7
- package/dest/archiver.d.ts.map +1 -1
- package/dest/archiver.js +104 -48
- package/dest/config.d.ts +3 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +14 -3
- package/dest/errors.d.ts +41 -2
- package/dest/errors.d.ts.map +1 -1
- package/dest/errors.js +62 -1
- package/dest/factory.d.ts +2 -2
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +9 -7
- package/dest/index.d.ts +3 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +2 -1
- package/dest/l1/calldata_retriever.d.ts +2 -1
- package/dest/l1/calldata_retriever.d.ts.map +1 -1
- package/dest/l1/calldata_retriever.js +11 -5
- package/dest/l1/data_retrieval.d.ts +19 -10
- package/dest/l1/data_retrieval.d.ts.map +1 -1
- package/dest/l1/data_retrieval.js +25 -32
- 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/modules/data_source_base.d.ts +8 -2
- package/dest/modules/data_source_base.d.ts.map +1 -1
- package/dest/modules/data_source_base.js +19 -1
- package/dest/modules/data_store_updater.d.ts +15 -10
- package/dest/modules/data_store_updater.d.ts.map +1 -1
- package/dest/modules/data_store_updater.js +71 -68
- package/dest/modules/instrumentation.d.ts +7 -2
- package/dest/modules/instrumentation.d.ts.map +1 -1
- package/dest/modules/instrumentation.js +22 -6
- package/dest/modules/l1_synchronizer.d.ts +7 -2
- package/dest/modules/l1_synchronizer.d.ts.map +1 -1
- package/dest/modules/l1_synchronizer.js +261 -143
- package/dest/modules/validation.d.ts +4 -3
- package/dest/modules/validation.d.ts.map +1 -1
- package/dest/modules/validation.js +6 -6
- package/dest/store/block_store.d.ts +72 -5
- package/dest/store/block_store.d.ts.map +1 -1
- package/dest/store/block_store.js +341 -66
- package/dest/store/contract_class_store.d.ts +2 -3
- package/dest/store/contract_class_store.d.ts.map +1 -1
- package/dest/store/contract_class_store.js +7 -67
- package/dest/store/contract_instance_store.d.ts +1 -1
- package/dest/store/contract_instance_store.d.ts.map +1 -1
- package/dest/store/contract_instance_store.js +6 -2
- package/dest/store/kv_archiver_store.d.ts +51 -17
- package/dest/store/kv_archiver_store.d.ts.map +1 -1
- package/dest/store/kv_archiver_store.js +60 -16
- package/dest/store/l2_tips_cache.d.ts +2 -1
- package/dest/store/l2_tips_cache.d.ts.map +1 -1
- package/dest/store/l2_tips_cache.js +27 -7
- package/dest/store/log_store.d.ts +1 -1
- package/dest/store/log_store.d.ts.map +1 -1
- package/dest/store/log_store.js +2 -4
- package/dest/store/message_store.d.ts +3 -3
- package/dest/store/message_store.d.ts.map +1 -1
- package/dest/store/message_store.js +9 -10
- package/dest/test/fake_l1_state.d.ts +15 -3
- package/dest/test/fake_l1_state.d.ts.map +1 -1
- package/dest/test/fake_l1_state.js +80 -18
- 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 +16 -2
- package/dest/test/mock_l2_block_source.d.ts.map +1 -1
- package/dest/test/mock_l2_block_source.js +50 -3
- package/dest/test/noop_l1_archiver.d.ts +1 -1
- package/dest/test/noop_l1_archiver.d.ts.map +1 -1
- package/dest/test/noop_l1_archiver.js +4 -2
- package/package.json +13 -13
- package/src/archiver.ts +126 -46
- package/src/config.ts +15 -1
- package/src/errors.ts +97 -2
- package/src/factory.ts +13 -7
- package/src/index.ts +2 -1
- package/src/l1/calldata_retriever.ts +17 -5
- package/src/l1/data_retrieval.ts +36 -45
- package/src/l1/validate_historical_logs.ts +140 -0
- package/src/modules/data_source_base.ts +32 -1
- package/src/modules/data_store_updater.ts +98 -97
- package/src/modules/instrumentation.ts +27 -7
- package/src/modules/l1_synchronizer.ts +328 -169
- package/src/modules/validation.ts +10 -9
- package/src/store/block_store.ts +419 -76
- package/src/store/contract_class_store.ts +8 -106
- package/src/store/contract_instance_store.ts +8 -5
- package/src/store/kv_archiver_store.ts +100 -32
- package/src/store/l2_tips_cache.ts +58 -13
- package/src/store/log_store.ts +2 -5
- package/src/store/message_store.ts +10 -12
- package/src/structs/inbox_message.ts +1 -1
- package/src/test/fake_l1_state.ts +99 -27
- package/src/test/mock_l1_to_l2_message_source.ts +1 -0
- package/src/test/mock_l2_block_source.ts +58 -2
- package/src/test/noop_l1_archiver.ts +3 -1
|
@@ -6,20 +6,21 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
6
6
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
7
7
|
import { bufferToHex } from '@aztec/foundation/string';
|
|
8
8
|
import { isDefined } from '@aztec/foundation/types';
|
|
9
|
-
import { Body, CheckpointedL2Block, CommitteeAttestation, L2Block, deserializeValidateCheckpointResult, serializeValidateCheckpointResult } from '@aztec/stdlib/block';
|
|
10
|
-
import { L1PublishedData } from '@aztec/stdlib/checkpoint';
|
|
9
|
+
import { BlockHash, Body, CheckpointedL2Block, CommitteeAttestation, L2Block, deserializeValidateCheckpointResult, serializeValidateCheckpointResult } from '@aztec/stdlib/block';
|
|
10
|
+
import { Checkpoint, L1PublishedData } from '@aztec/stdlib/checkpoint';
|
|
11
11
|
import { getEpochAtSlot } from '@aztec/stdlib/epoch-helpers';
|
|
12
12
|
import { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
13
13
|
import { AppendOnlyTreeSnapshot } from '@aztec/stdlib/trees';
|
|
14
14
|
import { BlockHeader, TxHash, TxReceipt, TxStatus, deserializeIndexedTxEffect, serializeIndexedTxEffect } from '@aztec/stdlib/tx';
|
|
15
|
-
import { BlockAlreadyCheckpointedError, BlockArchiveNotConsistentError, BlockIndexNotSequentialError, BlockNotFoundError, BlockNumberNotSequentialError, CannotOverwriteCheckpointedBlockError, CheckpointNotFoundError, CheckpointNumberNotSequentialError, InitialCheckpointNumberNotSequentialError } from '../errors.js';
|
|
15
|
+
import { BlockAlreadyCheckpointedError, BlockArchiveNotConsistentError, BlockCheckpointNumberNotSequentialError, BlockIndexNotSequentialError, BlockNotFoundError, BlockNumberNotSequentialError, CannotOverwriteCheckpointedBlockError, CheckpointNotFoundError, CheckpointNumberNotSequentialError, InitialCheckpointNumberNotSequentialError, NoProposedCheckpointToPromoteError, ProposedCheckpointArchiveRootMismatchError, ProposedCheckpointNotSequentialError, ProposedCheckpointPromotionNotSequentialError } from '../errors.js';
|
|
16
16
|
export { TxReceipt } from '@aztec/stdlib/tx';
|
|
17
17
|
/**
|
|
18
18
|
* LMDB-based block storage for the archiver.
|
|
19
19
|
*/ export class BlockStore {
|
|
20
20
|
db;
|
|
21
21
|
/** Map block number to block data */ #blocks;
|
|
22
|
-
/** Map checkpoint number
|
|
22
|
+
/** Map keyed by checkpoint number holding proposed (locally-validated, not yet L1-confirmed) checkpoints. */ #proposedCheckpoints;
|
|
23
|
+
/** Map checkpoint number to checkpoint data for mined checkpoints only */ #checkpoints;
|
|
23
24
|
/** Map slot number to checkpoint number, for looking up checkpoints by slot range. */ #slotToCheckpoint;
|
|
24
25
|
/** Map block hash to list of tx hashes */ #blockTxs;
|
|
25
26
|
/** Tx hash to serialized IndexedTxEffect */ #txEffects;
|
|
@@ -46,6 +47,7 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
46
47
|
this.#pendingChainValidationStatus = db.openSingleton('archiver_pending_chain_validation_status');
|
|
47
48
|
this.#checkpoints = db.openMap('archiver_checkpoints');
|
|
48
49
|
this.#slotToCheckpoint = db.openMap('archiver_slot_to_checkpoint');
|
|
50
|
+
this.#proposedCheckpoints = db.openMap('archiver_proposed_checkpoints');
|
|
49
51
|
}
|
|
50
52
|
/**
|
|
51
53
|
* Returns the finalized L2 block number. An L2 block is finalized when it was proven
|
|
@@ -75,8 +77,8 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
75
77
|
const blockIndex = block.indexWithinCheckpoint;
|
|
76
78
|
const blockLastArchive = block.header.lastArchive.root;
|
|
77
79
|
// Extract the latest block and checkpoint numbers
|
|
78
|
-
const previousBlockNumber = await this.
|
|
79
|
-
const
|
|
80
|
+
const previousBlockNumber = await this.getLatestL2BlockNumber();
|
|
81
|
+
const latestCheckpointNumber = await this.getLatestCheckpointNumber();
|
|
80
82
|
// Verify we're not overwriting checkpointed blocks
|
|
81
83
|
const lastCheckpointedBlockNumber = await this.getCheckpointedL2BlockNumber();
|
|
82
84
|
if (!opts.force && blockNumber <= lastCheckpointedBlockNumber) {
|
|
@@ -91,9 +93,17 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
91
93
|
if (!opts.force && previousBlockNumber !== blockNumber - 1) {
|
|
92
94
|
throw new BlockNumberNotSequentialError(blockNumber, previousBlockNumber);
|
|
93
95
|
}
|
|
94
|
-
//
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
// Accept the block if either the confirmed checkpoint or a pending checkpoint matches
|
|
97
|
+
// the expected predecessor. We look for a pending entry at exactly blockCheckpointNumber - 1.
|
|
98
|
+
const expectedCheckpointNumber = blockCheckpointNumber - 1;
|
|
99
|
+
const hasPendingAtExpected = await this.#proposedCheckpoints.hasAsync(expectedCheckpointNumber);
|
|
100
|
+
if (!opts.force && latestCheckpointNumber !== expectedCheckpointNumber && !hasPendingAtExpected) {
|
|
101
|
+
const [latestPendingKey] = await toArray(this.#proposedCheckpoints.keysAsync({
|
|
102
|
+
reverse: true,
|
|
103
|
+
limit: 1
|
|
104
|
+
}));
|
|
105
|
+
const previous = CheckpointNumber(Math.max(latestCheckpointNumber, latestPendingKey ?? 0));
|
|
106
|
+
throw new BlockCheckpointNumberNotSequentialError(blockNumber, blockCheckpointNumber, previous);
|
|
97
107
|
}
|
|
98
108
|
// Extract the previous block if there is one and see if it is for the same checkpoint or not
|
|
99
109
|
const previousBlockResult = await this.getBlock(previousBlockNumber);
|
|
@@ -118,7 +128,7 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
118
128
|
});
|
|
119
129
|
}
|
|
120
130
|
/**
|
|
121
|
-
* Append new
|
|
131
|
+
* Append new checkpoints to the store's list.
|
|
122
132
|
* @param checkpoints - The L2 checkpoints to be added to the store.
|
|
123
133
|
* @returns True if the operation is successful.
|
|
124
134
|
*/ async addCheckpoints(checkpoints, opts = {}) {
|
|
@@ -126,32 +136,26 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
126
136
|
return true;
|
|
127
137
|
}
|
|
128
138
|
return await this.db.transactionAsync(async ()=>{
|
|
129
|
-
// Check that the checkpoint immediately before the first block to be added is present in the store.
|
|
130
139
|
const firstCheckpointNumber = checkpoints[0].checkpoint.number;
|
|
131
140
|
const previousCheckpointNumber = await this.getLatestCheckpointNumber();
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
previousCheckpointData = await this.getCheckpointData(previousCheckpointNumber);
|
|
140
|
-
if (previousCheckpointData === undefined) {
|
|
141
|
-
throw new CheckpointNotFoundError(previousCheckpointNumber);
|
|
141
|
+
// Handle already-stored checkpoints at the start of the batch.
|
|
142
|
+
// This can happen after an L1 reorg re-includes a checkpoint in a different L1 block.
|
|
143
|
+
// We accept them if archives match (same content) and update their L1 metadata.
|
|
144
|
+
if (!opts.force && firstCheckpointNumber <= previousCheckpointNumber) {
|
|
145
|
+
checkpoints = await this.skipOrUpdateAlreadyStoredCheckpoints(checkpoints, previousCheckpointNumber);
|
|
146
|
+
if (checkpoints.length === 0) {
|
|
147
|
+
return true;
|
|
142
148
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
if (previousCheckpointData !== undefined) {
|
|
148
|
-
previousBlockNumber = BlockNumber(previousCheckpointData.startBlock + previousCheckpointData.blockCount - 1);
|
|
149
|
-
previousBlock = await this.getBlock(previousBlockNumber);
|
|
150
|
-
if (previousBlock === undefined) {
|
|
151
|
-
// We should be able to get the required previous block
|
|
152
|
-
throw new BlockNotFoundError(previousBlockNumber);
|
|
149
|
+
// Re-check sequentiality after skipping
|
|
150
|
+
const newFirstNumber = checkpoints[0].checkpoint.number;
|
|
151
|
+
if (previousCheckpointNumber !== newFirstNumber - 1) {
|
|
152
|
+
throw new InitialCheckpointNumberNotSequentialError(newFirstNumber, previousCheckpointNumber);
|
|
153
153
|
}
|
|
154
|
+
} else if (previousCheckpointNumber !== firstCheckpointNumber - 1 && !opts.force) {
|
|
155
|
+
throw new InitialCheckpointNumberNotSequentialError(firstCheckpointNumber, previousCheckpointNumber);
|
|
154
156
|
}
|
|
157
|
+
// Get the last block of the previous checkpoint for archive chaining
|
|
158
|
+
let previousBlock = await this.getPreviousCheckpointBlock(checkpoints[0].checkpoint.number);
|
|
155
159
|
// Iterate over checkpoints array and insert them, checking that the block numbers are sequential.
|
|
156
160
|
let previousCheckpoint = undefined;
|
|
157
161
|
for (const checkpoint of checkpoints){
|
|
@@ -159,33 +163,13 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
159
163
|
throw new CheckpointNumberNotSequentialError(checkpoint.checkpoint.number, previousCheckpoint.checkpoint.number);
|
|
160
164
|
}
|
|
161
165
|
previousCheckpoint = checkpoint;
|
|
162
|
-
//
|
|
166
|
+
// Validate block sequencing, indexes, and archive chaining
|
|
167
|
+
this.validateCheckpointBlocks(checkpoint.checkpoint.blocks, previousBlock);
|
|
168
|
+
// Store every block in the database (may already exist, but L1 data is authoritative)
|
|
163
169
|
for(let i = 0; i < checkpoint.checkpoint.blocks.length; i++){
|
|
164
|
-
|
|
165
|
-
if (previousBlock) {
|
|
166
|
-
// The blocks should have a sequential block number
|
|
167
|
-
if (previousBlock.number !== block.number - 1) {
|
|
168
|
-
throw new BlockNumberNotSequentialError(block.number, previousBlock.number);
|
|
169
|
-
}
|
|
170
|
-
// If the blocks are for the same checkpoint then they should have sequential indexes
|
|
171
|
-
if (previousBlock.checkpointNumber === block.checkpointNumber && previousBlock.indexWithinCheckpoint !== block.indexWithinCheckpoint - 1) {
|
|
172
|
-
throw new BlockIndexNotSequentialError(block.indexWithinCheckpoint, previousBlock.indexWithinCheckpoint);
|
|
173
|
-
}
|
|
174
|
-
if (!previousBlock.archive.root.equals(block.header.lastArchive.root)) {
|
|
175
|
-
throw new BlockArchiveNotConsistentError(block.number, previousBlock.number, block.header.lastArchive.root, previousBlock.archive.root);
|
|
176
|
-
}
|
|
177
|
-
} else {
|
|
178
|
-
// No previous block, must be block 1 at checkpoint index 0
|
|
179
|
-
if (block.indexWithinCheckpoint !== 0) {
|
|
180
|
-
throw new BlockIndexNotSequentialError(block.indexWithinCheckpoint, undefined);
|
|
181
|
-
}
|
|
182
|
-
if (block.number !== INITIAL_L2_BLOCK_NUM) {
|
|
183
|
-
throw new BlockNumberNotSequentialError(block.number, undefined);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
previousBlock = block;
|
|
187
|
-
await this.addBlockToDatabase(block, checkpoint.checkpoint.number, i);
|
|
170
|
+
await this.addBlockToDatabase(checkpoint.checkpoint.blocks[i], checkpoint.checkpoint.number, i);
|
|
188
171
|
}
|
|
172
|
+
previousBlock = checkpoint.checkpoint.blocks.at(-1);
|
|
189
173
|
// Store the checkpoint in the database
|
|
190
174
|
await this.#checkpoints.set(checkpoint.checkpoint.number, {
|
|
191
175
|
header: checkpoint.checkpoint.header.toBuffer(),
|
|
@@ -195,15 +179,102 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
195
179
|
attestations: checkpoint.attestations.map((attestation)=>attestation.toBuffer()),
|
|
196
180
|
checkpointNumber: checkpoint.checkpoint.number,
|
|
197
181
|
startBlock: checkpoint.checkpoint.blocks[0].number,
|
|
198
|
-
blockCount: checkpoint.checkpoint.blocks.length
|
|
182
|
+
blockCount: checkpoint.checkpoint.blocks.length,
|
|
183
|
+
feeAssetPriceModifier: checkpoint.checkpoint.feeAssetPriceModifier.toString()
|
|
199
184
|
});
|
|
200
185
|
// Update slot-to-checkpoint index
|
|
201
186
|
await this.#slotToCheckpoint.set(checkpoint.checkpoint.header.slotNumber, checkpoint.checkpoint.number);
|
|
187
|
+
// Remove proposed checkpoint if it exists, since L1 is authoritative
|
|
188
|
+
await this.#proposedCheckpoints.delete(checkpoint.checkpoint.number);
|
|
202
189
|
}
|
|
203
190
|
await this.#lastSynchedL1Block.set(checkpoints[checkpoints.length - 1].l1.blockNumber);
|
|
204
191
|
return true;
|
|
205
192
|
});
|
|
206
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Handles checkpoints at the start of a batch that are already stored (e.g. due to L1 reorg).
|
|
196
|
+
* Verifies the archive root matches, updates L1 metadata, and returns only the new checkpoints.
|
|
197
|
+
*/ async skipOrUpdateAlreadyStoredCheckpoints(checkpoints, latestStored) {
|
|
198
|
+
let i = 0;
|
|
199
|
+
for(; i < checkpoints.length && checkpoints[i].checkpoint.number <= latestStored; i++){
|
|
200
|
+
const incoming = checkpoints[i];
|
|
201
|
+
const stored = await this.getCheckpointData(incoming.checkpoint.number);
|
|
202
|
+
if (!stored) {
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
// Verify the checkpoint content matches (archive root)
|
|
206
|
+
if (!stored.archive.root.equals(incoming.checkpoint.archive.root)) {
|
|
207
|
+
throw new Error(`Checkpoint ${incoming.checkpoint.number} already exists in store but with a different archive root. ` + `Stored: ${stored.archive.root}, incoming: ${incoming.checkpoint.archive.root}`);
|
|
208
|
+
}
|
|
209
|
+
// Update L1 metadata and attestations for the already-stored checkpoint
|
|
210
|
+
this.#log.warn(`Checkpoint ${incoming.checkpoint.number} already stored, updating L1 info ` + `(L1 block ${stored.l1.blockNumber} -> ${incoming.l1.blockNumber})`);
|
|
211
|
+
await this.#checkpoints.set(incoming.checkpoint.number, {
|
|
212
|
+
header: incoming.checkpoint.header.toBuffer(),
|
|
213
|
+
archive: incoming.checkpoint.archive.toBuffer(),
|
|
214
|
+
checkpointOutHash: incoming.checkpoint.getCheckpointOutHash().toBuffer(),
|
|
215
|
+
l1: incoming.l1.toBuffer(),
|
|
216
|
+
attestations: incoming.attestations.map((a)=>a.toBuffer()),
|
|
217
|
+
checkpointNumber: incoming.checkpoint.number,
|
|
218
|
+
startBlock: incoming.checkpoint.blocks[0].number,
|
|
219
|
+
blockCount: incoming.checkpoint.blocks.length,
|
|
220
|
+
feeAssetPriceModifier: incoming.checkpoint.feeAssetPriceModifier.toString()
|
|
221
|
+
});
|
|
222
|
+
// Update the sync point to reflect the new L1 block
|
|
223
|
+
await this.#lastSynchedL1Block.set(incoming.l1.blockNumber);
|
|
224
|
+
}
|
|
225
|
+
return checkpoints.slice(i);
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Gets the last block of the checkpoint before the given one.
|
|
229
|
+
* Returns undefined if there is no previous checkpoint (i.e. genesis).
|
|
230
|
+
*/ async getPreviousCheckpointBlock(checkpointNumber) {
|
|
231
|
+
const previousCheckpointNumber = CheckpointNumber(checkpointNumber - 1);
|
|
232
|
+
if (previousCheckpointNumber === INITIAL_CHECKPOINT_NUMBER - 1) {
|
|
233
|
+
return undefined;
|
|
234
|
+
}
|
|
235
|
+
// Check across both proposed and mined checkpoints
|
|
236
|
+
const predecessor = await this.getProposedCheckpointByNumber(previousCheckpointNumber) ?? await this.getCheckpointData(previousCheckpointNumber);
|
|
237
|
+
if (!predecessor) {
|
|
238
|
+
throw new CheckpointNotFoundError(previousCheckpointNumber);
|
|
239
|
+
}
|
|
240
|
+
const previousBlockNumber = BlockNumber(predecessor.startBlock + predecessor.blockCount - 1);
|
|
241
|
+
const previousBlock = await this.getBlock(previousBlockNumber);
|
|
242
|
+
if (previousBlock === undefined) {
|
|
243
|
+
throw new BlockNotFoundError(previousBlockNumber);
|
|
244
|
+
}
|
|
245
|
+
return previousBlock;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Validates that blocks are sequential, have correct indexes, and chain via archive roots.
|
|
249
|
+
* This is the same validation used for both confirmed checkpoints (addCheckpoints) and
|
|
250
|
+
* proposed checkpoints (addProposedCheckpoint).
|
|
251
|
+
*/ validateCheckpointBlocks(blocks, previousBlock) {
|
|
252
|
+
for (const block of blocks){
|
|
253
|
+
if (previousBlock) {
|
|
254
|
+
if (previousBlock.number !== block.number - 1) {
|
|
255
|
+
throw new BlockNumberNotSequentialError(block.number, previousBlock.number);
|
|
256
|
+
}
|
|
257
|
+
if (previousBlock.checkpointNumber === block.checkpointNumber) {
|
|
258
|
+
if (previousBlock.indexWithinCheckpoint !== block.indexWithinCheckpoint - 1) {
|
|
259
|
+
throw new BlockIndexNotSequentialError(block.indexWithinCheckpoint, previousBlock.indexWithinCheckpoint);
|
|
260
|
+
}
|
|
261
|
+
} else if (block.indexWithinCheckpoint !== 0) {
|
|
262
|
+
throw new BlockIndexNotSequentialError(block.indexWithinCheckpoint, previousBlock.indexWithinCheckpoint);
|
|
263
|
+
}
|
|
264
|
+
if (!previousBlock.archive.root.equals(block.header.lastArchive.root)) {
|
|
265
|
+
throw new BlockArchiveNotConsistentError(block.number, previousBlock.number, block.header.lastArchive.root, previousBlock.archive.root);
|
|
266
|
+
}
|
|
267
|
+
} else {
|
|
268
|
+
if (block.indexWithinCheckpoint !== 0) {
|
|
269
|
+
throw new BlockIndexNotSequentialError(block.indexWithinCheckpoint, undefined);
|
|
270
|
+
}
|
|
271
|
+
if (block.number !== INITIAL_L2_BLOCK_NUM) {
|
|
272
|
+
throw new BlockNumberNotSequentialError(block.number, undefined);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
previousBlock = block;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
207
278
|
async addBlockToDatabase(block, checkpointNumber, indexWithinCheckpoint) {
|
|
208
279
|
const blockHash = await block.hash();
|
|
209
280
|
await this.#blocks.set(block.number, {
|
|
@@ -281,6 +352,8 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
281
352
|
await this.#checkpoints.delete(c);
|
|
282
353
|
this.#log.debug(`Removed checkpoint ${c}`);
|
|
283
354
|
}
|
|
355
|
+
// Evict all pending checkpoints > checkpointNumber (their base chain no longer exists)
|
|
356
|
+
await this.evictProposedCheckpointsFrom(CheckpointNumber(checkpointNumber + 1));
|
|
284
357
|
return {
|
|
285
358
|
blocksRemoved
|
|
286
359
|
};
|
|
@@ -325,6 +398,7 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
325
398
|
checkpointNumber: CheckpointNumber(checkpointStorage.checkpointNumber),
|
|
326
399
|
startBlock: BlockNumber(checkpointStorage.startBlock),
|
|
327
400
|
blockCount: checkpointStorage.blockCount,
|
|
401
|
+
feeAssetPriceModifier: BigInt(checkpointStorage.feeAssetPriceModifier),
|
|
328
402
|
l1: L1PublishedData.fromBuffer(checkpointStorage.l1),
|
|
329
403
|
attestations: checkpointStorage.attestations.map((buf)=>CommitteeAttestation.fromBuffer(buf))
|
|
330
404
|
};
|
|
@@ -373,7 +447,7 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
373
447
|
return await this.db.transactionAsync(async ()=>{
|
|
374
448
|
const removedBlocks = [];
|
|
375
449
|
// Get the latest block number to determine the range
|
|
376
|
-
const latestBlockNumber = await this.
|
|
450
|
+
const latestBlockNumber = await this.getLatestL2BlockNumber();
|
|
377
451
|
// Iterate from blockNumber + 1 to latestBlockNumber
|
|
378
452
|
for(let bn = blockNumber + 1; bn <= latestBlockNumber; bn++){
|
|
379
453
|
const block = await this.getBlock(BlockNumber(bn));
|
|
@@ -400,13 +474,6 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
400
474
|
return BlockNumber(checkpointStorage.startBlock + checkpointStorage.blockCount - 1);
|
|
401
475
|
}
|
|
402
476
|
}
|
|
403
|
-
async getLatestBlockNumber() {
|
|
404
|
-
const [latestBlocknumber] = await toArray(this.#blocks.keysAsync({
|
|
405
|
-
reverse: true,
|
|
406
|
-
limit: 1
|
|
407
|
-
}));
|
|
408
|
-
return typeof latestBlocknumber === 'number' ? BlockNumber(latestBlocknumber) : BlockNumber(INITIAL_L2_BLOCK_NUM - 1);
|
|
409
|
-
}
|
|
410
477
|
async getLatestCheckpointNumber() {
|
|
411
478
|
const [latestCheckpointNumber] = await toArray(this.#checkpoints.keysAsync({
|
|
412
479
|
reverse: true,
|
|
@@ -417,6 +484,142 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
417
484
|
}
|
|
418
485
|
return CheckpointNumber(latestCheckpointNumber);
|
|
419
486
|
}
|
|
487
|
+
async hasProposedCheckpoint() {
|
|
488
|
+
const [key] = await toArray(this.#proposedCheckpoints.keysAsync({
|
|
489
|
+
limit: 1
|
|
490
|
+
}));
|
|
491
|
+
return key !== undefined;
|
|
492
|
+
}
|
|
493
|
+
/** Deletes all pending proposed checkpoints from storage. */ async deleteProposedCheckpoints() {
|
|
494
|
+
for await (const key of this.#proposedCheckpoints.keysAsync()){
|
|
495
|
+
await this.#proposedCheckpoints.delete(key);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Promotes a specific pending checkpoint to a confirmed checkpoint entry.
|
|
500
|
+
* This persists the checkpoint to the store, removes only that pending entry, and updates the L1 sync point.
|
|
501
|
+
* Remaining pending entries (e.g. N+1, N+2) are left intact — they chain off the just-promoted one.
|
|
502
|
+
* @param checkpointNumber - The checkpoint number to promote.
|
|
503
|
+
* @param l1 - L1 published data for the checkpoint.
|
|
504
|
+
* @param attestations - Committee attestations.
|
|
505
|
+
* @param expectedArchiveRoot - Archive root guard against races.
|
|
506
|
+
*/ async promoteProposedToCheckpointed(checkpointNumber, l1, attestations, expectedArchiveRoot) {
|
|
507
|
+
return await this.db.transactionAsync(async ()=>{
|
|
508
|
+
const proposed = await this.getProposedCheckpointByNumber(checkpointNumber);
|
|
509
|
+
if (!proposed) {
|
|
510
|
+
throw new NoProposedCheckpointToPromoteError();
|
|
511
|
+
}
|
|
512
|
+
if (!proposed.archive.root.equals(expectedArchiveRoot)) {
|
|
513
|
+
throw new ProposedCheckpointArchiveRootMismatchError(expectedArchiveRoot, proposed.archive.root);
|
|
514
|
+
}
|
|
515
|
+
// Verify sequentiality: promoted checkpoint must follow the latest confirmed one
|
|
516
|
+
const latestCheckpointNumber = await this.getLatestCheckpointNumber();
|
|
517
|
+
if (latestCheckpointNumber !== proposed.checkpointNumber - 1) {
|
|
518
|
+
throw new ProposedCheckpointPromotionNotSequentialError(proposed.checkpointNumber, latestCheckpointNumber);
|
|
519
|
+
}
|
|
520
|
+
// Write the checkpoint entry
|
|
521
|
+
await this.#checkpoints.set(proposed.checkpointNumber, {
|
|
522
|
+
header: proposed.header.toBuffer(),
|
|
523
|
+
archive: proposed.archive.toBuffer(),
|
|
524
|
+
checkpointOutHash: proposed.checkpointOutHash.toBuffer(),
|
|
525
|
+
l1: l1.toBuffer(),
|
|
526
|
+
attestations: attestations.map((attestation)=>attestation.toBuffer()),
|
|
527
|
+
checkpointNumber: proposed.checkpointNumber,
|
|
528
|
+
startBlock: proposed.startBlock,
|
|
529
|
+
blockCount: proposed.blockCount,
|
|
530
|
+
feeAssetPriceModifier: proposed.feeAssetPriceModifier.toString()
|
|
531
|
+
});
|
|
532
|
+
// Update the slot-to-checkpoint index
|
|
533
|
+
await this.#slotToCheckpoint.set(proposed.header.slotNumber, proposed.checkpointNumber);
|
|
534
|
+
// Remove only this pending entry — remaining entries N+1, N+2, ... stay valid
|
|
535
|
+
await this.#proposedCheckpoints.delete(proposed.checkpointNumber);
|
|
536
|
+
// Update the last synced L1 block
|
|
537
|
+
await this.#lastSynchedL1Block.set(l1.blockNumber);
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Returns the latest pending checkpoint (highest-numbered entry), or undefined if none.
|
|
542
|
+
* No fallback to confirmed.
|
|
543
|
+
*/ async getLastProposedCheckpoint() {
|
|
544
|
+
const [key] = await toArray(this.#proposedCheckpoints.keysAsync({
|
|
545
|
+
reverse: true,
|
|
546
|
+
limit: 1
|
|
547
|
+
}));
|
|
548
|
+
if (key === undefined) {
|
|
549
|
+
return undefined;
|
|
550
|
+
}
|
|
551
|
+
const stored = await this.#proposedCheckpoints.getAsync(key);
|
|
552
|
+
return stored ? this.convertToProposedCheckpointData(stored) : undefined;
|
|
553
|
+
}
|
|
554
|
+
/** Returns the pending checkpoint for a specific checkpoint number, or undefined if not found. */ async getProposedCheckpointByNumber(n) {
|
|
555
|
+
const stored = await this.#proposedCheckpoints.getAsync(n);
|
|
556
|
+
return stored ? this.convertToProposedCheckpointData(stored) : undefined;
|
|
557
|
+
}
|
|
558
|
+
/** Returns all pending checkpoints in ascending checkpoint-number order. */ async getProposedCheckpoints() {
|
|
559
|
+
const results = [];
|
|
560
|
+
for await (const [, stored] of this.#proposedCheckpoints.entriesAsync()){
|
|
561
|
+
results.push(this.convertToProposedCheckpointData(stored));
|
|
562
|
+
}
|
|
563
|
+
return results;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Evicts all pending checkpoints with checkpoint number >= fromNumber.
|
|
567
|
+
* Used for divergent-mined-checkpoint cleanup: when L1 mines checkpoint N with a different archive,
|
|
568
|
+
* all pending >= N must be evicted since they chain off the now-invalid pending N.
|
|
569
|
+
*/ async evictProposedCheckpointsFrom(fromNumber) {
|
|
570
|
+
const keysToDelete = [];
|
|
571
|
+
for await (const key of this.#proposedCheckpoints.keysAsync()){
|
|
572
|
+
if (key >= fromNumber) {
|
|
573
|
+
keysToDelete.push(key);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
for (const key of keysToDelete){
|
|
577
|
+
await this.#proposedCheckpoints.delete(key);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Gets the checkpoint at the proposed tip:
|
|
582
|
+
* - latest pending checkpoint if any exist
|
|
583
|
+
* - fallsback to latest confirmed checkpoint otherwise
|
|
584
|
+
*/ async getLastCheckpoint() {
|
|
585
|
+
const latest = await this.getLastProposedCheckpoint();
|
|
586
|
+
if (!latest) {
|
|
587
|
+
return this.getCheckpointData(await this.getLatestCheckpointNumber());
|
|
588
|
+
}
|
|
589
|
+
return latest;
|
|
590
|
+
}
|
|
591
|
+
convertToProposedCheckpointData(stored) {
|
|
592
|
+
return {
|
|
593
|
+
checkpointNumber: CheckpointNumber(stored.checkpointNumber),
|
|
594
|
+
header: CheckpointHeader.fromBuffer(stored.header),
|
|
595
|
+
archive: AppendOnlyTreeSnapshot.fromBuffer(stored.archive),
|
|
596
|
+
checkpointOutHash: Fr.fromBuffer(stored.checkpointOutHash),
|
|
597
|
+
startBlock: BlockNumber(stored.startBlock),
|
|
598
|
+
blockCount: stored.blockCount,
|
|
599
|
+
totalManaUsed: BigInt(stored.totalManaUsed),
|
|
600
|
+
feeAssetPriceModifier: BigInt(stored.feeAssetPriceModifier)
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Attempts to get the proposedCheckpoint's number, if there is not one, then fallback to the latest confirmed checkpoint number.
|
|
605
|
+
* @returns CheckpointNumber
|
|
606
|
+
*/ async getProposedCheckpointNumber() {
|
|
607
|
+
const proposed = await this.getLastCheckpoint();
|
|
608
|
+
if (!proposed) {
|
|
609
|
+
return await this.getLatestCheckpointNumber();
|
|
610
|
+
}
|
|
611
|
+
return CheckpointNumber(proposed.checkpointNumber);
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Attempts to get the proposedCheckpoint's block number, if there is not one, then fallback to the checkpointed block number
|
|
615
|
+
* @returns BlockNumber
|
|
616
|
+
*/ async getProposedCheckpointL2BlockNumber() {
|
|
617
|
+
const proposed = await this.getLastCheckpoint();
|
|
618
|
+
if (!proposed) {
|
|
619
|
+
return await this.getCheckpointedL2BlockNumber();
|
|
620
|
+
}
|
|
621
|
+
return BlockNumber(proposed.startBlock + proposed.blockCount - 1);
|
|
622
|
+
}
|
|
420
623
|
async getCheckpointedBlock(number) {
|
|
421
624
|
const blockStorage = await this.#blocks.getAsync(number);
|
|
422
625
|
if (!blockStorage) {
|
|
@@ -490,6 +693,37 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
490
693
|
return this.getBlockDataFromBlockStorage(blockStorage);
|
|
491
694
|
}
|
|
492
695
|
/**
|
|
696
|
+
* Gets block metadata plus checkpoint-derived context (L1 publish info, attestations) without
|
|
697
|
+
* deserializing tx bodies. When the block's containing checkpoint has not yet been L1-confirmed,
|
|
698
|
+
* `checkpoint` and `l1` are `undefined` and `attestations` is empty.
|
|
699
|
+
*/ async getBlockDataWithCheckpointContext(blockNumber) {
|
|
700
|
+
const blockStorage = await this.#blocks.getAsync(blockNumber);
|
|
701
|
+
if (!blockStorage || !blockStorage.header) {
|
|
702
|
+
return undefined;
|
|
703
|
+
}
|
|
704
|
+
const data = this.getBlockDataFromBlockStorage(blockStorage);
|
|
705
|
+
const checkpointStorage = await this.#checkpoints.getAsync(blockStorage.checkpointNumber);
|
|
706
|
+
if (!checkpointStorage) {
|
|
707
|
+
return {
|
|
708
|
+
data,
|
|
709
|
+
checkpoint: undefined,
|
|
710
|
+
l1: undefined,
|
|
711
|
+
attestations: []
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
const checkpoint = this.checkpointDataFromCheckpointStorage(checkpointStorage);
|
|
715
|
+
return {
|
|
716
|
+
data,
|
|
717
|
+
checkpoint,
|
|
718
|
+
l1: checkpoint.l1,
|
|
719
|
+
attestations: checkpoint.attestations
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
/** Returns the checkpoint number that contains the given slot (or undefined if not found). */ async getCheckpointNumberBySlot(slot) {
|
|
723
|
+
const checkpointNumber = await this.#slotToCheckpoint.getAsync(slot);
|
|
724
|
+
return checkpointNumber === undefined ? undefined : CheckpointNumber(checkpointNumber);
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
493
727
|
* Gets block metadata (without tx data) by archive root.
|
|
494
728
|
* @param archive - The archive root of the block to return.
|
|
495
729
|
* @returns The requested block data.
|
|
@@ -594,7 +828,7 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
594
828
|
return {
|
|
595
829
|
header: BlockHeader.fromBuffer(blockStorage.header),
|
|
596
830
|
archive: AppendOnlyTreeSnapshot.fromBuffer(blockStorage.archive),
|
|
597
|
-
blockHash:
|
|
831
|
+
blockHash: BlockHash.fromBuffer(blockStorage.blockHash),
|
|
598
832
|
checkpointNumber: CheckpointNumber(blockStorage.checkpointNumber),
|
|
599
833
|
indexWithinCheckpoint: IndexWithinCheckpoint(blockStorage.indexWithinCheckpoint)
|
|
600
834
|
};
|
|
@@ -716,6 +950,47 @@ export { TxReceipt } from '@aztec/stdlib/tx';
|
|
|
716
950
|
setSynchedL1BlockNumber(l1BlockNumber) {
|
|
717
951
|
return this.#lastSynchedL1Block.set(l1BlockNumber);
|
|
718
952
|
}
|
|
953
|
+
/**
|
|
954
|
+
* Adds a proposed checkpoint to the pending queue.
|
|
955
|
+
* Accepts proposed.checkpointNumber === latestTip + 1, where latestTip is the highest of
|
|
956
|
+
* confirmed and the highest pending checkpoint number.
|
|
957
|
+
* Computes archive and checkpointOutHash from the stored blocks.
|
|
958
|
+
*/ async addProposedCheckpoint(proposed) {
|
|
959
|
+
return await this.db.transactionAsync(async ()=>{
|
|
960
|
+
const confirmed = await this.getLatestCheckpointNumber();
|
|
961
|
+
const [latestPendingKey] = await toArray(this.#proposedCheckpoints.keysAsync({
|
|
962
|
+
reverse: true,
|
|
963
|
+
limit: 1
|
|
964
|
+
}));
|
|
965
|
+
const latestTip = CheckpointNumber(latestPendingKey !== undefined ? Math.max(latestPendingKey, confirmed) : confirmed);
|
|
966
|
+
if (proposed.checkpointNumber !== latestTip + 1) {
|
|
967
|
+
throw new ProposedCheckpointNotSequentialError(proposed.checkpointNumber, latestTip);
|
|
968
|
+
}
|
|
969
|
+
// Ensure the predecessor block (from pending or confirmed chain) exists
|
|
970
|
+
const previousBlock = await this.getPreviousCheckpointBlock(proposed.checkpointNumber);
|
|
971
|
+
const blocks = [];
|
|
972
|
+
for(let i = 0; i < proposed.blockCount; i++){
|
|
973
|
+
const block = await this.getBlock(BlockNumber(proposed.startBlock + i));
|
|
974
|
+
if (!block) {
|
|
975
|
+
throw new BlockNotFoundError(proposed.startBlock + i);
|
|
976
|
+
}
|
|
977
|
+
blocks.push(block);
|
|
978
|
+
}
|
|
979
|
+
this.validateCheckpointBlocks(blocks, previousBlock);
|
|
980
|
+
const archive = blocks[blocks.length - 1].archive;
|
|
981
|
+
const checkpointOutHash = Checkpoint.getCheckpointOutHash(blocks);
|
|
982
|
+
await this.#proposedCheckpoints.set(proposed.checkpointNumber, {
|
|
983
|
+
header: proposed.header.toBuffer(),
|
|
984
|
+
archive: archive.toBuffer(),
|
|
985
|
+
checkpointOutHash: checkpointOutHash.toBuffer(),
|
|
986
|
+
checkpointNumber: proposed.checkpointNumber,
|
|
987
|
+
startBlock: proposed.startBlock,
|
|
988
|
+
blockCount: proposed.blockCount,
|
|
989
|
+
totalManaUsed: proposed.totalManaUsed.toString(),
|
|
990
|
+
feeAssetPriceModifier: proposed.feeAssetPriceModifier.toString()
|
|
991
|
+
});
|
|
992
|
+
});
|
|
993
|
+
}
|
|
719
994
|
async getProvenCheckpointNumber() {
|
|
720
995
|
const [latestCheckpointNumber, provenCheckpointNumber] = await Promise.all([
|
|
721
996
|
this.getLatestCheckpointNumber(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
3
|
-
import type { ContractClassPublic
|
|
3
|
+
import type { ContractClassPublic } from '@aztec/stdlib/contract';
|
|
4
4
|
/**
|
|
5
5
|
* LMDB-based contract class storage for the archiver.
|
|
6
6
|
*/
|
|
@@ -13,6 +13,5 @@ export declare class ContractClassStore {
|
|
|
13
13
|
getContractClass(id: Fr): Promise<ContractClassPublic | undefined>;
|
|
14
14
|
getBytecodeCommitment(id: Fr): Promise<Fr | undefined>;
|
|
15
15
|
getContractClassIds(): Promise<Fr[]>;
|
|
16
|
-
addFunctions(contractClassId: Fr, newPrivateFunctions: ExecutablePrivateFunctionWithMembershipProof[], newUtilityFunctions: UtilityFunctionWithMembershipProof[]): Promise<boolean>;
|
|
17
16
|
}
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RfY2xhc3Nfc3RvcmUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdG9yZS9jb250cmFjdF9jbGFzc19zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFHcEQsT0FBTyxLQUFLLEVBQUUsaUJBQWlCLEVBQWlCLE1BQU0saUJBQWlCLENBQUM7QUFDeEUsT0FBTyxLQUFLLEVBQUUsbUJBQW1CLEVBQXNDLE1BQU0sd0JBQXdCLENBQUM7QUFFdEc7O0dBRUc7QUFDSCxxQkFBYSxrQkFBa0I7O0lBSWpCLE9BQU8sQ0FBQyxFQUFFO0lBQXRCLFlBQW9CLEVBQUUsRUFBRSxpQkFBaUIsRUFHeEM7SUFFSyxnQkFBZ0IsQ0FDcEIsYUFBYSxFQUFFLG1CQUFtQixFQUNsQyxrQkFBa0IsRUFBRSxFQUFFLEVBQ3RCLFdBQVcsRUFBRSxNQUFNLEdBQ2xCLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FZZjtJQUVLLHFCQUFxQixDQUFDLGFBQWEsRUFBRSxtQkFBbUIsRUFBRSxXQUFXLEVBQUUsTUFBTSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FRbEc7SUFFSyxnQkFBZ0IsQ0FBQyxFQUFFLEVBQUUsRUFBRSxHQUFHLE9BQU8sQ0FBQyxtQkFBbUIsR0FBRyxTQUFTLENBQUMsQ0FHdkU7SUFFSyxxQkFBcUIsQ0FBQyxFQUFFLEVBQUUsRUFBRSxHQUFHLE9BQU8sQ0FBQyxFQUFFLEdBQUcsU0FBUyxDQUFDLENBRzNEO0lBRUssbUJBQW1CLElBQUksT0FBTyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBRXpDO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_class_store.d.ts","sourceRoot":"","sources":["../../src/store/contract_class_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAGpD,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"contract_class_store.d.ts","sourceRoot":"","sources":["../../src/store/contract_class_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAGpD,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAsC,MAAM,wBAAwB,CAAC;AAEtG;;GAEG;AACH,qBAAa,kBAAkB;;IAIjB,OAAO,CAAC,EAAE;IAAtB,YAAoB,EAAE,EAAE,iBAAiB,EAGxC;IAEK,gBAAgB,CACpB,aAAa,EAAE,mBAAmB,EAClC,kBAAkB,EAAE,EAAE,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAYf;IAEK,qBAAqB,CAAC,aAAa,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQlG;IAEK,gBAAgB,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAGvE;IAEK,qBAAqB,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC,CAG3D;IAEK,mBAAmB,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAEzC;CACF"}
|