@aztec/archiver 0.0.1-commit.3469e52 → 0.0.1-commit.35158ae7e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dest/archiver.d.ts +12 -9
- package/dest/archiver.d.ts.map +1 -1
- package/dest/archiver.js +98 -124
- package/dest/config.d.ts +3 -3
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +2 -1
- package/dest/errors.d.ts +26 -9
- package/dest/errors.d.ts.map +1 -1
- package/dest/errors.js +34 -13
- package/dest/factory.d.ts +4 -2
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +29 -23
- package/dest/index.d.ts +2 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -0
- package/dest/l1/bin/retrieve-calldata.js +35 -32
- package/dest/l1/calldata_retriever.d.ts +73 -50
- package/dest/l1/calldata_retriever.d.ts.map +1 -1
- package/dest/l1/calldata_retriever.js +190 -259
- package/dest/l1/data_retrieval.d.ts +9 -9
- package/dest/l1/data_retrieval.d.ts.map +1 -1
- package/dest/l1/data_retrieval.js +24 -22
- package/dest/l1/spire_proposer.d.ts +5 -5
- package/dest/l1/spire_proposer.d.ts.map +1 -1
- package/dest/l1/spire_proposer.js +9 -17
- package/dest/l1/validate_trace.d.ts +6 -3
- package/dest/l1/validate_trace.d.ts.map +1 -1
- package/dest/l1/validate_trace.js +13 -9
- package/dest/modules/data_source_base.d.ts +27 -23
- package/dest/modules/data_source_base.d.ts.map +1 -1
- package/dest/modules/data_source_base.js +49 -124
- package/dest/modules/data_store_updater.d.ts +42 -26
- package/dest/modules/data_store_updater.d.ts.map +1 -1
- package/dest/modules/data_store_updater.js +149 -129
- package/dest/modules/instrumentation.d.ts +17 -4
- package/dest/modules/instrumentation.d.ts.map +1 -1
- package/dest/modules/instrumentation.js +36 -12
- package/dest/modules/l1_synchronizer.d.ts +5 -8
- package/dest/modules/l1_synchronizer.d.ts.map +1 -1
- package/dest/modules/l1_synchronizer.js +59 -25
- package/dest/store/block_store.d.ts +49 -32
- package/dest/store/block_store.d.ts.map +1 -1
- package/dest/store/block_store.js +188 -95
- package/dest/store/contract_class_store.d.ts +2 -3
- package/dest/store/contract_class_store.d.ts.map +1 -1
- package/dest/store/contract_class_store.js +16 -72
- package/dest/store/contract_instance_store.d.ts +1 -1
- package/dest/store/contract_instance_store.d.ts.map +1 -1
- package/dest/store/contract_instance_store.js +6 -2
- package/dest/store/kv_archiver_store.d.ts +64 -36
- package/dest/store/kv_archiver_store.d.ts.map +1 -1
- package/dest/store/kv_archiver_store.js +63 -29
- package/dest/store/l2_tips_cache.d.ts +19 -0
- package/dest/store/l2_tips_cache.d.ts.map +1 -0
- package/dest/store/l2_tips_cache.js +89 -0
- package/dest/store/log_store.d.ts +9 -6
- package/dest/store/log_store.d.ts.map +1 -1
- package/dest/store/log_store.js +150 -53
- package/dest/store/message_store.d.ts +5 -1
- package/dest/store/message_store.d.ts.map +1 -1
- package/dest/store/message_store.js +14 -1
- package/dest/test/fake_l1_state.d.ts +16 -4
- package/dest/test/fake_l1_state.d.ts.map +1 -1
- package/dest/test/fake_l1_state.js +95 -23
- package/dest/test/index.js +3 -1
- package/dest/test/mock_archiver.d.ts +1 -1
- package/dest/test/mock_archiver.d.ts.map +1 -1
- package/dest/test/mock_archiver.js +3 -2
- package/dest/test/mock_l2_block_source.d.ts +39 -23
- package/dest/test/mock_l2_block_source.d.ts.map +1 -1
- package/dest/test/mock_l2_block_source.js +157 -112
- package/dest/test/mock_structs.d.ts +6 -2
- package/dest/test/mock_structs.d.ts.map +1 -1
- package/dest/test/mock_structs.js +24 -10
- package/dest/test/noop_l1_archiver.d.ts +26 -0
- package/dest/test/noop_l1_archiver.d.ts.map +1 -0
- package/dest/test/noop_l1_archiver.js +72 -0
- package/package.json +14 -13
- package/src/archiver.ts +126 -151
- package/src/config.ts +8 -1
- package/src/errors.ts +52 -24
- package/src/factory.ts +46 -22
- package/src/index.ts +1 -0
- package/src/l1/README.md +25 -68
- package/src/l1/bin/retrieve-calldata.ts +45 -33
- package/src/l1/calldata_retriever.ts +249 -379
- package/src/l1/data_retrieval.ts +27 -29
- package/src/l1/spire_proposer.ts +7 -15
- package/src/l1/validate_trace.ts +24 -6
- package/src/modules/data_source_base.ts +84 -169
- package/src/modules/data_store_updater.ts +166 -161
- package/src/modules/instrumentation.ts +46 -14
- package/src/modules/l1_synchronizer.ts +72 -36
- package/src/store/block_store.ts +239 -140
- package/src/store/contract_class_store.ts +16 -110
- package/src/store/contract_instance_store.ts +8 -5
- package/src/store/kv_archiver_store.ts +104 -53
- package/src/store/l2_tips_cache.ts +89 -0
- package/src/store/log_store.ts +231 -70
- package/src/store/message_store.ts +20 -1
- package/src/test/fake_l1_state.ts +127 -28
- package/src/test/index.ts +3 -0
- package/src/test/mock_archiver.ts +3 -2
- package/src/test/mock_l2_block_source.ts +211 -129
- package/src/test/mock_structs.ts +45 -15
- package/src/test/noop_l1_archiver.ts +115 -0
package/dest/errors.js
CHANGED
|
@@ -3,16 +3,9 @@ export class NoBlobBodiesFoundError extends Error {
|
|
|
3
3
|
super(`No blob bodies found for block ${l2BlockNum}`);
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
|
-
export class InitialBlockNumberNotSequentialError extends Error {
|
|
7
|
-
newBlockNumber;
|
|
8
|
-
previousBlockNumber;
|
|
9
|
-
constructor(newBlockNumber, previousBlockNumber){
|
|
10
|
-
super(`Cannot insert new block ${newBlockNumber} given previous block number in store is ${previousBlockNumber ?? 'undefined'}`), this.newBlockNumber = newBlockNumber, this.previousBlockNumber = previousBlockNumber;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
6
|
export class BlockNumberNotSequentialError extends Error {
|
|
14
7
|
constructor(newBlockNumber, previous){
|
|
15
|
-
super(`Cannot insert new block ${newBlockNumber} given previous block number
|
|
8
|
+
super(`Cannot insert new block ${newBlockNumber} given previous block number is ${previous ?? 'undefined'}`);
|
|
16
9
|
}
|
|
17
10
|
}
|
|
18
11
|
export class InitialCheckpointNumberNotSequentialError extends Error {
|
|
@@ -27,11 +20,6 @@ export class CheckpointNumberNotSequentialError extends Error {
|
|
|
27
20
|
super(`Cannot insert new checkpoint ${newCheckpointNumber} given previous checkpoint number in batch is ${previous ?? 'undefined'}`);
|
|
28
21
|
}
|
|
29
22
|
}
|
|
30
|
-
export class CheckpointNumberNotConsistentError extends Error {
|
|
31
|
-
constructor(newCheckpointNumber, previous){
|
|
32
|
-
super(`Cannot insert block for new checkpoint ${newCheckpointNumber} given previous block was checkpoint ${previous ?? 'undefined'}`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
23
|
export class BlockIndexNotSequentialError extends Error {
|
|
36
24
|
constructor(newBlockIndex, previousBlockIndex){
|
|
37
25
|
super(`Cannot insert new block at checkpoint index ${newBlockIndex} given previous block index is ${previousBlockIndex ?? 'undefined'}`);
|
|
@@ -52,3 +40,36 @@ export class BlockNotFoundError extends Error {
|
|
|
52
40
|
super(`Failed to find expected block number ${blockNumber}`);
|
|
53
41
|
}
|
|
54
42
|
}
|
|
43
|
+
/** Thrown when a proposed block matches a block that was already checkpointed. This is expected for late proposals. */ export class BlockAlreadyCheckpointedError extends Error {
|
|
44
|
+
blockNumber;
|
|
45
|
+
constructor(blockNumber){
|
|
46
|
+
super(`Block ${blockNumber} has already been checkpointed with the same content`), this.blockNumber = blockNumber;
|
|
47
|
+
this.name = 'BlockAlreadyCheckpointedError';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/** Thrown when logs are added for a tag whose last stored log has a higher block number than the new log. */ export class OutOfOrderLogInsertionError extends Error {
|
|
51
|
+
logType;
|
|
52
|
+
tag;
|
|
53
|
+
lastBlockNumber;
|
|
54
|
+
newBlockNumber;
|
|
55
|
+
constructor(logType, tag, lastBlockNumber, newBlockNumber){
|
|
56
|
+
super(`Out-of-order ${logType} log insertion for tag ${tag}: ` + `last existing log is from block ${lastBlockNumber} but new log is from block ${newBlockNumber}`), this.logType = logType, this.tag = tag, this.lastBlockNumber = lastBlockNumber, this.newBlockNumber = newBlockNumber;
|
|
57
|
+
this.name = 'OutOfOrderLogInsertionError';
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/** Thrown when L1 to L2 messages are requested for a checkpoint whose message tree hasn't been sealed yet. */ export class L1ToL2MessagesNotReadyError extends Error {
|
|
61
|
+
checkpointNumber;
|
|
62
|
+
inboxTreeInProgress;
|
|
63
|
+
constructor(checkpointNumber, inboxTreeInProgress){
|
|
64
|
+
super(`Cannot get L1 to L2 messages for checkpoint ${checkpointNumber}: ` + `inbox tree in progress is ${inboxTreeInProgress}, messages not yet sealed`), this.checkpointNumber = checkpointNumber, this.inboxTreeInProgress = inboxTreeInProgress;
|
|
65
|
+
this.name = 'L1ToL2MessagesNotReadyError';
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/** Thrown when a proposed block conflicts with an already checkpointed block (different content). */ export class CannotOverwriteCheckpointedBlockError extends Error {
|
|
69
|
+
blockNumber;
|
|
70
|
+
lastCheckpointedBlock;
|
|
71
|
+
constructor(blockNumber, lastCheckpointedBlock){
|
|
72
|
+
super(`Cannot add block ${blockNumber}: would overwrite checkpointed data (checkpointed up to block ${lastCheckpointedBlock})`), this.blockNumber = blockNumber, this.lastCheckpointedBlock = lastCheckpointedBlock;
|
|
73
|
+
this.name = 'CannotOverwriteCheckpointedBlockError';
|
|
74
|
+
}
|
|
75
|
+
}
|
package/dest/factory.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DataStoreConfig } from '@aztec/kv-store
|
|
1
|
+
import type { DataStoreConfig } from '@aztec/stdlib/kv-store';
|
|
2
2
|
import { Archiver, type ArchiverDeps } from './archiver.js';
|
|
3
3
|
import { type ArchiverConfig } from './config.js';
|
|
4
4
|
import { KVArchiverDataStore } from './store/kv_archiver_store.js';
|
|
@@ -15,4 +15,6 @@ export declare function createArchiverStore(userConfig: Pick<ArchiverConfig, 'ar
|
|
|
15
15
|
export declare function createArchiver(config: ArchiverConfig & DataStoreConfig, deps: ArchiverDeps, opts?: {
|
|
16
16
|
blockUntilSync: boolean;
|
|
17
17
|
}): Promise<Archiver>;
|
|
18
|
-
|
|
18
|
+
/** Registers protocol contracts in the archiver store. Idempotent — skips contracts that already exist (e.g. on node restart). */
|
|
19
|
+
export declare function registerProtocolContracts(store: KVArchiverDataStore): Promise<void>;
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFjdG9yeS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2ZhY3RvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0JBLE9BQU8sS0FBSyxFQUFFLGVBQWUsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBTTlELE9BQU8sRUFBRSxRQUFRLEVBQUUsS0FBSyxZQUFZLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDNUQsT0FBTyxFQUFFLEtBQUssY0FBYyxFQUFxQixNQUFNLGFBQWEsQ0FBQztBQUdyRSxPQUFPLEVBQXVCLG1CQUFtQixFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFHeEYsZUFBTyxNQUFNLG1CQUFtQixhQUFhLENBQUM7QUFFOUMsaUNBQWlDO0FBQ2pDLHdCQUFzQixtQkFBbUIsQ0FDdkMsVUFBVSxFQUFFLElBQUksQ0FBQyxjQUFjLEVBQUUsd0JBQXdCLEdBQUcsU0FBUyxDQUFDLEdBQUcsZUFBZSxnQ0FRekY7QUFFRDs7Ozs7O0dBTUc7QUFDSCx3QkFBc0IsY0FBYyxDQUNsQyxNQUFNLEVBQUUsY0FBYyxHQUFHLGVBQWUsRUFDeEMsSUFBSSxFQUFFLFlBQVksRUFDbEIsSUFBSSxHQUFFO0lBQUUsY0FBYyxFQUFFLE9BQU8sQ0FBQTtDQUE2QixHQUMzRCxPQUFPLENBQUMsUUFBUSxDQUFDLENBdUhuQjtBQUVELG9JQUFrSTtBQUNsSSx3QkFBc0IseUJBQXlCLENBQUMsS0FBSyxFQUFFLG1CQUFtQixpQkF5QnpFIn0=
|
package/dest/factory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAM9D,OAAO,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,KAAK,cAAc,EAAqB,MAAM,aAAa,CAAC;AAGrE,OAAO,EAAuB,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGxF,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAE9C,iCAAiC;AACjC,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE,wBAAwB,GAAG,SAAS,CAAC,GAAG,eAAe,gCAQzF;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,cAAc,GAAG,eAAe,EACxC,IAAI,EAAE,YAAY,EAClB,IAAI,GAAE;IAAE,cAAc,EAAE,OAAO,CAAA;CAA6B,GAC3D,OAAO,CAAC,QAAQ,CAAC,CAuHnB;AAED,oIAAkI;AAClI,wBAAsB,yBAAyB,CAAC,KAAK,EAAE,mBAAmB,iBAyBzE"}
|
package/dest/factory.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { EpochCache } from '@aztec/epoch-cache';
|
|
2
2
|
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
3
|
+
import { makeL1HttpTransport } from '@aztec/ethereum/client';
|
|
3
4
|
import { InboxContract, RollupContract } from '@aztec/ethereum/contracts';
|
|
4
5
|
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
5
6
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
6
7
|
import { merge } from '@aztec/foundation/collection';
|
|
7
8
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
8
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
9
9
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
10
10
|
import { createStore } from '@aztec/kv-store/lmdb-v2';
|
|
11
11
|
import { protocolContractNames } from '@aztec/protocol-contracts';
|
|
@@ -14,19 +14,20 @@ import { FunctionType, decodeFunctionSignature } from '@aztec/stdlib/abi';
|
|
|
14
14
|
import { computePublicBytecodeCommitment } from '@aztec/stdlib/contract';
|
|
15
15
|
import { getTelemetryClient } from '@aztec/telemetry-client';
|
|
16
16
|
import { EventEmitter } from 'events';
|
|
17
|
-
import { createPublicClient
|
|
17
|
+
import { createPublicClient } from 'viem';
|
|
18
18
|
import { Archiver } from './archiver.js';
|
|
19
19
|
import { mapArchiverConfig } from './config.js';
|
|
20
20
|
import { ArchiverInstrumentation } from './modules/instrumentation.js';
|
|
21
21
|
import { ArchiverL1Synchronizer } from './modules/l1_synchronizer.js';
|
|
22
22
|
import { ARCHIVER_DB_VERSION, KVArchiverDataStore } from './store/kv_archiver_store.js';
|
|
23
|
+
import { L2TipsCache } from './store/l2_tips_cache.js';
|
|
23
24
|
export const ARCHIVER_STORE_NAME = 'archiver';
|
|
24
25
|
/** Creates an archiver store. */ export async function createArchiverStore(userConfig) {
|
|
25
26
|
const config = {
|
|
26
27
|
...userConfig,
|
|
27
28
|
dataStoreMapSizeKb: userConfig.archiverStoreMapSizeKb ?? userConfig.dataStoreMapSizeKb
|
|
28
29
|
};
|
|
29
|
-
const store = await createStore(ARCHIVER_STORE_NAME, ARCHIVER_DB_VERSION, config
|
|
30
|
+
const store = await createStore(ARCHIVER_STORE_NAME, ARCHIVER_DB_VERSION, config);
|
|
30
31
|
return new KVArchiverDataStore(store, config.maxLogs);
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
@@ -42,32 +43,35 @@ export const ARCHIVER_STORE_NAME = 'archiver';
|
|
|
42
43
|
await registerProtocolContracts(archiverStore);
|
|
43
44
|
// Create Ethereum clients
|
|
44
45
|
const chain = createEthereumChain(config.l1RpcUrls, config.l1ChainId);
|
|
46
|
+
const httpTimeout = config.l1HttpTimeoutMS;
|
|
45
47
|
const publicClient = createPublicClient({
|
|
46
48
|
chain: chain.chainInfo,
|
|
47
|
-
transport:
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
transport: makeL1HttpTransport(config.l1RpcUrls, {
|
|
50
|
+
timeout: httpTimeout
|
|
51
|
+
}),
|
|
50
52
|
pollingInterval: config.viemPollingIntervalMS
|
|
51
53
|
});
|
|
52
54
|
// Create debug client using debug RPC URLs if available, otherwise fall back to regular RPC URLs
|
|
53
55
|
const debugRpcUrls = config.l1DebugRpcUrls.length > 0 ? config.l1DebugRpcUrls : config.l1RpcUrls;
|
|
54
56
|
const debugClient = createPublicClient({
|
|
55
57
|
chain: chain.chainInfo,
|
|
56
|
-
transport:
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
transport: makeL1HttpTransport(debugRpcUrls, {
|
|
59
|
+
timeout: httpTimeout
|
|
60
|
+
}),
|
|
59
61
|
pollingInterval: config.viemPollingIntervalMS
|
|
60
62
|
});
|
|
61
63
|
// Create L1 contract instances
|
|
62
64
|
const rollup = new RollupContract(publicClient, config.l1Contracts.rollupAddress);
|
|
63
65
|
const inbox = new InboxContract(publicClient, config.l1Contracts.inboxAddress);
|
|
64
66
|
// Fetch L1 constants from rollup contract
|
|
65
|
-
const [l1StartBlock, l1GenesisTime, proofSubmissionEpochs, genesisArchiveRoot, slashingProposerAddress] = await Promise.all([
|
|
67
|
+
const [l1StartBlock, l1GenesisTime, proofSubmissionEpochs, genesisArchiveRoot, slashingProposerAddress, targetCommitteeSize, rollupManaLimit] = await Promise.all([
|
|
66
68
|
rollup.getL1StartBlock(),
|
|
67
69
|
rollup.getL1GenesisTime(),
|
|
68
70
|
rollup.getProofSubmissionEpochs(),
|
|
69
71
|
rollup.getGenesisArchiveTreeRoot(),
|
|
70
|
-
rollup.getSlashingProposerAddress()
|
|
72
|
+
rollup.getSlashingProposerAddress(),
|
|
73
|
+
rollup.getTargetCommitteeSize(),
|
|
74
|
+
rollup.getManaLimit()
|
|
71
75
|
]);
|
|
72
76
|
const l1StartBlockHash = await publicClient.getBlock({
|
|
73
77
|
blockNumber: l1StartBlock,
|
|
@@ -82,7 +86,9 @@ export const ARCHIVER_STORE_NAME = 'archiver';
|
|
|
82
86
|
slotDuration,
|
|
83
87
|
ethereumSlotDuration,
|
|
84
88
|
proofSubmissionEpochs: Number(proofSubmissionEpochs),
|
|
85
|
-
|
|
89
|
+
targetCommitteeSize,
|
|
90
|
+
genesisArchiveRoot: Fr.fromString(genesisArchiveRoot.toString()),
|
|
91
|
+
rollupManaLimit: Number(rollupManaLimit)
|
|
86
92
|
};
|
|
87
93
|
const archiverConfig = merge({
|
|
88
94
|
pollingIntervalMs: 10_000,
|
|
@@ -95,35 +101,35 @@ export const ARCHIVER_STORE_NAME = 'archiver';
|
|
|
95
101
|
const instrumentation = await ArchiverInstrumentation.new(telemetry, ()=>archiverStore.estimateSize());
|
|
96
102
|
// Create the event emitter that will be shared by archiver and synchronizer
|
|
97
103
|
const events = new EventEmitter();
|
|
104
|
+
// Create L2 tips cache shared by archiver and synchronizer
|
|
105
|
+
const l2TipsCache = new L2TipsCache(archiverStore.blockStore);
|
|
98
106
|
// Create the L1 synchronizer
|
|
99
|
-
const synchronizer = new ArchiverL1Synchronizer(publicClient, debugClient, rollup, inbox,
|
|
100
|
-
...config.l1Contracts,
|
|
101
|
-
slashingProposerAddress
|
|
102
|
-
}, archiverStore, archiverConfig, deps.blobClient, epochCache, deps.dateProvider ?? new DateProvider(), instrumentation, l1Constants, events, instrumentation.tracer);
|
|
107
|
+
const synchronizer = new ArchiverL1Synchronizer(publicClient, debugClient, rollup, inbox, archiverStore, archiverConfig, deps.blobClient, epochCache, deps.dateProvider ?? new DateProvider(), instrumentation, l1Constants, events, instrumentation.tracer, l2TipsCache, undefined);
|
|
103
108
|
const archiver = new Archiver(publicClient, debugClient, rollup, {
|
|
104
109
|
...config.l1Contracts,
|
|
105
110
|
slashingProposerAddress
|
|
106
|
-
}, archiverStore, archiverConfig, deps.blobClient, instrumentation, l1Constants, synchronizer, events);
|
|
111
|
+
}, archiverStore, archiverConfig, deps.blobClient, instrumentation, l1Constants, synchronizer, events, l2TipsCache);
|
|
107
112
|
await archiver.start(opts.blockUntilSync);
|
|
108
113
|
return archiver;
|
|
109
114
|
}
|
|
110
|
-
async function registerProtocolContracts(store) {
|
|
115
|
+
/** Registers protocol contracts in the archiver store. Idempotent — skips contracts that already exist (e.g. on node restart). */ export async function registerProtocolContracts(store) {
|
|
111
116
|
const blockNumber = 0;
|
|
112
117
|
for (const name of protocolContractNames){
|
|
113
118
|
const provider = new BundledProtocolContractsProvider();
|
|
114
119
|
const contract = await provider.getProtocolContractArtifact(name);
|
|
120
|
+
// Skip if already registered (happens on node restart with a persisted store).
|
|
121
|
+
if (await store.getContractClass(contract.contractClass.id)) {
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
const publicBytecodeCommitment = await computePublicBytecodeCommitment(contract.contractClass.packedBytecode);
|
|
115
125
|
const contractClassPublic = {
|
|
116
126
|
...contract.contractClass,
|
|
117
|
-
|
|
118
|
-
utilityFunctions: []
|
|
127
|
+
publicBytecodeCommitment
|
|
119
128
|
};
|
|
120
129
|
const publicFunctionSignatures = contract.artifact.functions.filter((fn)=>fn.functionType === FunctionType.PUBLIC).map((fn)=>decodeFunctionSignature(fn.name, fn.parameters));
|
|
121
130
|
await store.registerContractFunctionSignatures(publicFunctionSignatures);
|
|
122
|
-
const bytecodeCommitment = await computePublicBytecodeCommitment(contractClassPublic.packedBytecode);
|
|
123
131
|
await store.addContractClasses([
|
|
124
132
|
contractClassPublic
|
|
125
|
-
], [
|
|
126
|
-
bytecodeCommitment
|
|
127
133
|
], BlockNumber(blockNumber));
|
|
128
134
|
await store.addContractInstances([
|
|
129
135
|
contract.instance
|
package/dest/index.d.ts
CHANGED
|
@@ -7,5 +7,6 @@ export * from './config.js';
|
|
|
7
7
|
export { type L1PublishedData } from './structs/published.js';
|
|
8
8
|
export { KVArchiverDataStore, ARCHIVER_DB_VERSION } from './store/kv_archiver_store.js';
|
|
9
9
|
export { ContractInstanceStore } from './store/contract_instance_store.js';
|
|
10
|
+
export { L2TipsCache } from './store/l2_tips_cache.js';
|
|
10
11
|
export { retrieveCheckpointsFromRollup, retrieveL2ProofVerifiedEvents } from './l1/data_retrieval.js';
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYyxpQ0FBaUMsQ0FBQztBQUNoRCxjQUFjLGFBQWEsQ0FBQztBQUU1QixPQUFPLEVBQUUsS0FBSyxlQUFlLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUM5RCxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUN4RixPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSxvQ0FBb0MsQ0FBQztBQUMzRSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFFdkQsT0FBTyxFQUFFLDZCQUE2QixFQUFFLDZCQUE2QixFQUFFLE1BQU0sd0JBQXdCLENBQUMifQ==
|
package/dest/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,6BAA6B,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dest/index.js
CHANGED
|
@@ -6,4 +6,5 @@ export * from './modules/data_store_updater.js';
|
|
|
6
6
|
export * from './config.js';
|
|
7
7
|
export { KVArchiverDataStore, ARCHIVER_DB_VERSION } from './store/kv_archiver_store.js';
|
|
8
8
|
export { ContractInstanceStore } from './store/contract_instance_store.js';
|
|
9
|
+
export { L2TipsCache } from './store/l2_tips_cache.js';
|
|
9
10
|
export { retrieveCheckpointsFromRollup, retrieveL2ProofVerifiedEvents } from './l1/data_retrieval.js';
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
-
import {
|
|
5
|
+
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
6
|
+
import { createPublicClient, decodeEventLog, getAbiItem, http, toEventSelector } from 'viem';
|
|
6
7
|
import { mainnet } from 'viem/chains';
|
|
7
8
|
import { CalldataRetriever } from '../calldata_retriever.js';
|
|
8
9
|
const logger = createLogger('archiver:calldata-test');
|
|
@@ -73,49 +74,51 @@ async function main() {
|
|
|
73
74
|
throw new Error(`Transaction ${txHash} not found`);
|
|
74
75
|
}
|
|
75
76
|
logger.info(`Transaction found in block ${tx.blockNumber}`);
|
|
76
|
-
// For simplicity, use zero addresses for optional contract addresses
|
|
77
|
-
// In production, these would be fetched from the rollup contract or configuration
|
|
78
|
-
const slashingProposerAddress = EthAddress.ZERO;
|
|
79
|
-
const governanceProposerAddress = EthAddress.ZERO;
|
|
80
|
-
const slashFactoryAddress = undefined;
|
|
81
|
-
logger.info('Using zero addresses for governance/slashing (can be configured if needed)');
|
|
82
77
|
// Create CalldataRetriever
|
|
83
|
-
const retriever = new CalldataRetriever(publicClient, publicClient, targetCommitteeSize, undefined, logger,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
slashingProposerAddress,
|
|
87
|
-
slashFactoryAddress
|
|
88
|
-
});
|
|
89
|
-
// Extract L2 block number from transaction logs
|
|
90
|
-
logger.info('Decoding transaction to extract L2 block number...');
|
|
78
|
+
const retriever = new CalldataRetriever(publicClient, publicClient, targetCommitteeSize, undefined, logger, rollupAddress);
|
|
79
|
+
// Extract checkpoint number and hashes from transaction logs
|
|
80
|
+
logger.info('Decoding transaction to extract checkpoint number and hashes...');
|
|
91
81
|
const receipt = await publicClient.getTransactionReceipt({
|
|
92
82
|
hash: txHash
|
|
93
83
|
});
|
|
94
|
-
|
|
84
|
+
// Look for CheckpointProposed event
|
|
85
|
+
const checkpointProposedEventAbi = getAbiItem({
|
|
86
|
+
abi: RollupAbi,
|
|
87
|
+
name: 'CheckpointProposed'
|
|
88
|
+
});
|
|
89
|
+
const checkpointProposedLog = receipt.logs.find((log)=>{
|
|
95
90
|
try {
|
|
96
|
-
|
|
97
|
-
return log.address.toLowerCase() === rollupAddress.toString().toLowerCase() && log.topics[0] === '0x2f1d0e696fa5186494a2f2f89a0e0bcbb15d607f6c5eac4637e07e1e5e7d3c00' // L2BlockProposed event signature
|
|
98
|
-
;
|
|
91
|
+
return log.address.toLowerCase() === rollupAddress.toString().toLowerCase() && log.topics[0] === toEventSelector(checkpointProposedEventAbi);
|
|
99
92
|
} catch {
|
|
100
93
|
return false;
|
|
101
94
|
}
|
|
102
95
|
});
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
96
|
+
if (!checkpointProposedLog || checkpointProposedLog.topics[1] === undefined) {
|
|
97
|
+
throw new Error(`Checkpoint proposed event not found`);
|
|
98
|
+
}
|
|
99
|
+
const checkpointNumber = CheckpointNumber.fromBigInt(BigInt(checkpointProposedLog.topics[1]));
|
|
100
|
+
// Decode the full event to extract attestationsHash and payloadDigest
|
|
101
|
+
const decodedEvent = decodeEventLog({
|
|
102
|
+
abi: RollupAbi,
|
|
103
|
+
data: checkpointProposedLog.data,
|
|
104
|
+
topics: checkpointProposedLog.topics
|
|
105
|
+
});
|
|
106
|
+
const eventArgs = decodedEvent.args;
|
|
107
|
+
if (!eventArgs.attestationsHash || !eventArgs.payloadDigest) {
|
|
108
|
+
throw new Error(`CheckpointProposed event missing attestationsHash or payloadDigest`);
|
|
112
109
|
}
|
|
110
|
+
const expectedHashes = {
|
|
111
|
+
attestationsHash: eventArgs.attestationsHash,
|
|
112
|
+
payloadDigest: eventArgs.payloadDigest
|
|
113
|
+
};
|
|
114
|
+
logger.info(`Checkpoint Number: ${checkpointNumber}`);
|
|
115
|
+
logger.info(`Attestations Hash: ${expectedHashes.attestationsHash}`);
|
|
116
|
+
logger.info(`Payload Digest: ${expectedHashes.payloadDigest}`);
|
|
113
117
|
logger.info('');
|
|
114
|
-
logger.info('Retrieving
|
|
118
|
+
logger.info('Retrieving checkpoint from rollup transaction...');
|
|
115
119
|
logger.info('');
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
logger.info(' Successfully retrieved block header!');
|
|
120
|
+
const result = await retriever.getCheckpointFromRollupTx(txHash, [], checkpointNumber, expectedHashes);
|
|
121
|
+
logger.info(' Successfully retrieved block header!');
|
|
119
122
|
logger.info('');
|
|
120
123
|
logger.info('Block Header Details:');
|
|
121
124
|
logger.info('====================');
|
|
@@ -7,9 +7,19 @@ import { CommitteeAttestation } from '@aztec/stdlib/block';
|
|
|
7
7
|
import { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
8
8
|
import { type Hex, type Transaction } from 'viem';
|
|
9
9
|
import type { ArchiverInstrumentation } from '../modules/instrumentation.js';
|
|
10
|
+
/** Decoded checkpoint data from a propose calldata. */
|
|
11
|
+
type CheckpointData = {
|
|
12
|
+
checkpointNumber: CheckpointNumber;
|
|
13
|
+
archiveRoot: Fr;
|
|
14
|
+
header: CheckpointHeader;
|
|
15
|
+
attestations: CommitteeAttestation[];
|
|
16
|
+
blockHash: string;
|
|
17
|
+
feeAssetPriceModifier: bigint;
|
|
18
|
+
};
|
|
10
19
|
/**
|
|
11
20
|
* Extracts calldata to the `propose` method of the rollup contract from an L1 transaction
|
|
12
|
-
* in order to reconstruct an L2 block header.
|
|
21
|
+
* in order to reconstruct an L2 block header. Uses hash matching against expected hashes
|
|
22
|
+
* from the CheckpointProposed event to verify the correct propose calldata.
|
|
13
23
|
*/
|
|
14
24
|
export declare class CalldataRetriever {
|
|
15
25
|
private readonly publicClient;
|
|
@@ -17,65 +27,79 @@ export declare class CalldataRetriever {
|
|
|
17
27
|
private readonly targetCommitteeSize;
|
|
18
28
|
private readonly instrumentation;
|
|
19
29
|
private readonly logger;
|
|
20
|
-
/** Pre-computed valid contract calls for validation */
|
|
21
|
-
private readonly validContractCalls;
|
|
22
30
|
private readonly rollupAddress;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
31
|
+
/** Tx hashes we've already logged for trace+debug failure (log once per tx per process). */
|
|
32
|
+
private static readonly traceFailureWarnedTxHashes;
|
|
33
|
+
/** Clears the trace-failure warned set. For testing only. */
|
|
34
|
+
static resetTraceFailureWarnedForTesting(): void;
|
|
35
|
+
constructor(publicClient: ViemPublicClient, debugClient: ViemPublicDebugClient, targetCommitteeSize: number, instrumentation: ArchiverInstrumentation | undefined, logger: Logger, rollupAddress: EthAddress);
|
|
29
36
|
/**
|
|
30
37
|
* Gets checkpoint header and metadata from the calldata of an L1 transaction.
|
|
31
38
|
* Tries multicall3 decoding, falls back to trace-based extraction.
|
|
32
39
|
* @param txHash - Hash of the tx that published it.
|
|
33
40
|
* @param blobHashes - Blob hashes for the checkpoint.
|
|
34
41
|
* @param checkpointNumber - Checkpoint number.
|
|
35
|
-
* @param expectedHashes -
|
|
42
|
+
* @param expectedHashes - Expected hashes from the CheckpointProposed event for validation
|
|
36
43
|
* @returns Checkpoint header and metadata from the calldata, deserialized
|
|
37
44
|
*/
|
|
38
45
|
getCheckpointFromRollupTx(txHash: `0x${string}`, _blobHashes: Buffer[], checkpointNumber: CheckpointNumber, expectedHashes: {
|
|
39
|
-
attestationsHash
|
|
40
|
-
payloadDigest
|
|
41
|
-
}): Promise<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}>;
|
|
48
|
-
/** Gets rollup propose calldata from a transaction */
|
|
49
|
-
protected getProposeCallData(tx: Transaction, checkpointNumber: CheckpointNumber): Promise<Hex>;
|
|
46
|
+
attestationsHash: Hex;
|
|
47
|
+
payloadDigest: Hex;
|
|
48
|
+
}): Promise<CheckpointData>;
|
|
49
|
+
/** Gets checkpoint data from a transaction by trying decode strategies then falling back to trace. */
|
|
50
|
+
protected getCheckpointFromTx(tx: Transaction, checkpointNumber: CheckpointNumber, expectedHashes: {
|
|
51
|
+
attestationsHash: Hex;
|
|
52
|
+
payloadDigest: Hex;
|
|
53
|
+
}): Promise<CheckpointData>;
|
|
50
54
|
/**
|
|
51
55
|
* Attempts to decode a transaction as a Spire Proposer multicall wrapper.
|
|
52
|
-
* If successful,
|
|
56
|
+
* If successful, iterates all wrapped calls and validates each as either multicall3
|
|
57
|
+
* or direct propose, verifying against expected hashes.
|
|
53
58
|
* @param tx - The transaction to decode
|
|
54
|
-
* @
|
|
59
|
+
* @param expectedHashes - Expected hashes for hash-verified matching
|
|
60
|
+
* @param checkpointNumber - The checkpoint number
|
|
61
|
+
* @param blockHash - The L1 block hash
|
|
62
|
+
* @returns The checkpoint data if successfully decoded and validated, undefined otherwise
|
|
55
63
|
*/
|
|
56
|
-
protected tryDecodeSpireProposer(tx: Transaction
|
|
64
|
+
protected tryDecodeSpireProposer(tx: Transaction, expectedHashes: {
|
|
65
|
+
attestationsHash: Hex;
|
|
66
|
+
payloadDigest: Hex;
|
|
67
|
+
}, checkpointNumber: CheckpointNumber, blockHash: Hex): Promise<CheckpointData | undefined>;
|
|
57
68
|
/**
|
|
58
69
|
* Attempts to decode transaction input as multicall3 and extract propose calldata.
|
|
59
|
-
*
|
|
70
|
+
* Finds all calls matching the rollup address and propose selector, then decodes
|
|
71
|
+
* and verifies each candidate against expected hashes from the CheckpointProposed event.
|
|
60
72
|
* @param tx - The transaction-like object with to, input, and hash
|
|
61
|
-
* @
|
|
73
|
+
* @param expectedHashes - Expected hashes from CheckpointProposed event
|
|
74
|
+
* @param checkpointNumber - The checkpoint number
|
|
75
|
+
* @param blockHash - The L1 block hash
|
|
76
|
+
* @returns The checkpoint data if successfully validated, undefined otherwise
|
|
62
77
|
*/
|
|
63
78
|
protected tryDecodeMulticall3(tx: {
|
|
64
79
|
to: Hex | null | undefined;
|
|
65
80
|
input: Hex;
|
|
66
81
|
hash: Hex;
|
|
67
|
-
}
|
|
82
|
+
}, expectedHashes: {
|
|
83
|
+
attestationsHash: Hex;
|
|
84
|
+
payloadDigest: Hex;
|
|
85
|
+
}, checkpointNumber: CheckpointNumber, blockHash: Hex): CheckpointData | undefined;
|
|
68
86
|
/**
|
|
69
87
|
* Attempts to decode transaction as a direct propose call to the rollup contract.
|
|
70
|
-
*
|
|
88
|
+
* Decodes, verifies hashes, and builds checkpoint data in a single pass.
|
|
71
89
|
* @param tx - The transaction-like object with to, input, and hash
|
|
72
|
-
* @
|
|
90
|
+
* @param expectedHashes - Expected hashes from CheckpointProposed event
|
|
91
|
+
* @param checkpointNumber - The checkpoint number
|
|
92
|
+
* @param blockHash - The L1 block hash
|
|
93
|
+
* @returns The checkpoint data if successfully validated, undefined otherwise
|
|
73
94
|
*/
|
|
74
95
|
protected tryDecodeDirectPropose(tx: {
|
|
75
96
|
to: Hex | null | undefined;
|
|
76
97
|
input: Hex;
|
|
77
98
|
hash: Hex;
|
|
78
|
-
}
|
|
99
|
+
}, expectedHashes: {
|
|
100
|
+
attestationsHash: Hex;
|
|
101
|
+
payloadDigest: Hex;
|
|
102
|
+
}, checkpointNumber: CheckpointNumber, blockHash: Hex): CheckpointData | undefined;
|
|
79
103
|
/**
|
|
80
104
|
* Uses debug/trace RPC to extract the actual calldata from the successful propose call.
|
|
81
105
|
* This is the definitive fallback that works for any transaction pattern.
|
|
@@ -84,29 +108,28 @@ export declare class CalldataRetriever {
|
|
|
84
108
|
* @returns The propose calldata from the successful call
|
|
85
109
|
*/
|
|
86
110
|
protected extractCalldataViaTrace(txHash: Hex): Promise<Hex>;
|
|
111
|
+
/**
|
|
112
|
+
* Decodes propose calldata, verifies against expected hashes, and builds checkpoint data.
|
|
113
|
+
* Returns undefined on decode errors or hash mismatches (soft failure for try-based callers).
|
|
114
|
+
* @param proposeCalldata - The propose function calldata
|
|
115
|
+
* @param expectedHashes - Expected hashes from the CheckpointProposed event
|
|
116
|
+
* @param checkpointNumber - The checkpoint number
|
|
117
|
+
* @param blockHash - The L1 block hash
|
|
118
|
+
* @returns The decoded checkpoint data, or undefined on failure
|
|
119
|
+
*/
|
|
120
|
+
protected tryDecodeAndVerifyPropose(proposeCalldata: Hex, expectedHashes: {
|
|
121
|
+
attestationsHash: Hex;
|
|
122
|
+
payloadDigest: Hex;
|
|
123
|
+
}, checkpointNumber: CheckpointNumber, blockHash: Hex): CheckpointData | undefined;
|
|
124
|
+
/** Computes the keccak256 hash of ABI-encoded CommitteeAttestations. */
|
|
125
|
+
private computeAttestationsHash;
|
|
126
|
+
/** Computes the keccak256 payload digest from the checkpoint header, archive root, and fee asset price modifier. */
|
|
127
|
+
private computePayloadDigest;
|
|
87
128
|
/**
|
|
88
129
|
* Extracts the CommitteeAttestations struct definition from RollupAbi.
|
|
89
130
|
* Finds the _attestations parameter by name in the propose function.
|
|
90
|
-
* Lazy-loaded to avoid issues during module initialization.
|
|
91
131
|
*/
|
|
92
132
|
private getCommitteeAttestationsStructDef;
|
|
93
|
-
/**
|
|
94
|
-
* Decodes propose calldata and builds the checkpoint header structure.
|
|
95
|
-
* @param proposeCalldata - The propose function calldata
|
|
96
|
-
* @param blockHash - The L1 block hash containing this transaction
|
|
97
|
-
* @param checkpointNumber - The checkpoint number
|
|
98
|
-
* @param expectedHashes - Optional expected hashes from the CheckpointProposed event for validation
|
|
99
|
-
* @returns The decoded checkpoint header and metadata
|
|
100
|
-
*/
|
|
101
|
-
protected decodeAndBuildCheckpoint(proposeCalldata: Hex, blockHash: Hex, checkpointNumber: CheckpointNumber, expectedHashes: {
|
|
102
|
-
attestationsHash?: Hex;
|
|
103
|
-
payloadDigest?: Hex;
|
|
104
|
-
}): {
|
|
105
|
-
checkpointNumber: CheckpointNumber;
|
|
106
|
-
archiveRoot: Fr;
|
|
107
|
-
header: CheckpointHeader;
|
|
108
|
-
attestations: CommitteeAttestation[];
|
|
109
|
-
blockHash: string;
|
|
110
|
-
};
|
|
111
133
|
}
|
|
112
|
-
|
|
134
|
+
export {};
|
|
135
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsbGRhdGFfcmV0cmlldmVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbDEvY2FsbGRhdGFfcmV0cmlldmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLHFCQUFxQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDckYsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDbkUsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUMzRCxPQUFPLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUVwRCxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUUzRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUV4RCxPQUFPLEVBRUwsS0FBSyxHQUFHLEVBQ1IsS0FBSyxXQUFXLEVBT2pCLE1BQU0sTUFBTSxDQUFDO0FBRWQsT0FBTyxLQUFLLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQU03RSx1REFBdUQ7QUFDdkQsS0FBSyxjQUFjLEdBQUc7SUFDcEIsZ0JBQWdCLEVBQUUsZ0JBQWdCLENBQUM7S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"","sources":["../../src/l1/calldata_retriever.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"calldata_retriever.d.ts","sourceRoot":"","sources":["../../src/l1/calldata_retriever.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAEL,KAAK,GAAG,EACR,KAAK,WAAW,EAOjB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAM7E,uDAAuD;AACvD,KAAK,cAAc,GAAG;IACpB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,WAAW,EAAE,EAAE,CAAC;IAChB,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF;;;;GAIG;AACH,qBAAa,iBAAiB;IAU1B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,Q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