@aztec/archiver 0.0.1-commit.4d3c002 → 0.0.1-commit.4d9804df

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.
Files changed (124) hide show
  1. package/README.md +7 -5
  2. package/dest/archiver.d.ts +70 -15
  3. package/dest/archiver.d.ts.map +1 -1
  4. package/dest/archiver.js +274 -71
  5. package/dest/config.d.ts +7 -3
  6. package/dest/config.d.ts.map +1 -1
  7. package/dest/config.js +39 -16
  8. package/dest/errors.d.ts +35 -13
  9. package/dest/errors.d.ts.map +1 -1
  10. package/dest/errors.js +54 -16
  11. package/dest/factory.d.ts +11 -6
  12. package/dest/factory.d.ts.map +1 -1
  13. package/dest/factory.js +35 -21
  14. package/dest/index.d.ts +11 -3
  15. package/dest/index.d.ts.map +1 -1
  16. package/dest/index.js +10 -2
  17. package/dest/l1/calldata_retriever.d.ts +9 -1
  18. package/dest/l1/calldata_retriever.d.ts.map +1 -1
  19. package/dest/l1/calldata_retriever.js +20 -10
  20. package/dest/l1/data_retrieval.d.ts +24 -10
  21. package/dest/l1/data_retrieval.d.ts.map +1 -1
  22. package/dest/l1/data_retrieval.js +13 -19
  23. package/dest/l1/trace_tx.d.ts +12 -66
  24. package/dest/l1/trace_tx.d.ts.map +1 -1
  25. package/dest/l1/validate_historical_logs.d.ts +23 -0
  26. package/dest/l1/validate_historical_logs.d.ts.map +1 -0
  27. package/dest/l1/validate_historical_logs.js +108 -0
  28. package/dest/modules/contract_data_source_adapter.d.ts +25 -0
  29. package/dest/modules/contract_data_source_adapter.d.ts.map +1 -0
  30. package/dest/modules/contract_data_source_adapter.js +32 -0
  31. package/dest/modules/data_source_base.d.ts +71 -50
  32. package/dest/modules/data_source_base.d.ts.map +1 -1
  33. package/dest/modules/data_source_base.js +250 -150
  34. package/dest/modules/data_store_updater.d.ts +28 -9
  35. package/dest/modules/data_store_updater.d.ts.map +1 -1
  36. package/dest/modules/data_store_updater.js +121 -61
  37. package/dest/modules/instrumentation.d.ts +15 -2
  38. package/dest/modules/instrumentation.d.ts.map +1 -1
  39. package/dest/modules/instrumentation.js +48 -9
  40. package/dest/modules/l1_synchronizer.d.ts +11 -7
  41. package/dest/modules/l1_synchronizer.d.ts.map +1 -1
  42. package/dest/modules/l1_synchronizer.js +347 -118
  43. package/dest/modules/outbox_trees_resolver.d.ts +62 -0
  44. package/dest/modules/outbox_trees_resolver.d.ts.map +1 -0
  45. package/dest/modules/outbox_trees_resolver.js +162 -0
  46. package/dest/modules/validation.d.ts +30 -7
  47. package/dest/modules/validation.d.ts.map +1 -1
  48. package/dest/modules/validation.js +33 -15
  49. package/dest/store/block_store.d.ts +167 -94
  50. package/dest/store/block_store.d.ts.map +1 -1
  51. package/dest/store/block_store.js +524 -260
  52. package/dest/store/contract_class_store.d.ts +17 -3
  53. package/dest/store/contract_class_store.d.ts.map +1 -1
  54. package/dest/store/contract_class_store.js +36 -2
  55. package/dest/store/contract_instance_store.d.ts +28 -1
  56. package/dest/store/contract_instance_store.d.ts.map +1 -1
  57. package/dest/store/contract_instance_store.js +49 -1
  58. package/dest/store/data_stores.d.ts +68 -0
  59. package/dest/store/data_stores.d.ts.map +1 -0
  60. package/dest/store/data_stores.js +54 -0
  61. package/dest/store/function_names_cache.d.ts +17 -0
  62. package/dest/store/function_names_cache.d.ts.map +1 -0
  63. package/dest/store/function_names_cache.js +30 -0
  64. package/dest/store/l2_tips_cache.d.ts +13 -8
  65. package/dest/store/l2_tips_cache.d.ts.map +1 -1
  66. package/dest/store/l2_tips_cache.js +13 -96
  67. package/dest/store/log_store.d.ts +42 -40
  68. package/dest/store/log_store.d.ts.map +1 -1
  69. package/dest/store/log_store.js +257 -480
  70. package/dest/store/log_store_codec.d.ts +78 -0
  71. package/dest/store/log_store_codec.d.ts.map +1 -0
  72. package/dest/store/log_store_codec.js +110 -0
  73. package/dest/store/message_store.d.ts +9 -3
  74. package/dest/store/message_store.d.ts.map +1 -1
  75. package/dest/store/message_store.js +31 -1
  76. package/dest/test/fake_l1_state.d.ts +7 -3
  77. package/dest/test/fake_l1_state.d.ts.map +1 -1
  78. package/dest/test/fake_l1_state.js +45 -18
  79. package/dest/test/mock_l1_to_l2_message_source.d.ts +1 -1
  80. package/dest/test/mock_l1_to_l2_message_source.d.ts.map +1 -1
  81. package/dest/test/mock_l1_to_l2_message_source.js +1 -2
  82. package/dest/test/mock_l2_block_source.d.ts +47 -54
  83. package/dest/test/mock_l2_block_source.d.ts.map +1 -1
  84. package/dest/test/mock_l2_block_source.js +229 -205
  85. package/dest/test/mock_structs.d.ts +1 -1
  86. package/dest/test/mock_structs.d.ts.map +1 -1
  87. package/dest/test/mock_structs.js +2 -2
  88. package/dest/test/noop_l1_archiver.d.ts +14 -6
  89. package/dest/test/noop_l1_archiver.d.ts.map +1 -1
  90. package/dest/test/noop_l1_archiver.js +26 -10
  91. package/package.json +14 -14
  92. package/src/archiver.ts +355 -77
  93. package/src/config.ts +43 -20
  94. package/src/errors.ts +80 -23
  95. package/src/factory.ts +46 -19
  96. package/src/index.ts +18 -2
  97. package/src/l1/calldata_retriever.ts +27 -10
  98. package/src/l1/data_retrieval.ts +38 -36
  99. package/src/l1/validate_historical_logs.ts +140 -0
  100. package/src/modules/contract_data_source_adapter.ts +46 -0
  101. package/src/modules/data_source_base.ts +319 -200
  102. package/src/modules/data_store_updater.ts +146 -64
  103. package/src/modules/instrumentation.ts +43 -10
  104. package/src/modules/l1_synchronizer.ts +499 -136
  105. package/src/modules/outbox_trees_resolver.ts +199 -0
  106. package/src/modules/validation.ts +78 -21
  107. package/src/store/block_store.ts +627 -321
  108. package/src/store/contract_class_store.ts +47 -3
  109. package/src/store/contract_instance_store.ts +61 -1
  110. package/src/store/data_stores.ts +104 -0
  111. package/src/store/function_names_cache.ts +37 -0
  112. package/src/store/l2_tips_cache.ts +16 -109
  113. package/src/store/log_store.ts +296 -652
  114. package/src/store/log_store_codec.ts +143 -0
  115. package/src/store/message_store.ts +35 -2
  116. package/src/test/fake_l1_state.ts +50 -27
  117. package/src/test/mock_l1_to_l2_message_source.ts +0 -1
  118. package/src/test/mock_l2_block_source.ts +276 -258
  119. package/src/test/mock_structs.ts +5 -2
  120. package/src/test/noop_l1_archiver.ts +54 -11
  121. package/dest/store/kv_archiver_store.d.ts +0 -377
  122. package/dest/store/kv_archiver_store.d.ts.map +0 -1
  123. package/dest/store/kv_archiver_store.js +0 -494
  124. package/src/store/kv_archiver_store.ts +0 -713
@@ -1,222 +1,322 @@
1
- import { range } from '@aztec/foundation/array';
2
- import { BlockNumber } from '@aztec/foundation/branded-types';
3
- import { isDefined } from '@aztec/foundation/types';
1
+ import { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
2
+ import { BlockNumber, CheckpointNumber, IndexWithinCheckpoint } from '@aztec/foundation/branded-types';
3
+ import { Body, L2Block } from '@aztec/stdlib/block';
4
4
  import { Checkpoint, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
5
- import { getSlotRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
5
+ import { getEpochAtSlot, getEpochNumberAtTimestamp, getLastL1SlotTimestampForL2Slot, getProofSubmissionDeadlineEpoch, getSlotRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
6
+ import { AppendOnlyTreeSnapshot } from '@aztec/stdlib/trees';
6
7
  /**
7
- * Abstract base class implementing ArchiverDataSource using a KVArchiverDataStore.
8
- * Provides implementations for all store-delegating methods and declares abstract methods
9
- * for L1-dependent functionality that subclasses must implement.
8
+ * Abstract base class implementing ArchiverDataSource using a bundle of archiver substores.
9
+ * Provides implementations for all read-side methods and declares abstract methods for
10
+ * L1-dependent functionality that subclasses must implement.
10
11
  */ export class ArchiverDataSourceBase {
11
- store;
12
+ stores;
12
13
  l1Constants;
13
- constructor(store, l1Constants){
14
- this.store = store;
14
+ /** The injected genesis block header. */ initialHeader;
15
+ /** Precomputed hash of the initial header, exposed via {@link getGenesisBlockHash}. */ initialBlockHash;
16
+ /** Archive root after block 0 was appended — read from L1 (`Rollup.getGenesisArchiveTreeRoot`). */ genesisArchiveRoot;
17
+ /** Memoized synthetic genesis block — callers rely on referential identity for caching. */ genesisBlock;
18
+ /** Memoized synthetic genesis block data — kept consistent with {@link genesisBlock}. */ genesisBlockData;
19
+ constructor(stores, l1Constants, initialHeader, initialBlockHash, genesisArchiveRoot){
20
+ this.stores = stores;
15
21
  this.l1Constants = l1Constants;
22
+ this.initialHeader = initialHeader;
23
+ this.initialBlockHash = initialBlockHash;
24
+ this.genesisArchiveRoot = genesisArchiveRoot;
25
+ const genesisArchive = new AppendOnlyTreeSnapshot(genesisArchiveRoot, 1);
26
+ this.genesisBlock = new L2Block(genesisArchive, initialHeader, Body.empty(), CheckpointNumber.ZERO, IndexWithinCheckpoint(0));
27
+ this.genesisBlockData = {
28
+ header: initialHeader,
29
+ archive: genesisArchive,
30
+ blockHash: initialBlockHash,
31
+ checkpointNumber: CheckpointNumber.ZERO,
32
+ indexWithinCheckpoint: IndexWithinCheckpoint(0)
33
+ };
16
34
  }
17
- getCheckpointNumber() {
18
- return this.store.getSynchedCheckpointNumber();
19
- }
20
- getSynchedCheckpointNumber() {
21
- return this.store.getSynchedCheckpointNumber();
35
+ /** Returns the precomputed hash of the genesis block header. */ getGenesisBlockHash() {
36
+ return this.initialBlockHash;
22
37
  }
23
- getProvenCheckpointNumber() {
24
- return this.store.getProvenCheckpointNumber();
38
+ /** Returns the synthetic genesis L2Block (memoized — same instance across calls). */ getGenesisBlock() {
39
+ return this.genesisBlock;
25
40
  }
26
- getBlockNumber() {
27
- return this.store.getLatestBlockNumber();
41
+ /** Returns genesis block data (memoized — same instance across calls). */ getGenesisBlockData() {
42
+ return this.genesisBlockData;
28
43
  }
29
- getProvenBlockNumber() {
30
- return this.store.getProvenBlockNumber();
44
+ /**
45
+ * Type guard distinguishing the genesis sentinel from a {@link ResolvedBlockQuery}.
46
+ * `resolveBlockQuery` already rewrites every genesis-matching shape to the sentinel,
47
+ * so callers only need this single sync check.
48
+ */ isGenesisBlockQuery(query) {
49
+ return 'genesis' in query;
31
50
  }
32
- async getBlockHeader(number) {
33
- const blockNumber = number === 'latest' ? await this.store.getLatestBlockNumber() : number;
34
- if (blockNumber === 0) {
35
- return undefined;
51
+ async isPruneDueAtSlot(slot) {
52
+ if (!this.l1Constants) {
53
+ throw new Error('isPruneDueAtSlot requires l1Constants');
36
54
  }
37
- const headers = await this.store.getBlockHeaders(blockNumber, 1);
38
- return headers.length === 0 ? undefined : headers[0];
39
- }
40
- getCheckpointedBlock(number) {
41
- return this.store.getCheckpointedBlock(number);
55
+ const tips = await this.getL2Tips();
56
+ const proven = tips.proven.checkpoint.number;
57
+ const pending = tips.checkpointed.checkpoint.number;
58
+ if (pending === proven) {
59
+ return false;
60
+ }
61
+ const oldestUnproven = await this.getCheckpointData({
62
+ number: CheckpointNumber(Number(proven) + 1)
63
+ });
64
+ if (!oldestUnproven) {
65
+ return false;
66
+ }
67
+ const slotTs = getLastL1SlotTimestampForL2Slot(slot, this.l1Constants);
68
+ const slotEpoch = getEpochNumberAtTimestamp(slotTs, this.l1Constants);
69
+ const oldestUnprovenEpoch = getEpochAtSlot(oldestUnproven.header.slotNumber, this.l1Constants);
70
+ const deadlineEpoch = getProofSubmissionDeadlineEpoch(oldestUnprovenEpoch, this.l1Constants);
71
+ return slotEpoch >= deadlineEpoch;
42
72
  }
43
- getCheckpointedL2BlockNumber() {
44
- return this.store.getCheckpointedL2BlockNumber();
73
+ getCheckpointNumber() {
74
+ return this.stores.blocks.getLatestCheckpointNumber();
45
75
  }
46
- getFinalizedL2BlockNumber() {
47
- return this.store.getFinalizedL2BlockNumber();
76
+ getProvenCheckpointNumber() {
77
+ return this.stores.blocks.getProvenCheckpointNumber();
48
78
  }
49
- async getCheckpointHeader(number) {
50
- if (number === 'latest') {
51
- number = await this.store.getSynchedCheckpointNumber();
79
+ async getBlockNumber(query) {
80
+ if (!query) {
81
+ return this.stores.blocks.getLatestL2BlockNumber();
52
82
  }
53
- if (number === 0) {
83
+ const resolved = await this.resolveBlockQuery(query);
84
+ if (resolved === undefined) {
54
85
  return undefined;
55
86
  }
56
- const checkpoint = await this.store.getCheckpointData(number);
57
- if (!checkpoint) {
58
- return undefined;
87
+ if (this.isGenesisBlockQuery(resolved)) {
88
+ return BlockNumber.ZERO;
89
+ }
90
+ return this.stores.blocks.getBlockNumber(resolved);
91
+ }
92
+ /**
93
+ * Resolves a {@link CheckpointQuery} to a concrete `CheckpointNumber`, or undefined when the
94
+ * query refers to a position that has no checkpoint yet (e.g. `{ slot }` not found).
95
+ */ resolveCheckpointQuery(query) {
96
+ if ('number' in query) {
97
+ return Promise.resolve(query.number);
98
+ }
99
+ if ('slot' in query) {
100
+ return this.stores.blocks.getCheckpointNumberBySlot(query.slot);
101
+ }
102
+ // tag variant
103
+ switch(query.tag){
104
+ case 'checkpointed':
105
+ return this.stores.blocks.getLatestCheckpointNumber();
106
+ case 'proven':
107
+ return this.stores.blocks.getProvenCheckpointNumber();
108
+ case 'finalized':
109
+ return this.stores.blocks.getFinalizedCheckpointNumber();
59
110
  }
60
- return checkpoint.header;
61
111
  }
62
- async getLastBlockNumberInCheckpoint(checkpointNumber) {
63
- const checkpointData = await this.store.getCheckpointData(checkpointNumber);
64
- if (!checkpointData) {
112
+ async getCheckpoint(query) {
113
+ const number = await this.resolveCheckpointQuery(query);
114
+ if (number === undefined || number === 0) {
65
115
  return undefined;
66
116
  }
67
- return BlockNumber(checkpointData.startBlock + checkpointData.blockCount - 1);
68
- }
69
- getCheckpointedBlocks(from, limit) {
70
- return this.store.getCheckpointedBlocks(from, limit);
71
- }
72
- getBlockHeaderByHash(blockHash) {
73
- return this.store.getBlockHeaderByHash(blockHash);
117
+ const data = await this.stores.blocks.getCheckpointData(number);
118
+ if (!data) {
119
+ return undefined;
120
+ }
121
+ return this.getPublishedCheckpointFromCheckpointData(data);
74
122
  }
75
- getBlockHeaderByArchive(archive) {
76
- return this.store.getBlockHeaderByArchive(archive);
123
+ async getCheckpoints(query) {
124
+ const checkpoints = await this.getCheckpointsData(query);
125
+ return Promise.all(checkpoints.map((ch)=>this.getPublishedCheckpointFromCheckpointData(ch)));
77
126
  }
78
- getBlockData(number) {
79
- return this.store.getBlockData(number);
127
+ async getCheckpointData(query) {
128
+ const number = await this.resolveCheckpointQuery(query);
129
+ if (number === undefined || number === 0) {
130
+ return undefined;
131
+ }
132
+ return this.stores.blocks.getCheckpointData(number);
80
133
  }
81
- getBlockDataByArchive(archive) {
82
- return this.store.getBlockDataByArchive(archive);
134
+ async getCheckpointsData(query) {
135
+ if ('fromSlot' in query) {
136
+ return this.stores.blocks.getCheckpointsBySlot(query.fromSlot, query.limit, query.reverse ?? false);
137
+ }
138
+ if ('from' in query) {
139
+ return this.stores.blocks.getRangeOfCheckpoints(query.from, query.limit);
140
+ }
141
+ const numbers = await this.getCheckpointNumbersForEpoch(query.epoch);
142
+ return numbers.length > 0 ? this.stores.blocks.getRangeOfCheckpoints(numbers[0], numbers.length) : [];
83
143
  }
84
- async getL2Block(number) {
85
- // If the number provided is -ve, then return the latest block.
86
- if (number < 0) {
87
- number = await this.store.getLatestBlockNumber();
144
+ getProposedCheckpointData(query) {
145
+ if (!query || 'tag' in query) {
146
+ return this.stores.blocks.getLastProposedCheckpoint();
88
147
  }
89
- if (number === 0) {
90
- return undefined;
148
+ if ('number' in query) {
149
+ return this.stores.blocks.getProposedCheckpointByNumber(query.number);
91
150
  }
92
- const publishedBlock = await this.store.getBlock(number);
93
- return publishedBlock;
151
+ return this.stores.blocks.getProposedCheckpointBySlot(query.slot);
94
152
  }
95
153
  getTxEffect(txHash) {
96
- return this.store.getTxEffect(txHash);
97
- }
98
- getSettledTxReceipt(txHash) {
99
- return this.store.getSettledTxReceipt(txHash, this.l1Constants);
100
- }
101
- getProposedCheckpoint() {
102
- return this.store.getProposedCheckpoint();
103
- }
104
- getProposedCheckpointOnly() {
105
- return this.store.getProposedCheckpointOnly();
154
+ return this.stores.blocks.getTxEffect(txHash);
106
155
  }
107
156
  isPendingChainInvalid() {
108
157
  return this.getPendingChainValidationStatus().then((status)=>!status.valid);
109
158
  }
110
159
  async getPendingChainValidationStatus() {
111
- return await this.store.getPendingChainValidationStatus() ?? {
160
+ return await this.stores.blocks.getPendingChainValidationStatus() ?? {
112
161
  valid: true
113
162
  };
114
163
  }
115
- getPrivateLogsByTags(tags, page, upToBlockNumber) {
116
- return this.store.getPrivateLogsByTags(tags, page, upToBlockNumber);
164
+ getPrivateLogsByTags(query) {
165
+ return this.stores.logs.getPrivateLogsByTags(query);
117
166
  }
118
- getPublicLogsByTagsFromContract(contractAddress, tags, page, upToBlockNumber) {
119
- return this.store.getPublicLogsByTagsFromContract(contractAddress, tags, page, upToBlockNumber);
120
- }
121
- getPublicLogs(filter) {
122
- return this.store.getPublicLogs(filter);
123
- }
124
- getContractClassLogs(filter) {
125
- return this.store.getContractClassLogs(filter);
167
+ getPublicLogsByTags(query) {
168
+ return this.stores.logs.getPublicLogsByTags(query);
126
169
  }
127
170
  getContractClass(id) {
128
- return this.store.getContractClass(id);
171
+ return this.stores.contractClasses.getContractClass(id);
129
172
  }
130
173
  getBytecodeCommitment(id) {
131
- return this.store.getBytecodeCommitment(id);
174
+ return this.stores.contractClasses.getBytecodeCommitment(id);
132
175
  }
133
- async getContract(address, maybeTimestamp) {
134
- let timestamp;
135
- if (maybeTimestamp === undefined) {
136
- const latestBlockHeader = await this.getBlockHeader('latest');
137
- // If we get undefined block header, it means that the archiver has not yet synced any block so we default to 0.
138
- timestamp = latestBlockHeader ? latestBlockHeader.globalVariables.timestamp : 0n;
139
- } else {
140
- timestamp = maybeTimestamp;
141
- }
142
- return this.store.getContractInstance(address, timestamp);
176
+ getContract(address, timestamp) {
177
+ return this.stores.contractInstances.getContractInstance(address, timestamp);
143
178
  }
144
179
  getContractClassIds() {
145
- return this.store.getContractClassIds();
180
+ return this.stores.contractClasses.getContractClassIds();
146
181
  }
147
- getDebugFunctionName(address, selector) {
148
- return this.store.getDebugFunctionName(address, selector);
182
+ /** Looks up a public function name given a selector. */ getDebugFunctionName(_address, selector) {
183
+ return Promise.resolve(this.stores.functionNames.get(selector));
149
184
  }
150
- registerContractFunctionSignatures(signatures) {
151
- return this.store.registerContractFunctionSignatures(signatures);
185
+ /** Register public function signatures so they can be looked up by selector. */ registerContractFunctionSignatures(signatures) {
186
+ return this.stores.functionNames.register(signatures);
152
187
  }
153
188
  getL1ToL2Messages(checkpointNumber) {
154
- return this.store.getL1ToL2Messages(checkpointNumber);
189
+ return this.stores.messages.getL1ToL2Messages(checkpointNumber);
155
190
  }
156
191
  getL1ToL2MessageIndex(l1ToL2Message) {
157
- return this.store.getL1ToL2MessageIndex(l1ToL2Message);
158
- }
159
- async getCheckpoints(checkpointNumber, limit) {
160
- const checkpoints = await this.store.getRangeOfCheckpoints(checkpointNumber, limit);
161
- return Promise.all(checkpoints.map((ch)=>this.getPublishedCheckpointFromCheckpointData(ch)));
192
+ return this.stores.messages.getL1ToL2MessageIndex(l1ToL2Message);
162
193
  }
163
194
  async getPublishedCheckpointFromCheckpointData(checkpoint) {
164
- const blocksForCheckpoint = await this.store.getBlocksForCheckpoint(checkpoint.checkpointNumber);
195
+ const blocksForCheckpoint = await this.stores.blocks.getBlocksForCheckpoint(checkpoint.checkpointNumber);
165
196
  if (!blocksForCheckpoint) {
166
197
  throw new Error(`Blocks for checkpoint ${checkpoint.checkpointNumber} not found`);
167
198
  }
168
- const fullCheckpoint = new Checkpoint(checkpoint.archive, checkpoint.header, blocksForCheckpoint, checkpoint.checkpointNumber);
199
+ const fullCheckpoint = new Checkpoint(checkpoint.archive, checkpoint.header, blocksForCheckpoint, checkpoint.checkpointNumber, checkpoint.feeAssetPriceModifier);
169
200
  return new PublishedCheckpoint(fullCheckpoint, checkpoint.l1, checkpoint.attestations);
170
201
  }
171
202
  getBlocksForSlot(slotNumber) {
172
- return this.store.getBlocksForSlot(slotNumber);
173
- }
174
- async getCheckpointedBlocksForEpoch(epochNumber) {
175
- const checkpointsData = await this.getCheckpointsDataForEpoch(epochNumber);
176
- const blocks = await Promise.all(checkpointsData.flatMap((checkpoint)=>range(checkpoint.blockCount, checkpoint.startBlock).map((blockNumber)=>this.getCheckpointedBlock(BlockNumber(blockNumber)))));
177
- return blocks.filter(isDefined);
178
- }
179
- async getCheckpointedBlockHeadersForEpoch(epochNumber) {
180
- const checkpointsData = await this.getCheckpointsDataForEpoch(epochNumber);
181
- const blocks = await Promise.all(checkpointsData.flatMap((checkpoint)=>range(checkpoint.blockCount, checkpoint.startBlock).map((blockNumber)=>this.getBlockHeader(BlockNumber(blockNumber)))));
182
- return blocks.filter(isDefined);
203
+ return this.stores.blocks.getBlocksForSlot(slotNumber);
183
204
  }
184
- async getCheckpointsForEpoch(epochNumber) {
185
- const checkpointsData = await this.getCheckpointsDataForEpoch(epochNumber);
186
- return Promise.all(checkpointsData.map((data)=>this.getPublishedCheckpointFromCheckpointData(data).then((p)=>p.checkpoint)));
187
- }
188
- /** Returns checkpoint data for all checkpoints whose slot falls within the given epoch. */ getCheckpointsDataForEpoch(epochNumber) {
205
+ /** Returns just the checkpoint numbers for all checkpoints whose slot falls within the given epoch. */ getCheckpointNumbersForEpoch(epochNumber) {
189
206
  if (!this.l1Constants) {
190
207
  throw new Error('L1 constants not set');
191
208
  }
192
209
  const [start, end] = getSlotRangeForEpoch(epochNumber, this.l1Constants);
193
- return this.store.getCheckpointDataForSlotRange(start, end);
210
+ return this.stores.blocks.getCheckpointNumbersForSlotRange(start, end);
194
211
  }
195
- async getBlock(number) {
196
- // If the number provided is -ve, then return the latest block.
197
- if (number < 0) {
198
- number = await this.store.getLatestBlockNumber();
212
+ async getBlock(query) {
213
+ const resolved = await this.resolveBlockQuery(query);
214
+ if (resolved === undefined) {
215
+ return undefined;
199
216
  }
200
- if (number === 0) {
217
+ if (this.isGenesisBlockQuery(resolved)) {
218
+ return this.getGenesisBlock();
219
+ }
220
+ return this.stores.blocks.getBlock(resolved);
221
+ }
222
+ /**
223
+ * Range queries iterate physical blocks only; the genesis block is NOT prepended.
224
+ * `L2BlockStream` consumers (`world-state.handleL2Blocks`, etc.) emit `blocks-added` events for
225
+ * real blocks and would be surprised by a synthetic block 0. Use {@link getBlock} or
226
+ * {@link getBlockData} for genesis-aware single-block lookups.
227
+ */ async getBlocks(query) {
228
+ const resolved = await this.resolveBlocksQuery(query);
229
+ return resolved ? this.stores.blocks.getBlocks(resolved) : [];
230
+ }
231
+ async getBlockData(query) {
232
+ const resolved = await this.resolveBlockQuery(query);
233
+ if (resolved === undefined) {
201
234
  return undefined;
202
235
  }
203
- return this.store.getBlock(number);
204
- }
205
- getBlocks(from, limit) {
206
- return this.store.getBlocks(from, limit);
207
- }
208
- getCheckpointedBlockByHash(blockHash) {
209
- return this.store.getCheckpointedBlockByHash(blockHash);
210
- }
211
- getCheckpointedBlockByArchive(archive) {
212
- return this.store.getCheckpointedBlockByArchive(archive);
236
+ if (this.isGenesisBlockQuery(resolved)) {
237
+ return this.getGenesisBlockData();
238
+ }
239
+ return this.stores.blocks.getBlockData(resolved);
240
+ }
241
+ /** See {@link getBlocks} — range queries do not prepend the genesis block. */ async getBlocksData(query) {
242
+ const resolved = await this.resolveBlocksQuery(query);
243
+ return resolved ? this.stores.blocks.getBlocksData(resolved) : [];
244
+ }
245
+ /**
246
+ * Resolves a {@link BlockQuery} to either the genesis sentinel or a {@link ResolvedBlockQuery}
247
+ * understood by BlockStore. Detects every shape that points at block 0 — `{number:0}`,
248
+ * `{hash}` matching the initial header, `{archive}` matching the post-genesis archive root,
249
+ * and `{tag}` resolving to 0 — and rewrites them to the sentinel so callers branch once.
250
+ */ async resolveBlockQuery(query) {
251
+ if ('number' in query) {
252
+ return query.number === BlockNumber.ZERO ? {
253
+ genesis: true
254
+ } : query;
255
+ }
256
+ if ('hash' in query) {
257
+ return query.hash.equals(this.initialBlockHash) ? {
258
+ genesis: true
259
+ } : query;
260
+ }
261
+ if ('archive' in query) {
262
+ return query.archive.equals(this.genesisArchiveRoot) ? {
263
+ genesis: true
264
+ } : query;
265
+ }
266
+ const number = await this.resolveBlockTag(query.tag);
267
+ if (number === BlockNumber.ZERO) {
268
+ return {
269
+ genesis: true
270
+ };
271
+ }
272
+ return {
273
+ number
274
+ };
213
275
  }
214
- async getL2BlockByHash(blockHash) {
215
- const checkpointedBlock = await this.store.getCheckpointedBlockByHash(blockHash);
216
- return checkpointedBlock?.block;
276
+ /** Maps a {@link BlockTag} to the matching block number for the current chain state. */ resolveBlockTag(tag) {
277
+ switch(tag){
278
+ case 'latest':
279
+ case 'proposed':
280
+ return this.stores.blocks.getLatestL2BlockNumber();
281
+ case 'checkpointed':
282
+ return this.stores.blocks.getCheckpointedL2BlockNumber();
283
+ case 'proven':
284
+ return this.stores.blocks.getProvenBlockNumber();
285
+ case 'finalized':
286
+ return this.stores.blocks.getFinalizedL2BlockNumber();
287
+ }
217
288
  }
218
- async getL2BlockByArchive(archive) {
219
- const checkpointedBlock = await this.store.getCheckpointedBlockByArchive(archive);
220
- return checkpointedBlock?.block;
289
+ /**
290
+ * Converts an epoch-based BlocksQuery to a from/limit query using l1Constants.
291
+ * Returns undefined when the epoch has no checkpoints, so callers can return [] without
292
+ * entering BlockStore. Reads only the two endpoint checkpoints rather than the whole epoch.
293
+ */ async resolveBlocksQuery(query) {
294
+ if (!('epoch' in query)) {
295
+ if (query.from < INITIAL_L2_BLOCK_NUM) {
296
+ throw new Error(`getBlocks/getBlocksData: 'from' must be >= ${INITIAL_L2_BLOCK_NUM}, got ${query.from}. ` + `Use getBlock({number:0})/getBlockData({number:0}) for genesis-aware single-block lookups.`);
297
+ }
298
+ return query;
299
+ }
300
+ const checkpointNumbers = await this.getCheckpointNumbersForEpoch(query.epoch);
301
+ if (checkpointNumbers.length === 0) {
302
+ return undefined;
303
+ }
304
+ const firstNumber = checkpointNumbers[0];
305
+ const lastNumber = checkpointNumbers[checkpointNumbers.length - 1];
306
+ const first = await this.stores.blocks.getCheckpointData(firstNumber);
307
+ if (!first) {
308
+ return undefined;
309
+ }
310
+ const last = firstNumber === lastNumber ? first : await this.stores.blocks.getCheckpointData(lastNumber);
311
+ if (!last) {
312
+ return undefined;
313
+ }
314
+ const from = BlockNumber(first.startBlock);
315
+ const limit = last.startBlock + last.blockCount - first.startBlock;
316
+ return {
317
+ from,
318
+ limit,
319
+ onlyCheckpointed: true
320
+ };
221
321
  }
222
322
  }
@@ -1,7 +1,7 @@
1
1
  import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
2
- import type { L2Block, ValidateCheckpointResult } from '@aztec/stdlib/block';
3
- import { type ProposedCheckpointInput, type PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
4
- import type { KVArchiverDataStore } from '../store/kv_archiver_store.js';
2
+ import type { CommitteeAttestation, L2Block, ValidateCheckpointResult } from '@aztec/stdlib/block';
3
+ import { type L1PublishedData, type ProposedCheckpointInput, type PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
4
+ import type { ArchiverDataStores } from '../store/data_stores.js';
5
5
  import type { L2TipsCache } from '../store/l2_tips_cache.js';
6
6
  /** Result of adding checkpoints with information about any pruned blocks. */
7
7
  type ReconcileCheckpointsResult = {
@@ -12,11 +12,11 @@ type ReconcileCheckpointsResult = {
12
12
  };
13
13
  /** Archiver helper module to handle updates to the data store. */
14
14
  export declare class ArchiverDataStoreUpdater {
15
- private store;
15
+ private stores;
16
16
  private l2TipsCache?;
17
17
  private opts;
18
18
  private readonly log;
19
- constructor(store: KVArchiverDataStore, l2TipsCache?: L2TipsCache | undefined, opts?: {
19
+ constructor(stores: ArchiverDataStores, l2TipsCache?: L2TipsCache | undefined, opts?: {
20
20
  rollupManaLimit?: number;
21
21
  });
22
22
  /**
@@ -34,13 +34,20 @@ export declare class ArchiverDataStoreUpdater {
34
34
  * Adds new checkpoints to the store with contract class/instance extraction from logs.
35
35
  * Prunes any local blocks that conflict with checkpoint data (by comparing archive roots).
36
36
  * Extracts ContractClassPublished, ContractInstancePublished, ContractInstanceUpdated events from the checkpoint block logs.
37
+ * If `promoteProposed` is supplied, the proposed-checkpoint promotion runs inside the same transaction
38
+ * as the added checkpoints so both updates are applied atomically.
37
39
  *
38
- * @param checkpoints - The published checkpoints to add.
40
+ * @param checkpoints - The published checkpoints to add (excluding any being promoted from proposed).
39
41
  * @param pendingChainValidationStatus - Optional validation status to set.
42
+ * @param promoteProposed - Optional promotion of the current proposed checkpoint (fast path when blocks are already local).
40
43
  * @returns Result with information about any pruned blocks.
41
44
  */
42
- addCheckpoints(checkpoints: PublishedCheckpoint[], pendingChainValidationStatus?: ValidateCheckpointResult): Promise<ReconcileCheckpointsResult>;
43
- setProposedCheckpoint(proposedCheckpoint: ProposedCheckpointInput): Promise<void>;
45
+ addCheckpoints(checkpoints: PublishedCheckpoint[], pendingChainValidationStatus?: ValidateCheckpointResult, promoteProposed?: {
46
+ l1: L1PublishedData;
47
+ attestations: CommitteeAttestation[];
48
+ checkpoint: PublishedCheckpoint;
49
+ }, evictProposedFrom?: CheckpointNumber): Promise<ReconcileCheckpointsResult>;
50
+ addProposedCheckpoint(proposedCheckpoint: ProposedCheckpointInput): Promise<void>;
44
51
  private pruneMismatchingLocalBlocks;
45
52
  /**
46
53
  * Removes all uncheckpointed blocks strictly after the specified block number and cleans up associated contract data.
@@ -52,6 +59,18 @@ export declare class ArchiverDataStoreUpdater {
52
59
  * @throws Error if any block to be removed is checkpointed.
53
60
  */
54
61
  removeUncheckpointedBlocksAfter(blockNumber: BlockNumber): Promise<L2Block[]>;
62
+ /**
63
+ * Removes all blocks without a proposed checkpoint strictly after the specified block number and cleans up associated contract data.
64
+ * This handles removal of provisionally added blocks along with their contract classes/instances.
65
+ * Verifies that each block being removed is not part of a stored checkpoint (proposed or not).
66
+ * This differs from `removeUncheckpointedBlocksAfter` in that it also checks proposed checkpoints.
67
+ *
68
+ * @param blockNumber - Remove all blocks with number greater than this.
69
+ * @returns The removed blocks.
70
+ * @throws Error if any block to be removed is checkpointed.
71
+ */
72
+ removeBlocksWithoutProposedCheckpointAfter(blockNumber: BlockNumber): Promise<L2Block[]>;
73
+ private evictProposedCheckpointsForPrunedBlocks;
55
74
  private removeBlocksAfter;
56
75
  /**
57
76
  * Removes all checkpoints after the given checkpoint number.
@@ -83,4 +102,4 @@ export declare class ArchiverDataStoreUpdater {
83
102
  private updateUpdatedContractInstances;
84
103
  }
85
104
  export {};
86
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YV9zdG9yZV91cGRhdGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbW9kdWxlcy9kYXRhX3N0b3JlX3VwZGF0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFdBQVcsRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBUWhGLE9BQU8sS0FBSyxFQUFFLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQzdFLE9BQU8sRUFBRSxLQUFLLHVCQUF1QixFQUFFLEtBQUssbUJBQW1CLEVBQXNCLE1BQU0sMEJBQTBCLENBQUM7QUFTdEgsT0FBTyxLQUFLLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUN6RSxPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQVE3RCw2RUFBNkU7QUFDN0UsS0FBSywwQkFBMEIsR0FBRztJQUNoQyxtRUFBbUU7SUFDbkUsWUFBWSxFQUFFLE9BQU8sRUFBRSxHQUFHLFNBQVMsQ0FBQztJQUNwQyxpRkFBaUY7SUFDakYsOEJBQThCLEVBQUUsV0FBVyxHQUFHLFNBQVMsQ0FBQztDQUN6RCxDQUFDO0FBRUYsa0VBQWtFO0FBQ2xFLHFCQUFhLHdCQUF3QjtJQUlqQyxPQUFPLENBQUMsS0FBSztJQUNiLE9BQU8sQ0FBQyxXQUFXLENBQUM7SUFDcEIsT0FBTyx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