@aztec/archiver 3.0.0-nightly.20251210 → 3.0.0-nightly.20251212

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 (79) hide show
  1. package/dest/archiver/archiver.d.ts +10 -15
  2. package/dest/archiver/archiver.d.ts.map +1 -1
  3. package/dest/archiver/archiver.js +28 -21
  4. package/dest/archiver/archiver_store.d.ts +4 -11
  5. package/dest/archiver/archiver_store.d.ts.map +1 -1
  6. package/dest/archiver/archiver_store_test_suite.d.ts +1 -1
  7. package/dest/archiver/archiver_store_test_suite.d.ts.map +1 -1
  8. package/dest/archiver/archiver_store_test_suite.js +18 -35
  9. package/dest/archiver/config.d.ts +3 -2
  10. package/dest/archiver/config.d.ts.map +1 -1
  11. package/dest/archiver/config.js +8 -1
  12. package/dest/archiver/instrumentation.d.ts +3 -1
  13. package/dest/archiver/instrumentation.d.ts.map +1 -1
  14. package/dest/archiver/instrumentation.js +11 -0
  15. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +5 -12
  16. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +1 -1
  17. package/dest/archiver/kv_archiver_store/kv_archiver_store.js +1 -9
  18. package/dest/archiver/kv_archiver_store/log_store.d.ts +2 -9
  19. package/dest/archiver/kv_archiver_store/log_store.d.ts.map +1 -1
  20. package/dest/archiver/kv_archiver_store/log_store.js +1 -24
  21. package/dest/archiver/kv_archiver_store/message_store.d.ts +2 -2
  22. package/dest/archiver/kv_archiver_store/message_store.d.ts.map +1 -1
  23. package/dest/archiver/l1/bin/retrieve-calldata.d.ts +3 -0
  24. package/dest/archiver/l1/bin/retrieve-calldata.d.ts.map +1 -0
  25. package/dest/archiver/l1/bin/retrieve-calldata.js +147 -0
  26. package/dest/archiver/l1/calldata_retriever.d.ts +98 -0
  27. package/dest/archiver/l1/calldata_retriever.d.ts.map +1 -0
  28. package/dest/archiver/l1/calldata_retriever.js +403 -0
  29. package/dest/archiver/l1/data_retrieval.d.ts +87 -0
  30. package/dest/archiver/l1/data_retrieval.d.ts.map +1 -0
  31. package/dest/archiver/{data_retrieval.js → l1/data_retrieval.js} +19 -89
  32. package/dest/archiver/l1/debug_tx.d.ts +19 -0
  33. package/dest/archiver/l1/debug_tx.d.ts.map +1 -0
  34. package/dest/archiver/l1/debug_tx.js +73 -0
  35. package/dest/archiver/l1/spire_proposer.d.ts +70 -0
  36. package/dest/archiver/l1/spire_proposer.d.ts.map +1 -0
  37. package/dest/archiver/l1/spire_proposer.js +157 -0
  38. package/dest/archiver/l1/trace_tx.d.ts +97 -0
  39. package/dest/archiver/l1/trace_tx.d.ts.map +1 -0
  40. package/dest/archiver/l1/trace_tx.js +91 -0
  41. package/dest/archiver/l1/types.d.ts +12 -0
  42. package/dest/archiver/l1/types.d.ts.map +1 -0
  43. package/dest/archiver/l1/types.js +3 -0
  44. package/dest/archiver/l1/validate_trace.d.ts +29 -0
  45. package/dest/archiver/l1/validate_trace.d.ts.map +1 -0
  46. package/dest/archiver/l1/validate_trace.js +150 -0
  47. package/dest/index.d.ts +2 -2
  48. package/dest/index.d.ts.map +1 -1
  49. package/dest/index.js +1 -1
  50. package/dest/test/mock_l2_block_source.js +1 -1
  51. package/package.json +15 -14
  52. package/src/archiver/archiver.ts +45 -33
  53. package/src/archiver/archiver_store.ts +3 -11
  54. package/src/archiver/archiver_store_test_suite.ts +10 -27
  55. package/src/archiver/config.ts +8 -7
  56. package/src/archiver/instrumentation.ts +14 -0
  57. package/src/archiver/kv_archiver_store/kv_archiver_store.ts +4 -14
  58. package/src/archiver/kv_archiver_store/log_store.ts +0 -27
  59. package/src/archiver/kv_archiver_store/message_store.ts +1 -1
  60. package/src/archiver/l1/README.md +98 -0
  61. package/src/archiver/l1/bin/retrieve-calldata.ts +182 -0
  62. package/src/archiver/l1/calldata_retriever.ts +531 -0
  63. package/src/archiver/{data_retrieval.ts → l1/data_retrieval.ts} +50 -137
  64. package/src/archiver/l1/debug_tx.ts +99 -0
  65. package/src/archiver/l1/spire_proposer.ts +160 -0
  66. package/src/archiver/l1/trace_tx.ts +128 -0
  67. package/src/archiver/l1/types.ts +13 -0
  68. package/src/archiver/l1/validate_trace.ts +211 -0
  69. package/src/index.ts +1 -1
  70. package/src/test/fixtures/debug_traceTransaction-multicall3.json +88 -0
  71. package/src/test/fixtures/debug_traceTransaction-multiplePropose.json +153 -0
  72. package/src/test/fixtures/debug_traceTransaction-proxied.json +122 -0
  73. package/src/test/fixtures/trace_transaction-multicall3.json +65 -0
  74. package/src/test/fixtures/trace_transaction-multiplePropose.json +319 -0
  75. package/src/test/fixtures/trace_transaction-proxied.json +128 -0
  76. package/src/test/fixtures/trace_transaction-randomRevert.json +216 -0
  77. package/src/test/mock_l2_block_source.ts +1 -1
  78. package/dest/archiver/data_retrieval.d.ts +0 -80
  79. package/dest/archiver/data_retrieval.d.ts.map +0 -1
@@ -0,0 +1,403 @@
1
+ import { MULTI_CALL_3_ADDRESS } from '@aztec/ethereum/contracts';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
+ import { EthAddress } from '@aztec/foundation/eth-address';
4
+ import { EmpireSlashingProposerAbi, GovernanceProposerAbi, RollupAbi, SlashFactoryAbi, TallySlashingProposerAbi } from '@aztec/l1-artifacts';
5
+ import { CommitteeAttestation } from '@aztec/stdlib/block';
6
+ import { CheckpointHeader } from '@aztec/stdlib/rollup';
7
+ import { decodeFunctionData, hexToBytes, multicall3Abi, toFunctionSelector } from 'viem';
8
+ import { getSuccessfulCallsFromDebug } from './debug_tx.js';
9
+ import { getCallFromSpireProposer } from './spire_proposer.js';
10
+ import { getSuccessfulCallsFromTrace } from './trace_tx.js';
11
+ /**
12
+ * Extracts calldata to the `propose` method of the rollup contract from an L1 transaction
13
+ * in order to reconstruct an L2 block header.
14
+ */ export class CalldataRetriever {
15
+ publicClient;
16
+ debugClient;
17
+ targetCommitteeSize;
18
+ instrumentation;
19
+ logger;
20
+ /** Pre-computed valid contract calls for validation */ validContractCalls;
21
+ rollupAddress;
22
+ constructor(publicClient, debugClient, targetCommitteeSize, instrumentation, logger, contractAddresses){
23
+ this.publicClient = publicClient;
24
+ this.debugClient = debugClient;
25
+ this.targetCommitteeSize = targetCommitteeSize;
26
+ this.instrumentation = instrumentation;
27
+ this.logger = logger;
28
+ this.rollupAddress = contractAddresses.rollupAddress;
29
+ this.validContractCalls = computeValidContractCalls(contractAddresses);
30
+ }
31
+ /**
32
+ * Gets checkpoint header and metadata from the calldata of an L1 transaction.
33
+ * Tries multicall3 decoding, falls back to trace-based extraction.
34
+ * @param txHash - Hash of the tx that published it.
35
+ * @param blobHashes - Blob hashes for the checkpoint.
36
+ * @param checkpointNumber - Checkpoint number.
37
+ * @returns Checkpoint header and metadata from the calldata, deserialized
38
+ */ async getCheckpointFromRollupTx(txHash, blobHashes, checkpointNumber) {
39
+ this.logger.trace(`Fetching checkpoint ${checkpointNumber} from rollup tx ${txHash}`);
40
+ const tx = await this.publicClient.getTransaction({
41
+ hash: txHash
42
+ });
43
+ const proposeCalldata = await this.getProposeCallData(tx, checkpointNumber);
44
+ return this.decodeAndBuildCheckpoint(proposeCalldata, tx.blockHash, checkpointNumber);
45
+ }
46
+ /** Gets rollup propose calldata from a transaction */ async getProposeCallData(tx, checkpointNumber) {
47
+ // Try to decode as multicall3 with validation
48
+ const proposeCalldata = this.tryDecodeMulticall3(tx);
49
+ if (proposeCalldata) {
50
+ this.logger.trace(`Decoded propose calldata from multicall3 for tx ${tx.hash}`);
51
+ this.instrumentation?.recordBlockProposalTxTarget(tx.to, false);
52
+ return proposeCalldata;
53
+ }
54
+ // Try to decode as direct propose call
55
+ const directProposeCalldata = this.tryDecodeDirectPropose(tx);
56
+ if (directProposeCalldata) {
57
+ this.logger.trace(`Decoded propose calldata from direct call for tx ${tx.hash}`);
58
+ this.instrumentation?.recordBlockProposalTxTarget(tx.to, false);
59
+ return directProposeCalldata;
60
+ }
61
+ // Try to decode as Spire Proposer multicall wrapper
62
+ const spireProposeCalldata = await this.tryDecodeSpireProposer(tx);
63
+ if (spireProposeCalldata) {
64
+ this.logger.trace(`Decoded propose calldata from Spire Proposer for tx ${tx.hash}`);
65
+ this.instrumentation?.recordBlockProposalTxTarget(tx.to, false);
66
+ return spireProposeCalldata;
67
+ }
68
+ // Fall back to trace-based extraction
69
+ this.logger.warn(`Failed to decode multicall3, direct propose, or Spire proposer for L1 tx ${tx.hash}, falling back to trace for checkpoint ${checkpointNumber}`);
70
+ this.instrumentation?.recordBlockProposalTxTarget(tx.to ?? EthAddress.ZERO.toString(), true);
71
+ return await this.extractCalldataViaTrace(tx.hash);
72
+ }
73
+ /**
74
+ * Attempts to decode a transaction as a Spire Proposer multicall wrapper.
75
+ * If successful, extracts the wrapped call and validates it as either multicall3 or direct propose.
76
+ * @param tx - The transaction to decode
77
+ * @returns The propose calldata if successfully decoded and validated, undefined otherwise
78
+ */ async tryDecodeSpireProposer(tx) {
79
+ // Try to decode as Spire Proposer multicall (extracts the wrapped call)
80
+ const spireWrappedCall = await getCallFromSpireProposer(tx, this.publicClient, this.logger);
81
+ if (!spireWrappedCall) {
82
+ return undefined;
83
+ }
84
+ this.logger.trace(`Decoded Spire Proposer wrapping for tx ${tx.hash}, inner call to ${spireWrappedCall.to}`);
85
+ // Now try to decode the wrapped call as either multicall3 or direct propose
86
+ const wrappedTx = {
87
+ to: spireWrappedCall.to,
88
+ input: spireWrappedCall.data,
89
+ hash: tx.hash
90
+ };
91
+ const multicall3Calldata = this.tryDecodeMulticall3(wrappedTx);
92
+ if (multicall3Calldata) {
93
+ this.logger.trace(`Decoded propose calldata from Spire Proposer to multicall3 for tx ${tx.hash}`);
94
+ return multicall3Calldata;
95
+ }
96
+ const directProposeCalldata = this.tryDecodeDirectPropose(wrappedTx);
97
+ if (directProposeCalldata) {
98
+ this.logger.trace(`Decoded propose calldata from Spire Proposer to direct propose for tx ${tx.hash}`);
99
+ return directProposeCalldata;
100
+ }
101
+ this.logger.warn(`Spire Proposer wrapped call could not be decoded as multicall3 or direct propose for tx ${tx.hash}`);
102
+ return undefined;
103
+ }
104
+ /**
105
+ * Attempts to decode transaction input as multicall3 and extract propose calldata.
106
+ * Returns undefined if validation fails.
107
+ * @param tx - The transaction-like object with to, input, and hash
108
+ * @returns The propose calldata if successfully validated, undefined otherwise
109
+ */ tryDecodeMulticall3(tx) {
110
+ const txHash = tx.hash;
111
+ try {
112
+ // Check if transaction is to Multicall3 address
113
+ if (!tx.to || !EthAddress.areEqual(tx.to, MULTI_CALL_3_ADDRESS)) {
114
+ this.logger.debug(`Transaction is not to Multicall3 address (to: ${tx.to})`, {
115
+ txHash,
116
+ to: tx.to
117
+ });
118
+ return undefined;
119
+ }
120
+ // Try to decode as multicall3 aggregate3 call
121
+ const { functionName: multicall3Fn, args: multicall3Args } = decodeFunctionData({
122
+ abi: multicall3Abi,
123
+ data: tx.input
124
+ });
125
+ // If not aggregate3, return undefined (not a multicall3 transaction)
126
+ if (multicall3Fn !== 'aggregate3') {
127
+ this.logger.warn(`Transaction is not multicall3 aggregate3 (got ${multicall3Fn})`, {
128
+ txHash
129
+ });
130
+ return undefined;
131
+ }
132
+ if (multicall3Args.length !== 1) {
133
+ this.logger.warn(`Unexpected number of arguments for multicall3 (got ${multicall3Args.length})`, {
134
+ txHash
135
+ });
136
+ return undefined;
137
+ }
138
+ const [calls] = multicall3Args;
139
+ // Validate all calls and find propose calls
140
+ const rollupAddressLower = this.rollupAddress.toString().toLowerCase();
141
+ const proposeCalls = [];
142
+ for(let i = 0; i < calls.length; i++){
143
+ const addr = calls[i].target.toLowerCase();
144
+ const callData = calls[i].callData;
145
+ // Extract function selector (first 4 bytes)
146
+ if (callData.length < 10) {
147
+ // "0x" + 8 hex chars = 10 chars minimum for a valid function call
148
+ this.logger.warn(`Invalid calldata length at index ${i} (${callData.length})`, {
149
+ txHash
150
+ });
151
+ return undefined;
152
+ }
153
+ const functionSelector = callData.slice(0, 10);
154
+ // Validate this call is allowed by searching through valid calls
155
+ const validCall = this.validContractCalls.find((vc)=>vc.address === addr && vc.functionSelector === functionSelector);
156
+ if (!validCall) {
157
+ this.logger.warn(`Invalid contract call detected in multicall3`, {
158
+ index: i,
159
+ targetAddress: addr,
160
+ functionSelector,
161
+ validCalls: this.validContractCalls.map((c)=>({
162
+ address: c.address,
163
+ selector: c.functionSelector
164
+ })),
165
+ txHash
166
+ });
167
+ return undefined;
168
+ }
169
+ this.logger.trace(`Valid call found to ${addr}`, {
170
+ validCall
171
+ });
172
+ // Collect propose calls specifically
173
+ if (addr === rollupAddressLower && validCall.functionName === 'propose') {
174
+ proposeCalls.push(callData);
175
+ }
176
+ }
177
+ // Validate exactly ONE propose call
178
+ if (proposeCalls.length === 0) {
179
+ this.logger.warn(`No propose calls found in multicall3`, {
180
+ txHash
181
+ });
182
+ return undefined;
183
+ }
184
+ if (proposeCalls.length > 1) {
185
+ this.logger.warn(`Multiple propose calls found in multicall3 (${proposeCalls.length})`, {
186
+ txHash
187
+ });
188
+ return undefined;
189
+ }
190
+ // Successfully extracted single propose call
191
+ return proposeCalls[0];
192
+ } catch (err) {
193
+ // Any decoding error triggers fallback to trace
194
+ this.logger.warn(`Failed to decode multicall3: ${err}`, {
195
+ txHash
196
+ });
197
+ return undefined;
198
+ }
199
+ }
200
+ /**
201
+ * Attempts to decode transaction as a direct propose call to the rollup contract.
202
+ * Returns undefined if validation fails.
203
+ * @param tx - The transaction-like object with to, input, and hash
204
+ * @returns The propose calldata if successfully validated, undefined otherwise
205
+ */ tryDecodeDirectPropose(tx) {
206
+ const txHash = tx.hash;
207
+ try {
208
+ // Check if transaction is to the rollup address
209
+ if (!tx.to || !EthAddress.areEqual(tx.to, this.rollupAddress)) {
210
+ this.logger.debug(`Transaction is not to rollup address (to: ${tx.to})`, {
211
+ txHash
212
+ });
213
+ return undefined;
214
+ }
215
+ // Try to decode as propose call
216
+ const { functionName } = decodeFunctionData({
217
+ abi: RollupAbi,
218
+ data: tx.input
219
+ });
220
+ // If not propose, return undefined
221
+ if (functionName !== 'propose') {
222
+ this.logger.warn(`Transaction to rollup is not propose (got ${functionName})`, {
223
+ txHash
224
+ });
225
+ return undefined;
226
+ }
227
+ // Successfully validated direct propose call
228
+ this.logger.trace(`Validated direct propose call to rollup`, {
229
+ txHash
230
+ });
231
+ return tx.input;
232
+ } catch (err) {
233
+ // Any decoding error means it's not a valid propose call
234
+ this.logger.warn(`Failed to decode as direct propose: ${err}`, {
235
+ txHash
236
+ });
237
+ return undefined;
238
+ }
239
+ }
240
+ /**
241
+ * Uses debug/trace RPC to extract the actual calldata from the successful propose call.
242
+ * This is the definitive fallback that works for any transaction pattern.
243
+ * Tries trace_transaction first, then falls back to debug_traceTransaction.
244
+ * @param txHash - The transaction hash to trace
245
+ * @returns The propose calldata from the successful call
246
+ */ async extractCalldataViaTrace(txHash) {
247
+ const rollupAddress = this.rollupAddress;
248
+ const selector = PROPOSE_SELECTOR;
249
+ let calls;
250
+ try {
251
+ // Try trace_transaction first (using Parity/OpenEthereum/Erigon RPC)
252
+ this.logger.debug(`Attempting to trace transaction ${txHash} using trace_transaction`);
253
+ calls = await getSuccessfulCallsFromTrace(this.debugClient, txHash, rollupAddress, selector, this.logger);
254
+ this.logger.debug(`Successfully traced using trace_transaction, found ${calls.length} calls`);
255
+ } catch (err) {
256
+ const traceError = err instanceof Error ? err : new Error(String(err));
257
+ this.logger.verbose(`Failed trace_transaction for ${txHash}`, {
258
+ traceError
259
+ });
260
+ try {
261
+ // Fall back to debug_traceTransaction (Geth RPC)
262
+ this.logger.debug(`Attempting to trace transaction ${txHash} using debug_traceTransaction`);
263
+ calls = await getSuccessfulCallsFromDebug(this.debugClient, txHash, rollupAddress, selector, this.logger);
264
+ this.logger.debug(`Successfully traced using debug_traceTransaction, found ${calls.length} calls`);
265
+ } catch (debugErr) {
266
+ const debugError = debugErr instanceof Error ? debugErr : new Error(String(debugErr));
267
+ this.logger.warn(`All tracing methods failed for tx ${txHash}`, {
268
+ traceError,
269
+ debugError,
270
+ txHash
271
+ });
272
+ throw new Error(`Failed to trace transaction ${txHash} to extract propose calldata`);
273
+ }
274
+ }
275
+ // Validate exactly ONE successful propose call
276
+ if (calls.length === 0) {
277
+ throw new Error(`No successful propose calls found in transaction ${txHash}`);
278
+ }
279
+ if (calls.length > 1) {
280
+ throw new Error(`Multiple successful propose calls found in transaction ${txHash} (${calls.length})`);
281
+ }
282
+ // Return the calldata from the single successful propose call
283
+ return calls[0].input;
284
+ }
285
+ /**
286
+ * Decodes propose calldata and builds the checkpoint header structure.
287
+ * @param proposeCalldata - The propose function calldata
288
+ * @param blockHash - The L1 block hash containing this transaction
289
+ * @param checkpointNumber - The checkpoint number
290
+ * @returns The decoded checkpoint header and metadata
291
+ */ decodeAndBuildCheckpoint(proposeCalldata, blockHash, checkpointNumber) {
292
+ const { functionName: rollupFunctionName, args: rollupArgs } = decodeFunctionData({
293
+ abi: RollupAbi,
294
+ data: proposeCalldata
295
+ });
296
+ if (rollupFunctionName !== 'propose') {
297
+ throw new Error(`Unexpected rollup method called ${rollupFunctionName}`);
298
+ }
299
+ const [decodedArgs, packedAttestations, _signers, _attestationsAndSignersSignature, _blobInput] = rollupArgs;
300
+ const attestations = CommitteeAttestation.fromPacked(packedAttestations, this.targetCommitteeSize);
301
+ this.logger.trace(`Decoded propose calldata`, {
302
+ checkpointNumber,
303
+ archive: decodedArgs.archive,
304
+ header: decodedArgs.header,
305
+ l1BlockHash: blockHash,
306
+ attestations,
307
+ packedAttestations,
308
+ targetCommitteeSize: this.targetCommitteeSize
309
+ });
310
+ const header = CheckpointHeader.fromViem(decodedArgs.header);
311
+ const archiveRoot = new Fr(Buffer.from(hexToBytes(decodedArgs.archive)));
312
+ return {
313
+ checkpointNumber,
314
+ archiveRoot,
315
+ header,
316
+ attestations,
317
+ blockHash
318
+ };
319
+ }
320
+ }
321
+ /**
322
+ * Pre-computed function selectors for all valid contract calls.
323
+ * These are computed once at module load time from the ABIs.
324
+ * Based on analysis of sequencer-client/src/publisher/sequencer-publisher.ts
325
+ */ // Rollup contract function selectors (always valid)
326
+ const PROPOSE_SELECTOR = toFunctionSelector(RollupAbi.find((x)=>x.type === 'function' && x.name === 'propose'));
327
+ const INVALIDATE_BAD_ATTESTATION_SELECTOR = toFunctionSelector(RollupAbi.find((x)=>x.type === 'function' && x.name === 'invalidateBadAttestation'));
328
+ const INVALIDATE_INSUFFICIENT_ATTESTATIONS_SELECTOR = toFunctionSelector(RollupAbi.find((x)=>x.type === 'function' && x.name === 'invalidateInsufficientAttestations'));
329
+ // Governance proposer function selectors
330
+ const GOVERNANCE_SIGNAL_WITH_SIG_SELECTOR = toFunctionSelector(GovernanceProposerAbi.find((x)=>x.type === 'function' && x.name === 'signalWithSig'));
331
+ // Slash factory function selectors
332
+ const CREATE_SLASH_PAYLOAD_SELECTOR = toFunctionSelector(SlashFactoryAbi.find((x)=>x.type === 'function' && x.name === 'createSlashPayload'));
333
+ // Empire slashing proposer function selectors
334
+ const EMPIRE_SIGNAL_WITH_SIG_SELECTOR = toFunctionSelector(EmpireSlashingProposerAbi.find((x)=>x.type === 'function' && x.name === 'signalWithSig'));
335
+ const EMPIRE_SUBMIT_ROUND_WINNER_SELECTOR = toFunctionSelector(EmpireSlashingProposerAbi.find((x)=>x.type === 'function' && x.name === 'submitRoundWinner'));
336
+ // Tally slashing proposer function selectors
337
+ const TALLY_VOTE_SELECTOR = toFunctionSelector(TallySlashingProposerAbi.find((x)=>x.type === 'function' && x.name === 'vote'));
338
+ const TALLY_EXECUTE_ROUND_SELECTOR = toFunctionSelector(TallySlashingProposerAbi.find((x)=>x.type === 'function' && x.name === 'executeRound'));
339
+ /**
340
+ * All valid contract calls that the sequencer publisher can make.
341
+ * Builds the list of valid (address, selector) pairs for validation.
342
+ *
343
+ * Alternatively, if we are absolutely sure that no code path from any of these
344
+ * contracts can eventually land on another call to `propose`, we can remove the
345
+ * function selectors.
346
+ */ function computeValidContractCalls(addresses) {
347
+ const { rollupAddress, governanceProposerAddress, slashFactoryAddress, slashingProposerAddress } = addresses;
348
+ const calls = [];
349
+ // Rollup contract calls (always present)
350
+ calls.push({
351
+ address: rollupAddress.toString().toLowerCase(),
352
+ functionSelector: PROPOSE_SELECTOR,
353
+ functionName: 'propose'
354
+ }, {
355
+ address: rollupAddress.toString().toLowerCase(),
356
+ functionSelector: INVALIDATE_BAD_ATTESTATION_SELECTOR,
357
+ functionName: 'invalidateBadAttestation'
358
+ }, {
359
+ address: rollupAddress.toString().toLowerCase(),
360
+ functionSelector: INVALIDATE_INSUFFICIENT_ATTESTATIONS_SELECTOR,
361
+ functionName: 'invalidateInsufficientAttestations'
362
+ });
363
+ // Governance proposer calls (optional)
364
+ if (governanceProposerAddress && !governanceProposerAddress.isZero()) {
365
+ calls.push({
366
+ address: governanceProposerAddress.toString().toLowerCase(),
367
+ functionSelector: GOVERNANCE_SIGNAL_WITH_SIG_SELECTOR,
368
+ functionName: 'signalWithSig'
369
+ });
370
+ }
371
+ // Slash factory calls (optional)
372
+ if (slashFactoryAddress && !slashFactoryAddress.isZero()) {
373
+ calls.push({
374
+ address: slashFactoryAddress.toString().toLowerCase(),
375
+ functionSelector: CREATE_SLASH_PAYLOAD_SELECTOR,
376
+ functionName: 'createSlashPayload'
377
+ });
378
+ }
379
+ // Slashing proposer calls (optional, can be either Empire or Tally)
380
+ if (slashingProposerAddress && !slashingProposerAddress.isZero()) {
381
+ // Empire calls
382
+ calls.push({
383
+ address: slashingProposerAddress.toString().toLowerCase(),
384
+ functionSelector: EMPIRE_SIGNAL_WITH_SIG_SELECTOR,
385
+ functionName: 'signalWithSig (empire)'
386
+ }, {
387
+ address: slashingProposerAddress.toString().toLowerCase(),
388
+ functionSelector: EMPIRE_SUBMIT_ROUND_WINNER_SELECTOR,
389
+ functionName: 'submitRoundWinner'
390
+ });
391
+ // Tally calls
392
+ calls.push({
393
+ address: slashingProposerAddress.toString().toLowerCase(),
394
+ functionSelector: TALLY_VOTE_SELECTOR,
395
+ functionName: 'vote'
396
+ }, {
397
+ address: slashingProposerAddress.toString().toLowerCase(),
398
+ functionSelector: TALLY_EXECUTE_ROUND_SELECTOR,
399
+ functionName: 'executeRound'
400
+ });
401
+ }
402
+ return calls;
403
+ }
@@ -0,0 +1,87 @@
1
+ import { type CheckpointBlobData } from '@aztec/blob-lib';
2
+ import type { BlobSinkClientInterface } from '@aztec/blob-sink/client';
3
+ import type { ViemClient, ViemPublicClient, ViemPublicDebugClient } from '@aztec/ethereum/types';
4
+ import { CheckpointNumber } from '@aztec/foundation/branded-types';
5
+ import { Fr } from '@aztec/foundation/curves/bn254';
6
+ import { EthAddress } from '@aztec/foundation/eth-address';
7
+ import { type Logger } from '@aztec/foundation/log';
8
+ import { type InboxAbi, RollupAbi } from '@aztec/l1-artifacts';
9
+ import { CommitteeAttestation } from '@aztec/stdlib/block';
10
+ import { PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
11
+ import { Proof } from '@aztec/stdlib/proofs';
12
+ import { CheckpointHeader } from '@aztec/stdlib/rollup';
13
+ import { type GetContractReturnType, type Hex } from 'viem';
14
+ import type { ArchiverInstrumentation } from '../instrumentation.js';
15
+ import type { DataRetrieval } from '../structs/data_retrieval.js';
16
+ import type { InboxMessage } from '../structs/inbox_message.js';
17
+ import type { L1PublishedData } from '../structs/published.js';
18
+ export type RetrievedCheckpoint = {
19
+ checkpointNumber: CheckpointNumber;
20
+ archiveRoot: Fr;
21
+ header: CheckpointHeader;
22
+ checkpointBlobData: CheckpointBlobData;
23
+ l1: L1PublishedData;
24
+ chainId: Fr;
25
+ version: Fr;
26
+ attestations: CommitteeAttestation[];
27
+ };
28
+ export declare function retrievedToPublishedCheckpoint({ checkpointNumber, archiveRoot, header: checkpointHeader, checkpointBlobData, l1, chainId, version, attestations }: RetrievedCheckpoint): Promise<PublishedCheckpoint>;
29
+ /**
30
+ * Fetches new checkpoints.
31
+ * @param publicClient - The viem public client to use for transaction retrieval.
32
+ * @param debugClient - The viem debug client to use for trace/debug RPC methods (optional).
33
+ * @param rollupAddress - The address of the rollup contract.
34
+ * @param searchStartBlock - The block number to use for starting the search.
35
+ * @param searchEndBlock - The highest block number that we should search up to.
36
+ * @param expectedNextL2BlockNum - The next L2 block number that we expect to find.
37
+ * @returns An array of block; as well as the next eth block to search from.
38
+ */
39
+ export declare function retrieveCheckpointsFromRollup(rollup: GetContractReturnType<typeof RollupAbi, ViemPublicClient>, publicClient: ViemPublicClient, debugClient: ViemPublicDebugClient, blobSinkClient: BlobSinkClientInterface, searchStartBlock: bigint, searchEndBlock: bigint, contractAddresses: {
40
+ governanceProposerAddress: EthAddress;
41
+ slashFactoryAddress?: EthAddress;
42
+ slashingProposerAddress: EthAddress;
43
+ }, instrumentation: ArchiverInstrumentation, logger?: Logger): Promise<RetrievedCheckpoint[]>;
44
+ export declare function getL1BlockTime(publicClient: ViemPublicClient, blockNumber: bigint): Promise<bigint>;
45
+ export declare function getCheckpointBlobDataFromBlobs(blobSinkClient: BlobSinkClientInterface, blockHash: string, blobHashes: Buffer<ArrayBufferLike>[], checkpointNumber: CheckpointNumber, logger: Logger): Promise<CheckpointBlobData>;
46
+ /** Given an L1 to L2 message, retrieves its corresponding event from the Inbox within a specific block range. */
47
+ export declare function retrieveL1ToL2Message(inbox: GetContractReturnType<typeof InboxAbi, ViemClient>, leaf: Fr, fromBlock: bigint, toBlock: bigint): Promise<InboxMessage | undefined>;
48
+ /**
49
+ * Fetch L1 to L2 messages.
50
+ * @param publicClient - The viem public client to use for transaction retrieval.
51
+ * @param inboxAddress - The address of the inbox contract to fetch messages from.
52
+ * @param blockUntilSynced - If true, blocks until the archiver has fully synced.
53
+ * @param searchStartBlock - The block number to use for starting the search.
54
+ * @param searchEndBlock - The highest block number that we should search up to.
55
+ * @returns An array of InboxLeaf and next eth block to search from.
56
+ */
57
+ export declare function retrieveL1ToL2Messages(inbox: GetContractReturnType<typeof InboxAbi, ViemClient>, searchStartBlock: bigint, searchEndBlock: bigint): Promise<InboxMessage[]>;
58
+ /** Retrieves L2ProofVerified events from the rollup contract. */
59
+ export declare function retrieveL2ProofVerifiedEvents(publicClient: ViemPublicClient, rollupAddress: EthAddress, searchStartBlock: bigint, searchEndBlock?: bigint): Promise<{
60
+ l1BlockNumber: bigint;
61
+ checkpointNumber: CheckpointNumber;
62
+ proverId: Fr;
63
+ txHash: Hex;
64
+ }[]>;
65
+ /** Retrieve submitted proofs from the rollup contract */
66
+ export declare function retrieveL2ProofsFromRollup(publicClient: ViemPublicClient, rollupAddress: EthAddress, searchStartBlock: bigint, searchEndBlock?: bigint): Promise<DataRetrieval<{
67
+ proof: Proof;
68
+ proverId: Fr;
69
+ checkpointNumber: number;
70
+ txHash: `0x${string}`;
71
+ }>>;
72
+ export type SubmitEpochProof = {
73
+ archiveRoot: Fr;
74
+ proverId: Fr;
75
+ proof: Proof;
76
+ };
77
+ /**
78
+ * Gets epoch proof metadata (archive root and proof) from the calldata of an L1 transaction.
79
+ * Assumes that the block was published from an EOA.
80
+ * TODO: Add retries and error management.
81
+ * @param publicClient - The viem public client to use for transaction retrieval.
82
+ * @param txHash - Hash of the tx that published it.
83
+ * @param expectedProverId - Expected prover ID.
84
+ * @returns Epoch proof metadata from the calldata, deserialized.
85
+ */
86
+ export declare function getProofFromSubmitProofTx(publicClient: ViemPublicClient, txHash: `0x${string}`, expectedProverId: Fr): Promise<SubmitEpochProof>;
87
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YV9yZXRyaWV2YWwuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcmNoaXZlci9sMS9kYXRhX3JldHJpZXZhbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBRUwsS0FBSyxrQkFBa0IsRUFJeEIsTUFBTSxpQkFBaUIsQ0FBQztBQUN6QixPQUFPLEtBQUssRUFBRSx1QkFBdUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBRXZFLE9BQU8sS0FBSyxFQUFFLFVBQVUsRUFBRSxn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