@aztec/archiver 0.0.0-test.1 → 0.0.1-commit.0b941701

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 (219) hide show
  1. package/README.md +164 -9
  2. package/dest/archiver.d.ts +135 -0
  3. package/dest/archiver.d.ts.map +1 -0
  4. package/dest/archiver.js +768 -0
  5. package/dest/config.d.ts +30 -0
  6. package/dest/config.d.ts.map +1 -0
  7. package/dest/config.js +71 -0
  8. package/dest/errors.d.ts +41 -0
  9. package/dest/errors.d.ts.map +1 -0
  10. package/dest/errors.js +62 -0
  11. package/dest/factory.d.ts +11 -16
  12. package/dest/factory.d.ts.map +1 -1
  13. package/dest/factory.js +102 -53
  14. package/dest/index.d.ts +10 -4
  15. package/dest/index.d.ts.map +1 -1
  16. package/dest/index.js +8 -3
  17. package/dest/interfaces.d.ts +9 -0
  18. package/dest/interfaces.d.ts.map +1 -0
  19. package/dest/interfaces.js +3 -0
  20. package/dest/l1/bin/retrieve-calldata.d.ts +3 -0
  21. package/dest/l1/bin/retrieve-calldata.d.ts.map +1 -0
  22. package/dest/l1/bin/retrieve-calldata.js +149 -0
  23. package/dest/l1/calldata_retriever.d.ts +112 -0
  24. package/dest/l1/calldata_retriever.d.ts.map +1 -0
  25. package/dest/l1/calldata_retriever.js +471 -0
  26. package/dest/l1/data_retrieval.d.ts +88 -0
  27. package/dest/l1/data_retrieval.d.ts.map +1 -0
  28. package/dest/l1/data_retrieval.js +312 -0
  29. package/dest/l1/debug_tx.d.ts +19 -0
  30. package/dest/l1/debug_tx.d.ts.map +1 -0
  31. package/dest/l1/debug_tx.js +73 -0
  32. package/dest/l1/spire_proposer.d.ts +70 -0
  33. package/dest/l1/spire_proposer.d.ts.map +1 -0
  34. package/dest/l1/spire_proposer.js +157 -0
  35. package/dest/l1/trace_tx.d.ts +97 -0
  36. package/dest/l1/trace_tx.d.ts.map +1 -0
  37. package/dest/l1/trace_tx.js +91 -0
  38. package/dest/l1/types.d.ts +12 -0
  39. package/dest/l1/types.d.ts.map +1 -0
  40. package/dest/l1/types.js +3 -0
  41. package/dest/l1/validate_trace.d.ts +29 -0
  42. package/dest/l1/validate_trace.d.ts.map +1 -0
  43. package/dest/l1/validate_trace.js +150 -0
  44. package/dest/modules/data_source_base.d.ts +84 -0
  45. package/dest/modules/data_source_base.d.ts.map +1 -0
  46. package/dest/modules/data_source_base.js +260 -0
  47. package/dest/modules/data_store_updater.d.ts +73 -0
  48. package/dest/modules/data_store_updater.d.ts.map +1 -0
  49. package/dest/modules/data_store_updater.js +302 -0
  50. package/dest/modules/instrumentation.d.ts +37 -0
  51. package/dest/modules/instrumentation.d.ts.map +1 -0
  52. package/dest/{archiver → modules}/instrumentation.js +45 -41
  53. package/dest/modules/l1_synchronizer.d.ts +75 -0
  54. package/dest/modules/l1_synchronizer.d.ts.map +1 -0
  55. package/dest/modules/l1_synchronizer.js +1113 -0
  56. package/dest/modules/validation.d.ts +17 -0
  57. package/dest/modules/validation.d.ts.map +1 -0
  58. package/dest/modules/validation.js +104 -0
  59. package/dest/store/block_store.d.ts +192 -0
  60. package/dest/store/block_store.d.ts.map +1 -0
  61. package/dest/store/block_store.js +721 -0
  62. package/dest/store/contract_class_store.d.ts +18 -0
  63. package/dest/store/contract_class_store.d.ts.map +1 -0
  64. package/dest/{archiver/kv_archiver_store → store}/contract_class_store.js +14 -20
  65. package/dest/store/contract_instance_store.d.ts +24 -0
  66. package/dest/store/contract_instance_store.d.ts.map +1 -0
  67. package/dest/store/contract_instance_store.js +77 -0
  68. package/dest/store/kv_archiver_store.d.ts +340 -0
  69. package/dest/store/kv_archiver_store.d.ts.map +1 -0
  70. package/dest/store/kv_archiver_store.js +447 -0
  71. package/dest/store/log_store.d.ts +54 -0
  72. package/dest/store/log_store.d.ts.map +1 -0
  73. package/dest/store/log_store.js +436 -0
  74. package/dest/store/message_store.d.ts +40 -0
  75. package/dest/store/message_store.d.ts.map +1 -0
  76. package/dest/store/message_store.js +188 -0
  77. package/dest/structs/data_retrieval.d.ts +27 -0
  78. package/dest/structs/data_retrieval.d.ts.map +1 -0
  79. package/dest/structs/inbox_message.d.ts +15 -0
  80. package/dest/structs/inbox_message.d.ts.map +1 -0
  81. package/dest/structs/inbox_message.js +39 -0
  82. package/dest/structs/published.d.ts +2 -0
  83. package/dest/structs/published.d.ts.map +1 -0
  84. package/dest/structs/published.js +1 -0
  85. package/dest/test/fake_l1_state.d.ts +190 -0
  86. package/dest/test/fake_l1_state.d.ts.map +1 -0
  87. package/dest/test/fake_l1_state.js +383 -0
  88. package/dest/test/index.d.ts +2 -1
  89. package/dest/test/index.d.ts.map +1 -1
  90. package/dest/test/index.js +1 -0
  91. package/dest/test/mock_archiver.d.ts +16 -8
  92. package/dest/test/mock_archiver.d.ts.map +1 -1
  93. package/dest/test/mock_archiver.js +18 -14
  94. package/dest/test/mock_l1_to_l2_message_source.d.ts +9 -6
  95. package/dest/test/mock_l1_to_l2_message_source.d.ts.map +1 -1
  96. package/dest/test/mock_l1_to_l2_message_source.js +30 -7
  97. package/dest/test/mock_l2_block_source.d.ts +62 -16
  98. package/dest/test/mock_l2_block_source.d.ts.map +1 -1
  99. package/dest/test/mock_l2_block_source.js +263 -32
  100. package/dest/test/mock_structs.d.ts +84 -0
  101. package/dest/test/mock_structs.d.ts.map +1 -0
  102. package/dest/test/mock_structs.js +169 -0
  103. package/package.json +30 -33
  104. package/src/archiver.ts +523 -0
  105. package/src/config.ts +95 -0
  106. package/src/errors.ts +102 -0
  107. package/src/factory.ts +142 -69
  108. package/src/index.ts +10 -3
  109. package/src/interfaces.ts +9 -0
  110. package/src/l1/README.md +98 -0
  111. package/src/l1/bin/retrieve-calldata.ts +187 -0
  112. package/src/l1/calldata_retriever.ts +641 -0
  113. package/src/l1/data_retrieval.ts +495 -0
  114. package/src/l1/debug_tx.ts +99 -0
  115. package/src/l1/spire_proposer.ts +160 -0
  116. package/src/l1/trace_tx.ts +128 -0
  117. package/src/l1/types.ts +13 -0
  118. package/src/l1/validate_trace.ts +211 -0
  119. package/src/modules/data_source_base.ts +367 -0
  120. package/src/modules/data_store_updater.ts +423 -0
  121. package/src/{archiver → modules}/instrumentation.ts +63 -43
  122. package/src/modules/l1_synchronizer.ts +931 -0
  123. package/src/modules/validation.ts +129 -0
  124. package/src/store/block_store.ts +966 -0
  125. package/src/{archiver/kv_archiver_store → store}/contract_class_store.ts +15 -25
  126. package/src/{archiver/kv_archiver_store → store}/contract_instance_store.ts +37 -29
  127. package/src/store/kv_archiver_store.ts +639 -0
  128. package/src/store/log_store.ts +575 -0
  129. package/src/store/message_store.ts +261 -0
  130. package/src/structs/inbox_message.ts +41 -0
  131. package/src/structs/published.ts +1 -0
  132. package/src/test/fake_l1_state.ts +599 -0
  133. package/src/test/fixtures/debug_traceTransaction-multicall3.json +88 -0
  134. package/src/test/fixtures/debug_traceTransaction-multiplePropose.json +153 -0
  135. package/src/test/fixtures/debug_traceTransaction-proxied.json +122 -0
  136. package/src/test/fixtures/trace_transaction-multicall3.json +65 -0
  137. package/src/test/fixtures/trace_transaction-multiplePropose.json +319 -0
  138. package/src/test/fixtures/trace_transaction-proxied.json +128 -0
  139. package/src/test/fixtures/trace_transaction-randomRevert.json +216 -0
  140. package/src/test/index.ts +1 -0
  141. package/src/test/mock_archiver.ts +22 -16
  142. package/src/test/mock_l1_to_l2_message_source.ts +26 -8
  143. package/src/test/mock_l2_block_source.ts +312 -41
  144. package/src/test/mock_structs.ts +295 -0
  145. package/dest/archiver/archiver.d.ts +0 -197
  146. package/dest/archiver/archiver.d.ts.map +0 -1
  147. package/dest/archiver/archiver.js +0 -900
  148. package/dest/archiver/archiver_store.d.ts +0 -220
  149. package/dest/archiver/archiver_store.d.ts.map +0 -1
  150. package/dest/archiver/archiver_store.js +0 -4
  151. package/dest/archiver/archiver_store_test_suite.d.ts +0 -8
  152. package/dest/archiver/archiver_store_test_suite.d.ts.map +0 -1
  153. package/dest/archiver/archiver_store_test_suite.js +0 -794
  154. package/dest/archiver/config.d.ts +0 -37
  155. package/dest/archiver/config.d.ts.map +0 -1
  156. package/dest/archiver/config.js +0 -46
  157. package/dest/archiver/data_retrieval.d.ts +0 -74
  158. package/dest/archiver/data_retrieval.d.ts.map +0 -1
  159. package/dest/archiver/data_retrieval.js +0 -283
  160. package/dest/archiver/errors.d.ts +0 -4
  161. package/dest/archiver/errors.d.ts.map +0 -1
  162. package/dest/archiver/errors.js +0 -5
  163. package/dest/archiver/index.d.ts +0 -8
  164. package/dest/archiver/index.d.ts.map +0 -1
  165. package/dest/archiver/index.js +0 -5
  166. package/dest/archiver/instrumentation.d.ts +0 -29
  167. package/dest/archiver/instrumentation.d.ts.map +0 -1
  168. package/dest/archiver/kv_archiver_store/block_store.d.ts +0 -87
  169. package/dest/archiver/kv_archiver_store/block_store.d.ts.map +0 -1
  170. package/dest/archiver/kv_archiver_store/block_store.js +0 -217
  171. package/dest/archiver/kv_archiver_store/contract_class_store.d.ts +0 -18
  172. package/dest/archiver/kv_archiver_store/contract_class_store.d.ts.map +0 -1
  173. package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts +0 -21
  174. package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts.map +0 -1
  175. package/dest/archiver/kv_archiver_store/contract_instance_store.js +0 -63
  176. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +0 -153
  177. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +0 -1
  178. package/dest/archiver/kv_archiver_store/kv_archiver_store.js +0 -254
  179. package/dest/archiver/kv_archiver_store/log_store.d.ts +0 -49
  180. package/dest/archiver/kv_archiver_store/log_store.d.ts.map +0 -1
  181. package/dest/archiver/kv_archiver_store/log_store.js +0 -364
  182. package/dest/archiver/kv_archiver_store/message_store.d.ts +0 -33
  183. package/dest/archiver/kv_archiver_store/message_store.d.ts.map +0 -1
  184. package/dest/archiver/kv_archiver_store/message_store.js +0 -85
  185. package/dest/archiver/kv_archiver_store/nullifier_store.d.ts +0 -12
  186. package/dest/archiver/kv_archiver_store/nullifier_store.d.ts.map +0 -1
  187. package/dest/archiver/kv_archiver_store/nullifier_store.js +0 -73
  188. package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.d.ts +0 -23
  189. package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.d.ts.map +0 -1
  190. package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.js +0 -49
  191. package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts +0 -175
  192. package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts.map +0 -1
  193. package/dest/archiver/memory_archiver_store/memory_archiver_store.js +0 -636
  194. package/dest/archiver/structs/data_retrieval.d.ts +0 -27
  195. package/dest/archiver/structs/data_retrieval.d.ts.map +0 -1
  196. package/dest/archiver/structs/published.d.ts +0 -11
  197. package/dest/archiver/structs/published.d.ts.map +0 -1
  198. package/dest/archiver/structs/published.js +0 -1
  199. package/dest/rpc/index.d.ts +0 -10
  200. package/dest/rpc/index.d.ts.map +0 -1
  201. package/dest/rpc/index.js +0 -18
  202. package/src/archiver/archiver.ts +0 -1181
  203. package/src/archiver/archiver_store.ts +0 -263
  204. package/src/archiver/archiver_store_test_suite.ts +0 -810
  205. package/src/archiver/config.ts +0 -92
  206. package/src/archiver/data_retrieval.ts +0 -422
  207. package/src/archiver/errors.ts +0 -5
  208. package/src/archiver/index.ts +0 -7
  209. package/src/archiver/kv_archiver_store/block_store.ts +0 -283
  210. package/src/archiver/kv_archiver_store/kv_archiver_store.ts +0 -358
  211. package/src/archiver/kv_archiver_store/log_store.ts +0 -444
  212. package/src/archiver/kv_archiver_store/message_store.ts +0 -102
  213. package/src/archiver/kv_archiver_store/nullifier_store.ts +0 -97
  214. package/src/archiver/memory_archiver_store/l1_to_l2_message_store.ts +0 -61
  215. package/src/archiver/memory_archiver_store/memory_archiver_store.ts +0 -801
  216. package/src/archiver/structs/published.ts +0 -11
  217. package/src/rpc/index.ts +0 -20
  218. /package/dest/{archiver/structs → structs}/data_retrieval.js +0 -0
  219. /package/src/{archiver/structs → structs}/data_retrieval.ts +0 -0
@@ -0,0 +1,295 @@
1
+ import {
2
+ MAX_NOTE_HASHES_PER_TX,
3
+ NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP,
4
+ PRIVATE_LOG_SIZE_IN_FIELDS,
5
+ } from '@aztec/constants';
6
+ import { makeTuple } from '@aztec/foundation/array';
7
+ import { BlockNumber, CheckpointNumber, IndexWithinCheckpoint } from '@aztec/foundation/branded-types';
8
+ import { Buffer16, Buffer32 } from '@aztec/foundation/buffer';
9
+ import { times, timesParallel } from '@aztec/foundation/collection';
10
+ import { randomBigInt, randomInt } from '@aztec/foundation/crypto/random';
11
+ import type { Secp256k1Signer } from '@aztec/foundation/crypto/secp256k1-signer';
12
+ import { Fr } from '@aztec/foundation/curves/bn254';
13
+ import { EthAddress } from '@aztec/foundation/eth-address';
14
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
15
+ import { CommitteeAttestation, L2Block } from '@aztec/stdlib/block';
16
+ import { Checkpoint, L1PublishedData, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
17
+ import { PrivateLog, PublicLog, SiloedTag, Tag } from '@aztec/stdlib/logs';
18
+ import { InboxLeaf } from '@aztec/stdlib/messaging';
19
+ import { orderAttestations } from '@aztec/stdlib/p2p';
20
+ import { CheckpointHeader } from '@aztec/stdlib/rollup';
21
+ import { makeCheckpointAttestationFromCheckpoint } from '@aztec/stdlib/testing';
22
+ import { AppendOnlyTreeSnapshot } from '@aztec/stdlib/trees';
23
+ import { PartialStateReference, StateReference, TxEffect } from '@aztec/stdlib/tx';
24
+
25
+ import { type InboxMessage, updateRollingHash } from '../structs/inbox_message.js';
26
+
27
+ export function makeInboxMessage(
28
+ previousRollingHash = Buffer16.ZERO,
29
+ overrides: Partial<InboxMessage> = {},
30
+ ): InboxMessage {
31
+ const { checkpointNumber = CheckpointNumber(randomInt(100) + 1) } = overrides;
32
+ const { l1BlockNumber = randomBigInt(100n) + 1n } = overrides;
33
+ const { l1BlockHash = Buffer32.random() } = overrides;
34
+ const { leaf = Fr.random() } = overrides;
35
+ const { rollingHash = updateRollingHash(previousRollingHash, leaf) } = overrides;
36
+ const { index = InboxLeaf.smallestIndexForCheckpoint(checkpointNumber) } = overrides;
37
+
38
+ return {
39
+ index,
40
+ leaf,
41
+ checkpointNumber,
42
+ l1BlockNumber,
43
+ l1BlockHash,
44
+ rollingHash,
45
+ };
46
+ }
47
+
48
+ export function makeInboxMessages(
49
+ count: number,
50
+ opts: {
51
+ initialHash?: Buffer16;
52
+ initialCheckpointNumber?: CheckpointNumber;
53
+ overrideFn?: (msg: InboxMessage, index: number) => InboxMessage;
54
+ } = {},
55
+ ): InboxMessage[] {
56
+ const { initialHash = Buffer16.ZERO, overrideFn = msg => msg, initialCheckpointNumber = 1 } = opts;
57
+ const messages: InboxMessage[] = [];
58
+ let rollingHash = initialHash;
59
+ for (let i = 0; i < count; i++) {
60
+ const leaf = Fr.random();
61
+ const checkpointNumber = CheckpointNumber(i + initialCheckpointNumber);
62
+ const message = overrideFn(makeInboxMessage(rollingHash, { leaf, checkpointNumber }), i);
63
+ rollingHash = message.rollingHash;
64
+ messages.push(message);
65
+ }
66
+
67
+ return messages;
68
+ }
69
+
70
+ /** Creates inbox messages distributed across multiple blocks with proper checkpoint numbering. */
71
+ export function makeInboxMessagesWithFullBlocks(
72
+ blockCount: number,
73
+ opts: { initialCheckpointNumber?: CheckpointNumber } = {},
74
+ ): InboxMessage[] {
75
+ const { initialCheckpointNumber = CheckpointNumber(13) } = opts;
76
+ return makeInboxMessages(NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP * blockCount, {
77
+ overrideFn: (msg, i) => {
78
+ const checkpointNumber = CheckpointNumber(
79
+ initialCheckpointNumber + Math.floor(i / NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP),
80
+ );
81
+ const index =
82
+ InboxLeaf.smallestIndexForCheckpoint(checkpointNumber) + BigInt(i % NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP);
83
+ return { ...msg, checkpointNumber, index };
84
+ },
85
+ });
86
+ }
87
+
88
+ /** Creates a deterministic block hash from a block number. */
89
+ export function makeBlockHash(blockNumber: number): `0x${string}` {
90
+ return `0x${blockNumber.toString(16).padStart(64, '0')}`;
91
+ }
92
+
93
+ /**
94
+ * Creates a StateReference with properly calculated noteHashTree.nextAvailableLeafIndex.
95
+ * This ensures LogStore's dataStartIndexForBlock calculation doesn't produce negative values.
96
+ */
97
+ export function makeStateForBlock(blockNumber: number, txsPerBlock: number): StateReference {
98
+ const noteHashIndex = blockNumber * txsPerBlock * MAX_NOTE_HASHES_PER_TX;
99
+ return new StateReference(
100
+ AppendOnlyTreeSnapshot.random(),
101
+ new PartialStateReference(
102
+ new AppendOnlyTreeSnapshot(Fr.random(), noteHashIndex),
103
+ AppendOnlyTreeSnapshot.random(),
104
+ AppendOnlyTreeSnapshot.random(),
105
+ ),
106
+ );
107
+ }
108
+
109
+ /** Creates L1PublishedData with deterministic values based on l1BlockNumber. */
110
+ export function makeL1PublishedData(l1BlockNumber: number): L1PublishedData {
111
+ return new L1PublishedData(BigInt(l1BlockNumber), BigInt(l1BlockNumber * 1000), makeBlockHash(l1BlockNumber));
112
+ }
113
+
114
+ /** Wraps a Checkpoint with L1 published data and random attestations. */
115
+ export function makePublishedCheckpoint(
116
+ checkpoint: Checkpoint,
117
+ l1BlockNumber: number,
118
+ attestationCount = 3,
119
+ ): PublishedCheckpoint {
120
+ return new PublishedCheckpoint(
121
+ checkpoint,
122
+ makeL1PublishedData(l1BlockNumber),
123
+ times(attestationCount, CommitteeAttestation.random),
124
+ );
125
+ }
126
+
127
+ export interface MakeChainedCheckpointsOptions {
128
+ /** Number of L2 blocks per checkpoint. Default: 1 */
129
+ blocksPerCheckpoint?: number;
130
+ /** Number of transactions per block. Default: 4 */
131
+ txsPerBlock?: number;
132
+ /** Starting checkpoint number. Default: CheckpointNumber(1) */
133
+ startCheckpointNumber?: CheckpointNumber;
134
+ /** Starting block number. Default: 1 */
135
+ startBlockNumber?: number;
136
+ /** Starting L1 block number. Default: 10 */
137
+ startL1BlockNumber?: number;
138
+ /** Previous archive to chain from. Default: undefined */
139
+ previousArchive?: AppendOnlyTreeSnapshot;
140
+ /** Optional function to provide per-checkpoint overrides */
141
+ makeCheckpointOptions?: (cpNumber: CheckpointNumber) => Partial<Parameters<typeof Checkpoint.random>[1]>;
142
+ }
143
+
144
+ /**
145
+ * Creates multiple checkpoints with properly chained archives.
146
+ * Each checkpoint's blocks have their lastArchive set to the previous block's archive,
147
+ * ensuring archive chain continuity for testing.
148
+ */
149
+ export async function makeChainedCheckpoints(
150
+ count: number,
151
+ options: MakeChainedCheckpointsOptions = {},
152
+ ): Promise<PublishedCheckpoint[]> {
153
+ const {
154
+ blocksPerCheckpoint = 1,
155
+ txsPerBlock = 4,
156
+ startCheckpointNumber = CheckpointNumber(1),
157
+ startBlockNumber = 1,
158
+ startL1BlockNumber = 10,
159
+ makeCheckpointOptions,
160
+ } = options;
161
+
162
+ let previousArchive = options.previousArchive;
163
+ const checkpoints: PublishedCheckpoint[] = [];
164
+
165
+ for (let i = 0; i < count; i++) {
166
+ const cpNumber = CheckpointNumber(startCheckpointNumber + i);
167
+ const blockStart = startBlockNumber + i * blocksPerCheckpoint;
168
+ const customOptions = makeCheckpointOptions?.(cpNumber) ?? {};
169
+
170
+ const checkpoint = await Checkpoint.random(cpNumber, {
171
+ numBlocks: blocksPerCheckpoint,
172
+ startBlockNumber: blockStart,
173
+ previousArchive,
174
+ txsPerBlock,
175
+ state: makeStateForBlock(blockStart, txsPerBlock),
176
+ txOptions: { numPublicCallsPerTx: 2, numPublicLogsPerCall: 2 },
177
+ ...customOptions,
178
+ });
179
+
180
+ previousArchive = checkpoint.blocks.at(-1)!.archive;
181
+ checkpoints.push(makePublishedCheckpoint(checkpoint, startL1BlockNumber + i * 10));
182
+ }
183
+
184
+ return checkpoints;
185
+ }
186
+
187
+ /**
188
+ * Creates a PublishedCheckpoint with attestations signed by the provided signers.
189
+ * Useful for testing attestation validation.
190
+ */
191
+ export function makeSignedPublishedCheckpoint(
192
+ checkpoint: Checkpoint,
193
+ signers: Secp256k1Signer[],
194
+ committee: EthAddress[],
195
+ l1BlockNumber = 1,
196
+ ): PublishedCheckpoint {
197
+ const attestations = signers.map(signer => makeCheckpointAttestationFromCheckpoint(checkpoint, signer));
198
+ const committeeAttestations = orderAttestations(attestations, committee);
199
+ return new PublishedCheckpoint(checkpoint, makeL1PublishedData(l1BlockNumber), committeeAttestations);
200
+ }
201
+
202
+ /** Creates a deterministic SiloedTag for private log testing. */
203
+ export function makePrivateLogTag(blockNumber: number, txIndex: number, logIndex: number): SiloedTag {
204
+ return new SiloedTag(
205
+ blockNumber === 1 && txIndex === 0 && logIndex === 0
206
+ ? Fr.ZERO
207
+ : new Fr(blockNumber * 100 + txIndex * 10 + logIndex),
208
+ );
209
+ }
210
+
211
+ /** Creates a PrivateLog with fields derived from the tag. */
212
+ export function makePrivateLog(tag: SiloedTag): PrivateLog {
213
+ return PrivateLog.from({
214
+ fields: makeTuple(PRIVATE_LOG_SIZE_IN_FIELDS, i => (!i ? tag.value : new Fr(tag.value.toBigInt() + BigInt(i)))),
215
+ emittedLength: PRIVATE_LOG_SIZE_IN_FIELDS,
216
+ });
217
+ }
218
+
219
+ /** Creates multiple private logs for a transaction. */
220
+ export function mockPrivateLogs(blockNumber: number, txIndex: number, numLogsPerTx: number): PrivateLog[] {
221
+ return times(numLogsPerTx, logIndex => {
222
+ const tag = makePrivateLogTag(blockNumber, txIndex, logIndex);
223
+ return makePrivateLog(tag);
224
+ });
225
+ }
226
+
227
+ /** Creates a deterministic Tag for public log testing. */
228
+ export function makePublicLogTag(blockNumber: number, txIndex: number, logIndex: number): Tag {
229
+ return new Tag(
230
+ blockNumber === 1 && txIndex === 0 && logIndex === 0
231
+ ? Fr.ZERO
232
+ : new Fr((blockNumber * 100 + txIndex * 10 + logIndex) * 123),
233
+ );
234
+ }
235
+
236
+ /** Creates a PublicLog with fields derived from the tag. */
237
+ export function makePublicLog(tag: Tag, contractAddress: AztecAddress = AztecAddress.fromNumber(543254)): PublicLog {
238
+ return PublicLog.from({
239
+ contractAddress,
240
+ fields: new Array(10).fill(null).map((_, i) => (!i ? tag.value : new Fr(tag.value.toBigInt() + BigInt(i)))),
241
+ });
242
+ }
243
+
244
+ /** Creates multiple public logs for a transaction. */
245
+ export function makePublicLogs(
246
+ blockNumber: number,
247
+ txIndex: number,
248
+ numLogsPerTx: number,
249
+ contractAddress: AztecAddress = AztecAddress.fromNumber(543254),
250
+ ): PublicLog[] {
251
+ return times(numLogsPerTx, logIndex => {
252
+ const tag = makePublicLogTag(blockNumber, txIndex, logIndex);
253
+ return makePublicLog(tag, contractAddress);
254
+ });
255
+ }
256
+
257
+ export interface MockCheckpointWithLogsOptions {
258
+ previousArchive?: AppendOnlyTreeSnapshot;
259
+ numTxsPerBlock?: number;
260
+ privateLogs?: { numLogsPerTx: number };
261
+ publicLogs?: { numLogsPerTx: number; contractAddress?: AztecAddress };
262
+ }
263
+
264
+ /** Creates a checkpoint with specified logs on each tx effect. */
265
+ export async function makeCheckpointWithLogs(
266
+ blockNumber: number,
267
+ options: MockCheckpointWithLogsOptions = {},
268
+ ): Promise<PublishedCheckpoint> {
269
+ const { previousArchive, numTxsPerBlock = 4, privateLogs, publicLogs } = options;
270
+
271
+ const block = await L2Block.random(BlockNumber(blockNumber), {
272
+ checkpointNumber: CheckpointNumber.fromBlockNumber(BlockNumber(blockNumber)),
273
+ indexWithinCheckpoint: IndexWithinCheckpoint(0),
274
+ state: makeStateForBlock(blockNumber, numTxsPerBlock),
275
+ ...(previousArchive ? { lastArchive: previousArchive } : {}),
276
+ });
277
+ block.header.globalVariables.blockNumber = BlockNumber(blockNumber);
278
+
279
+ block.body.txEffects = await timesParallel(numTxsPerBlock, async (txIndex: number) => {
280
+ const txEffect = await TxEffect.random();
281
+ txEffect.privateLogs = privateLogs ? mockPrivateLogs(blockNumber, txIndex, privateLogs.numLogsPerTx) : [];
282
+ txEffect.publicLogs = publicLogs
283
+ ? makePublicLogs(blockNumber, txIndex, publicLogs.numLogsPerTx, publicLogs.contractAddress)
284
+ : [];
285
+ return txEffect;
286
+ });
287
+
288
+ const checkpoint = new Checkpoint(
289
+ AppendOnlyTreeSnapshot.random(),
290
+ CheckpointHeader.random(),
291
+ [block],
292
+ CheckpointNumber.fromBlockNumber(BlockNumber(blockNumber)),
293
+ );
294
+ return makePublishedCheckpoint(checkpoint, blockNumber);
295
+ }
@@ -1,197 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- import type { BlobSinkClientInterface } from '@aztec/blob-sink/client';
3
- import { type ViemPublicClient } from '@aztec/ethereum';
4
- import type { EthAddress } from '@aztec/foundation/eth-address';
5
- import { Fr } from '@aztec/foundation/fields';
6
- import { type Logger } from '@aztec/foundation/log';
7
- import type { FunctionSelector } from '@aztec/stdlib/abi';
8
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
9
- import { type InBlock, type L2Block, type L2BlockSource, type L2Tips, type NullifierWithBlockSource } from '@aztec/stdlib/block';
10
- import { type ContractClassPublic, type ContractDataSource, type ContractInstanceWithAddress, type PublicFunction } from '@aztec/stdlib/contract';
11
- import { type L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
12
- import type { GetContractClassLogsResponse, GetPublicLogsResponse } from '@aztec/stdlib/interfaces/client';
13
- import type { L2LogsSource } from '@aztec/stdlib/interfaces/server';
14
- import { type LogFilter, type PrivateLog, TxScopedL2Log } from '@aztec/stdlib/logs';
15
- import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging';
16
- import { type BlockHeader, TxEffect, TxHash, TxReceipt } from '@aztec/stdlib/tx';
17
- import { type TelemetryClient, type Traceable, type Tracer } from '@aztec/telemetry-client';
18
- import { EventEmitter } from 'events';
19
- import type { ArchiverDataStore } from './archiver_store.js';
20
- import type { ArchiverConfig } from './config.js';
21
- import { ArchiverInstrumentation } from './instrumentation.js';
22
- /**
23
- * Helper interface to combine all sources this archiver implementation provides.
24
- */
25
- export type ArchiveSource = L2BlockSource & L2LogsSource & ContractDataSource & L1ToL2MessageSource & NullifierWithBlockSource;
26
- /**
27
- * Pulls L2 blocks in a non-blocking manner and provides interface for their retrieval.
28
- * Responsible for handling robust L1 polling so that other components do not need to
29
- * concern themselves with it.
30
- */
31
- export declare class Archiver extends EventEmitter implements ArchiveSource, Traceable {
32
- private readonly publicClient;
33
- private readonly l1Addresses;
34
- readonly dataStore: ArchiverDataStore;
35
- private readonly config;
36
- private readonly blobSinkClient;
37
- private readonly instrumentation;
38
- private readonly l1constants;
39
- private readonly log;
40
- /**
41
- * A promise in which we will be continually fetching new L2 blocks.
42
- */
43
- private runningPromise?;
44
- private rollup;
45
- private inbox;
46
- private store;
47
- l1BlockNumber: bigint | undefined;
48
- l1Timestamp: bigint | undefined;
49
- readonly tracer: Tracer;
50
- /**
51
- * Creates a new instance of the Archiver.
52
- * @param publicClient - A client for interacting with the Ethereum node.
53
- * @param rollupAddress - Ethereum address of the rollup contract.
54
- * @param inboxAddress - Ethereum address of the inbox contract.
55
- * @param registryAddress - Ethereum address of the registry contract.
56
- * @param pollingIntervalMs - The interval for polling for L1 logs (in milliseconds).
57
- * @param store - An archiver data store for storage & retrieval of blocks, encrypted logs & contract data.
58
- * @param log - A logger.
59
- */
60
- constructor(publicClient: ViemPublicClient, l1Addresses: {
61
- rollupAddress: EthAddress;
62
- inboxAddress: EthAddress;
63
- registryAddress: EthAddress;
64
- }, dataStore: ArchiverDataStore, config: {
65
- pollingIntervalMs: number;
66
- batchSize: number;
67
- }, blobSinkClient: BlobSinkClientInterface, instrumentation: ArchiverInstrumentation, l1constants: L1RollupConstants, log?: Logger);
68
- /**
69
- * Creates a new instance of the Archiver and blocks until it syncs from chain.
70
- * @param config - The archiver's desired configuration.
71
- * @param archiverStore - The backing store for the archiver.
72
- * @param blockUntilSynced - If true, blocks until the archiver has fully synced.
73
- * @returns - An instance of the archiver.
74
- */
75
- static createAndSync(config: ArchiverConfig, archiverStore: ArchiverDataStore, deps: {
76
- telemetry: TelemetryClient;
77
- blobSinkClient: BlobSinkClientInterface;
78
- }, blockUntilSynced?: boolean): Promise<Archiver>;
79
- /**
80
- * Starts sync process.
81
- * @param blockUntilSynced - If true, blocks until the archiver has fully synced.
82
- */
83
- start(blockUntilSynced: boolean): Promise<void>;
84
- private syncSafe;
85
- /**
86
- * Fetches logs from L1 contracts and processes them.
87
- */
88
- private sync;
89
- /** Queries the rollup contract on whether a prune can be executed on the immediatenext L1 block. */
90
- private canPrune;
91
- /** Checks if there'd be a reorg for the next block submission and start pruning now. */
92
- private handleEpochPrune;
93
- private nextRange;
94
- private handleL1ToL2Messages;
95
- private handleL2blocks;
96
- /**
97
- * Stops the archiver.
98
- * @returns A promise signalling completion of the stop process.
99
- */
100
- stop(): Promise<void>;
101
- getL1Constants(): Promise<L1RollupConstants>;
102
- getRollupAddress(): Promise<EthAddress>;
103
- getRegistryAddress(): Promise<EthAddress>;
104
- getL1BlockNumber(): bigint;
105
- getL1Timestamp(): bigint;
106
- getL2SlotNumber(): Promise<bigint>;
107
- getL2EpochNumber(): Promise<bigint>;
108
- getBlocksForEpoch(epochNumber: bigint): Promise<L2Block[]>;
109
- isEpochComplete(epochNumber: bigint): Promise<boolean>;
110
- /**
111
- * Gets up to `limit` amount of L2 blocks starting from `from`.
112
- * @param from - Number of the first block to return (inclusive).
113
- * @param limit - The number of blocks to return.
114
- * @param proven - If true, only return blocks that have been proven.
115
- * @returns The requested L2 blocks.
116
- */
117
- getBlocks(from: number, limit: number, proven?: boolean): Promise<L2Block[]>;
118
- /**
119
- * Gets an l2 block.
120
- * @param number - The block number to return.
121
- * @returns The requested L2 block.
122
- */
123
- getBlock(number: number): Promise<L2Block | undefined>;
124
- getBlockHeader(number: number | 'latest'): Promise<BlockHeader | undefined>;
125
- getTxEffect(txHash: TxHash): Promise<InBlock<TxEffect> | undefined>;
126
- getSettledTxReceipt(txHash: TxHash): Promise<TxReceipt | undefined>;
127
- /**
128
- * Gets the public function data for a contract.
129
- * @param address - The contract address containing the function to fetch.
130
- * @param selector - The function selector of the function to fetch.
131
- * @returns The public function data (if found).
132
- */
133
- getPublicFunction(address: AztecAddress, selector: FunctionSelector): Promise<PublicFunction | undefined>;
134
- /**
135
- * Retrieves all private logs from up to `limit` blocks, starting from the block number `from`.
136
- * @param from - The block number from which to begin retrieving logs.
137
- * @param limit - The maximum number of blocks to retrieve logs from.
138
- * @returns An array of private logs from the specified range of blocks.
139
- */
140
- getPrivateLogs(from: number, limit: number): Promise<PrivateLog[]>;
141
- /**
142
- * Gets all logs that match any of the received tags (i.e. logs with their first field equal to a tag).
143
- * @param tags - The tags to filter the logs by.
144
- * @returns For each received tag, an array of matching logs is returned. An empty array implies no logs match
145
- * that tag.
146
- */
147
- getLogsByTags(tags: Fr[]): Promise<TxScopedL2Log[][]>;
148
- /**
149
- * Returns the provided nullifier indexes scoped to the block
150
- * they were first included in, or undefined if they're not present in the tree
151
- * @param blockNumber Max block number to search for the nullifiers
152
- * @param nullifiers Nullifiers to get
153
- * @returns The block scoped indexes of the provided nullifiers, or undefined if the nullifier doesn't exist in the tree
154
- */
155
- findNullifiersIndexesWithBlock(blockNumber: number, nullifiers: Fr[]): Promise<(InBlock<bigint> | undefined)[]>;
156
- /**
157
- * Gets public logs based on the provided filter.
158
- * @param filter - The filter to apply to the logs.
159
- * @returns The requested logs.
160
- */
161
- getPublicLogs(filter: LogFilter): Promise<GetPublicLogsResponse>;
162
- /**
163
- * Gets contract class logs based on the provided filter.
164
- * @param filter - The filter to apply to the logs.
165
- * @returns The requested logs.
166
- */
167
- getContractClassLogs(filter: LogFilter): Promise<GetContractClassLogsResponse>;
168
- /**
169
- * Gets the number of the latest L2 block processed by the block source implementation.
170
- * @returns The number of the latest L2 block processed by the block source implementation.
171
- */
172
- getBlockNumber(): Promise<number>;
173
- getProvenBlockNumber(): Promise<number>;
174
- /** Forcefully updates the last proven block number. Use for testing. */
175
- setProvenBlockNumber(blockNumber: number): Promise<void>;
176
- getContractClass(id: Fr): Promise<ContractClassPublic | undefined>;
177
- getBytecodeCommitment(id: Fr): Promise<Fr | undefined>;
178
- getContract(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
179
- /**
180
- * Gets L1 to L2 message (to be) included in a given block.
181
- * @param blockNumber - L2 block number to get messages for.
182
- * @returns The L1 to L2 messages/leaves of the messages subtree (throws if not found).
183
- */
184
- getL1ToL2Messages(blockNumber: bigint): Promise<Fr[]>;
185
- /**
186
- * Gets the L1 to L2 message index in the L1 to L2 message tree.
187
- * @param l1ToL2Message - The L1 to L2 message.
188
- * @returns The index of the L1 to L2 message in the L1 to L2 message tree (undefined if not found).
189
- */
190
- getL1ToL2MessageIndex(l1ToL2Message: Fr): Promise<bigint | undefined>;
191
- getContractClassIds(): Promise<Fr[]>;
192
- addContractClass(contractClass: ContractClassPublic): Promise<void>;
193
- registerContractFunctionSignatures(address: AztecAddress, signatures: string[]): Promise<void>;
194
- getContractFunctionName(address: AztecAddress, selector: FunctionSelector): Promise<string | undefined>;
195
- getL2Tips(): Promise<L2Tips>;
196
- }
197
- //# sourceMappingURL=archiver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/archiver/archiver.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,KAAK,gBAAgB,EAAuB,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAclE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,KAAK,OAAO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