@aztec/archiver 0.0.1-commit.c7c42ec → 0.0.1-commit.f295ac2
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 +147 -22
- package/dest/archiver.d.ts +135 -0
- package/dest/archiver.d.ts.map +1 -0
- package/dest/archiver.js +769 -0
- package/dest/{archiver/config.d.ts → config.d.ts} +9 -1
- package/dest/config.d.ts.map +1 -0
- package/dest/{archiver/config.js → config.js} +11 -2
- package/dest/{archiver/errors.d.ts → errors.d.ts} +1 -1
- package/dest/errors.d.ts.map +1 -0
- package/dest/factory.d.ts +5 -6
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +82 -5
- package/dest/index.d.ts +10 -4
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +8 -3
- package/dest/interfaces.d.ts +9 -0
- package/dest/interfaces.d.ts.map +1 -0
- package/dest/interfaces.js +3 -0
- package/dest/{archiver/l1 → l1}/bin/retrieve-calldata.d.ts +1 -1
- package/dest/l1/bin/retrieve-calldata.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/calldata_retriever.d.ts +3 -3
- package/dest/l1/calldata_retriever.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/calldata_retriever.js +2 -2
- package/dest/l1/data_retrieval.d.ts +88 -0
- package/dest/l1/data_retrieval.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/data_retrieval.js +34 -53
- package/dest/{archiver/l1 → l1}/debug_tx.d.ts +1 -1
- package/dest/l1/debug_tx.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/spire_proposer.d.ts +1 -1
- package/dest/l1/spire_proposer.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/trace_tx.d.ts +1 -1
- package/dest/l1/trace_tx.d.ts.map +1 -0
- package/dest/l1/types.d.ts +12 -0
- package/dest/l1/types.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/validate_trace.d.ts +1 -1
- package/dest/l1/validate_trace.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/validate_trace.js +1 -1
- package/dest/modules/data_source_base.d.ts +85 -0
- package/dest/modules/data_source_base.d.ts.map +1 -0
- package/dest/modules/data_source_base.js +291 -0
- package/dest/modules/data_store_updater.d.ts +69 -0
- package/dest/modules/data_store_updater.d.ts.map +1 -0
- package/dest/modules/data_store_updater.js +304 -0
- package/dest/modules/instrumentation.d.ts +37 -0
- package/dest/modules/instrumentation.d.ts.map +1 -0
- package/dest/{archiver → modules}/instrumentation.js +15 -63
- package/dest/modules/l1_synchronizer.d.ts +75 -0
- package/dest/modules/l1_synchronizer.d.ts.map +1 -0
- package/dest/modules/l1_synchronizer.js +1113 -0
- package/dest/modules/validation.d.ts +17 -0
- package/dest/modules/validation.d.ts.map +1 -0
- package/dest/{archiver → modules}/validation.js +7 -1
- package/dest/{archiver/kv_archiver_store → store}/block_store.d.ts +27 -6
- package/dest/store/block_store.d.ts.map +1 -0
- package/dest/{archiver/kv_archiver_store → store}/block_store.js +87 -14
- package/dest/store/contract_class_store.d.ts +18 -0
- package/dest/store/contract_class_store.d.ts.map +1 -0
- package/dest/{archiver/kv_archiver_store → store}/contract_class_store.js +1 -1
- package/dest/store/contract_instance_store.d.ts +24 -0
- package/dest/store/contract_instance_store.d.ts.map +1 -0
- package/dest/{archiver/kv_archiver_store → store}/contract_instance_store.js +1 -1
- package/dest/{archiver/archiver_store.d.ts → store/kv_archiver_store.d.ts} +155 -132
- package/dest/store/kv_archiver_store.d.ts.map +1 -0
- package/dest/{archiver/kv_archiver_store → store}/kv_archiver_store.js +173 -48
- package/dest/{archiver/kv_archiver_store → store}/log_store.d.ts +1 -1
- package/dest/store/log_store.d.ts.map +1 -0
- package/dest/{archiver/kv_archiver_store → store}/log_store.js +69 -48
- package/dest/{archiver/kv_archiver_store → store}/message_store.d.ts +1 -1
- package/dest/store/message_store.d.ts.map +1 -0
- package/dest/{archiver/structs → structs}/data_retrieval.d.ts +1 -1
- package/dest/structs/data_retrieval.d.ts.map +1 -0
- package/dest/structs/inbox_message.d.ts +15 -0
- package/dest/structs/inbox_message.d.ts.map +1 -0
- package/dest/{archiver/structs → structs}/published.d.ts +1 -1
- package/dest/structs/published.d.ts.map +1 -0
- package/dest/test/fake_l1_state.d.ts +190 -0
- package/dest/test/fake_l1_state.d.ts.map +1 -0
- package/dest/test/fake_l1_state.js +383 -0
- package/dest/test/index.d.ts +2 -1
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +1 -0
- package/dest/test/mock_archiver.d.ts +2 -2
- package/dest/test/mock_archiver.d.ts.map +1 -1
- package/dest/test/mock_archiver.js +1 -2
- package/dest/test/mock_l1_to_l2_message_source.d.ts +2 -2
- package/dest/test/mock_l1_to_l2_message_source.d.ts.map +1 -1
- package/dest/test/mock_l1_to_l2_message_source.js +12 -3
- package/dest/test/mock_l2_block_source.d.ts +21 -14
- package/dest/test/mock_l2_block_source.d.ts.map +1 -1
- package/dest/test/mock_l2_block_source.js +147 -40
- package/dest/test/mock_structs.d.ts +76 -2
- package/dest/test/mock_structs.d.ts.map +1 -1
- package/dest/test/mock_structs.js +133 -2
- package/package.json +15 -17
- package/src/archiver.ts +525 -0
- package/src/{archiver/config.ts → config.ts} +13 -2
- package/src/factory.ts +118 -6
- package/src/index.ts +10 -3
- package/src/interfaces.ts +9 -0
- package/src/{archiver/l1 → l1}/calldata_retriever.ts +3 -3
- package/src/{archiver/l1 → l1}/data_retrieval.ts +54 -71
- package/src/{archiver/l1 → l1}/validate_trace.ts +1 -1
- package/src/modules/data_source_base.ts +414 -0
- package/src/modules/data_store_updater.ts +419 -0
- package/src/{archiver → modules}/instrumentation.ts +14 -63
- package/src/modules/l1_synchronizer.ts +931 -0
- package/src/{archiver → modules}/validation.ts +11 -6
- package/src/{archiver/kv_archiver_store → store}/block_store.ts +116 -19
- package/src/{archiver/kv_archiver_store → store}/contract_class_store.ts +1 -1
- package/src/{archiver/kv_archiver_store → store}/contract_instance_store.ts +1 -1
- package/src/{archiver/kv_archiver_store → store}/kv_archiver_store.ts +196 -12
- package/src/{archiver/kv_archiver_store → store}/log_store.ts +112 -76
- package/src/test/fake_l1_state.ts +599 -0
- package/src/test/index.ts +1 -0
- package/src/test/mock_archiver.ts +2 -2
- package/src/test/mock_l1_to_l2_message_source.ts +10 -4
- package/src/test/mock_l2_block_source.ts +168 -52
- package/src/test/mock_structs.ts +247 -2
- package/dest/archiver/archiver.d.ts +0 -304
- package/dest/archiver/archiver.d.ts.map +0 -1
- package/dest/archiver/archiver.js +0 -1645
- package/dest/archiver/archiver_store.d.ts.map +0 -1
- package/dest/archiver/archiver_store.js +0 -4
- package/dest/archiver/archiver_store_test_suite.d.ts +0 -8
- package/dest/archiver/archiver_store_test_suite.d.ts.map +0 -1
- package/dest/archiver/archiver_store_test_suite.js +0 -2770
- package/dest/archiver/config.d.ts.map +0 -1
- package/dest/archiver/errors.d.ts.map +0 -1
- package/dest/archiver/index.d.ts +0 -7
- package/dest/archiver/index.d.ts.map +0 -1
- package/dest/archiver/index.js +0 -4
- package/dest/archiver/instrumentation.d.ts +0 -37
- package/dest/archiver/instrumentation.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/block_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts +0 -18
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts +0 -24
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +0 -158
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/log_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/message_store.d.ts.map +0 -1
- package/dest/archiver/l1/bin/retrieve-calldata.d.ts.map +0 -1
- package/dest/archiver/l1/calldata_retriever.d.ts.map +0 -1
- package/dest/archiver/l1/data_retrieval.d.ts +0 -90
- package/dest/archiver/l1/data_retrieval.d.ts.map +0 -1
- package/dest/archiver/l1/debug_tx.d.ts.map +0 -1
- package/dest/archiver/l1/spire_proposer.d.ts.map +0 -1
- package/dest/archiver/l1/trace_tx.d.ts.map +0 -1
- package/dest/archiver/l1/types.d.ts +0 -12
- package/dest/archiver/l1/types.d.ts.map +0 -1
- package/dest/archiver/l1/validate_trace.d.ts.map +0 -1
- package/dest/archiver/structs/data_retrieval.d.ts.map +0 -1
- package/dest/archiver/structs/inbox_message.d.ts +0 -15
- package/dest/archiver/structs/inbox_message.d.ts.map +0 -1
- package/dest/archiver/structs/published.d.ts.map +0 -1
- package/dest/archiver/validation.d.ts +0 -17
- package/dest/archiver/validation.d.ts.map +0 -1
- package/dest/rpc/index.d.ts +0 -9
- package/dest/rpc/index.d.ts.map +0 -1
- package/dest/rpc/index.js +0 -15
- package/src/archiver/archiver.ts +0 -2157
- package/src/archiver/archiver_store.ts +0 -372
- package/src/archiver/archiver_store_test_suite.ts +0 -2843
- package/src/archiver/index.ts +0 -6
- package/src/rpc/index.ts +0 -16
- /package/dest/{archiver/errors.js → errors.js} +0 -0
- /package/dest/{archiver/l1 → l1}/bin/retrieve-calldata.js +0 -0
- /package/dest/{archiver/l1 → l1}/debug_tx.js +0 -0
- /package/dest/{archiver/l1 → l1}/spire_proposer.js +0 -0
- /package/dest/{archiver/l1 → l1}/trace_tx.js +0 -0
- /package/dest/{archiver/l1 → l1}/types.js +0 -0
- /package/dest/{archiver/kv_archiver_store → store}/message_store.js +0 -0
- /package/dest/{archiver/structs → structs}/data_retrieval.js +0 -0
- /package/dest/{archiver/structs → structs}/inbox_message.js +0 -0
- /package/dest/{archiver/structs → structs}/published.js +0 -0
- /package/src/{archiver/errors.ts → errors.ts} +0 -0
- /package/src/{archiver/l1 → l1}/README.md +0 -0
- /package/src/{archiver/l1 → l1}/bin/retrieve-calldata.ts +0 -0
- /package/src/{archiver/l1 → l1}/debug_tx.ts +0 -0
- /package/src/{archiver/l1 → l1}/spire_proposer.ts +0 -0
- /package/src/{archiver/l1 → l1}/trace_tx.ts +0 -0
- /package/src/{archiver/l1 → l1}/types.ts +0 -0
- /package/src/{archiver/kv_archiver_store → store}/message_store.ts +0 -0
- /package/src/{archiver/structs → structs}/data_retrieval.ts +0 -0
- /package/src/{archiver/structs → structs}/inbox_message.ts +0 -0
- /package/src/{archiver/structs → structs}/published.ts +0 -0
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MAX_NOTE_HASHES_PER_TX, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, PRIVATE_LOG_SIZE_IN_FIELDS } from '@aztec/constants';
|
|
2
|
+
import { makeTuple } from '@aztec/foundation/array';
|
|
3
|
+
import { BlockNumber, CheckpointNumber, IndexWithinCheckpoint } from '@aztec/foundation/branded-types';
|
|
2
4
|
import { Buffer16, Buffer32 } from '@aztec/foundation/buffer';
|
|
5
|
+
import { times, timesParallel } from '@aztec/foundation/collection';
|
|
3
6
|
import { randomBigInt, randomInt } from '@aztec/foundation/crypto/random';
|
|
4
7
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
8
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
9
|
+
import { CommitteeAttestation, L2BlockNew } from '@aztec/stdlib/block';
|
|
10
|
+
import { Checkpoint, L1PublishedData, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
11
|
+
import { PrivateLog, PublicLog, SiloedTag, Tag } from '@aztec/stdlib/logs';
|
|
5
12
|
import { InboxLeaf } from '@aztec/stdlib/messaging';
|
|
6
|
-
import {
|
|
13
|
+
import { orderAttestations } from '@aztec/stdlib/p2p';
|
|
14
|
+
import { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
15
|
+
import { makeCheckpointAttestationFromCheckpoint } from '@aztec/stdlib/testing';
|
|
16
|
+
import { AppendOnlyTreeSnapshot } from '@aztec/stdlib/trees';
|
|
17
|
+
import { PartialStateReference, StateReference, TxEffect } from '@aztec/stdlib/tx';
|
|
18
|
+
import { updateRollingHash } from '../structs/inbox_message.js';
|
|
7
19
|
export function makeInboxMessage(previousRollingHash = Buffer16.ZERO, overrides = {}) {
|
|
8
20
|
const { checkpointNumber = CheckpointNumber(randomInt(100) + 1) } = overrides;
|
|
9
21
|
const { l1BlockNumber = randomBigInt(100n) + 1n } = overrides;
|
|
@@ -36,3 +48,122 @@ export function makeInboxMessages(count, opts = {}) {
|
|
|
36
48
|
}
|
|
37
49
|
return messages;
|
|
38
50
|
}
|
|
51
|
+
/** Creates inbox messages distributed across multiple blocks with proper checkpoint numbering. */ export function makeInboxMessagesWithFullBlocks(blockCount, opts = {}) {
|
|
52
|
+
const { initialCheckpointNumber = CheckpointNumber(13) } = opts;
|
|
53
|
+
return makeInboxMessages(NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP * blockCount, {
|
|
54
|
+
overrideFn: (msg, i)=>{
|
|
55
|
+
const checkpointNumber = CheckpointNumber(initialCheckpointNumber + Math.floor(i / NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP));
|
|
56
|
+
const index = InboxLeaf.smallestIndexForCheckpoint(checkpointNumber) + BigInt(i % NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP);
|
|
57
|
+
return {
|
|
58
|
+
...msg,
|
|
59
|
+
checkpointNumber,
|
|
60
|
+
index
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/** Creates a deterministic block hash from a block number. */ export function makeBlockHash(blockNumber) {
|
|
66
|
+
return `0x${blockNumber.toString(16).padStart(64, '0')}`;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Creates a StateReference with properly calculated noteHashTree.nextAvailableLeafIndex.
|
|
70
|
+
* This ensures LogStore's dataStartIndexForBlock calculation doesn't produce negative values.
|
|
71
|
+
*/ export function makeStateForBlock(blockNumber, txsPerBlock) {
|
|
72
|
+
const noteHashIndex = blockNumber * txsPerBlock * MAX_NOTE_HASHES_PER_TX;
|
|
73
|
+
return new StateReference(AppendOnlyTreeSnapshot.random(), new PartialStateReference(new AppendOnlyTreeSnapshot(Fr.random(), noteHashIndex), AppendOnlyTreeSnapshot.random(), AppendOnlyTreeSnapshot.random()));
|
|
74
|
+
}
|
|
75
|
+
/** Creates L1PublishedData with deterministic values based on l1BlockNumber. */ export function makeL1PublishedData(l1BlockNumber) {
|
|
76
|
+
return new L1PublishedData(BigInt(l1BlockNumber), BigInt(l1BlockNumber * 1000), makeBlockHash(l1BlockNumber));
|
|
77
|
+
}
|
|
78
|
+
/** Wraps a Checkpoint with L1 published data and random attestations. */ export function makePublishedCheckpoint(checkpoint, l1BlockNumber, attestationCount = 3) {
|
|
79
|
+
return new PublishedCheckpoint(checkpoint, makeL1PublishedData(l1BlockNumber), times(attestationCount, CommitteeAttestation.random));
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Creates multiple checkpoints with properly chained archives.
|
|
83
|
+
* Each checkpoint's blocks have their lastArchive set to the previous block's archive,
|
|
84
|
+
* ensuring archive chain continuity for testing.
|
|
85
|
+
*/ export async function makeChainedCheckpoints(count, options = {}) {
|
|
86
|
+
const { blocksPerCheckpoint = 1, txsPerBlock = 4, startCheckpointNumber = CheckpointNumber(1), startBlockNumber = 1, startL1BlockNumber = 10, makeCheckpointOptions } = options;
|
|
87
|
+
let previousArchive = options.previousArchive;
|
|
88
|
+
const checkpoints = [];
|
|
89
|
+
for(let i = 0; i < count; i++){
|
|
90
|
+
const cpNumber = CheckpointNumber(startCheckpointNumber + i);
|
|
91
|
+
const blockStart = startBlockNumber + i * blocksPerCheckpoint;
|
|
92
|
+
const customOptions = makeCheckpointOptions?.(cpNumber) ?? {};
|
|
93
|
+
const checkpoint = await Checkpoint.random(cpNumber, {
|
|
94
|
+
numBlocks: blocksPerCheckpoint,
|
|
95
|
+
startBlockNumber: blockStart,
|
|
96
|
+
previousArchive,
|
|
97
|
+
txsPerBlock,
|
|
98
|
+
state: makeStateForBlock(blockStart, txsPerBlock),
|
|
99
|
+
txOptions: {
|
|
100
|
+
numPublicCallsPerTx: 2,
|
|
101
|
+
numPublicLogsPerCall: 2
|
|
102
|
+
},
|
|
103
|
+
...customOptions
|
|
104
|
+
});
|
|
105
|
+
previousArchive = checkpoint.blocks.at(-1).archive;
|
|
106
|
+
checkpoints.push(makePublishedCheckpoint(checkpoint, startL1BlockNumber + i * 10));
|
|
107
|
+
}
|
|
108
|
+
return checkpoints;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Creates a PublishedCheckpoint with attestations signed by the provided signers.
|
|
112
|
+
* Useful for testing attestation validation.
|
|
113
|
+
*/ export function makeSignedPublishedCheckpoint(checkpoint, signers, committee, l1BlockNumber = 1) {
|
|
114
|
+
const attestations = signers.map((signer)=>makeCheckpointAttestationFromCheckpoint(checkpoint, signer));
|
|
115
|
+
const committeeAttestations = orderAttestations(attestations, committee);
|
|
116
|
+
return new PublishedCheckpoint(checkpoint, makeL1PublishedData(l1BlockNumber), committeeAttestations);
|
|
117
|
+
}
|
|
118
|
+
/** Creates a deterministic SiloedTag for private log testing. */ export function makePrivateLogTag(blockNumber, txIndex, logIndex) {
|
|
119
|
+
return new SiloedTag(blockNumber === 1 && txIndex === 0 && logIndex === 0 ? Fr.ZERO : new Fr(blockNumber * 100 + txIndex * 10 + logIndex));
|
|
120
|
+
}
|
|
121
|
+
/** Creates a PrivateLog with fields derived from the tag. */ export function makePrivateLog(tag) {
|
|
122
|
+
return PrivateLog.from({
|
|
123
|
+
fields: makeTuple(PRIVATE_LOG_SIZE_IN_FIELDS, (i)=>!i ? tag.value : new Fr(tag.value.toBigInt() + BigInt(i))),
|
|
124
|
+
emittedLength: PRIVATE_LOG_SIZE_IN_FIELDS
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
/** Creates multiple private logs for a transaction. */ export function mockPrivateLogs(blockNumber, txIndex, numLogsPerTx) {
|
|
128
|
+
return times(numLogsPerTx, (logIndex)=>{
|
|
129
|
+
const tag = makePrivateLogTag(blockNumber, txIndex, logIndex);
|
|
130
|
+
return makePrivateLog(tag);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
/** Creates a deterministic Tag for public log testing. */ export function makePublicLogTag(blockNumber, txIndex, logIndex) {
|
|
134
|
+
return new Tag(blockNumber === 1 && txIndex === 0 && logIndex === 0 ? Fr.ZERO : new Fr((blockNumber * 100 + txIndex * 10 + logIndex) * 123));
|
|
135
|
+
}
|
|
136
|
+
/** Creates a PublicLog with fields derived from the tag. */ export function makePublicLog(tag, contractAddress = AztecAddress.fromNumber(543254)) {
|
|
137
|
+
return PublicLog.from({
|
|
138
|
+
contractAddress,
|
|
139
|
+
fields: new Array(10).fill(null).map((_, i)=>!i ? tag.value : new Fr(tag.value.toBigInt() + BigInt(i)))
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/** Creates multiple public logs for a transaction. */ export function makePublicLogs(blockNumber, txIndex, numLogsPerTx, contractAddress = AztecAddress.fromNumber(543254)) {
|
|
143
|
+
return times(numLogsPerTx, (logIndex)=>{
|
|
144
|
+
const tag = makePublicLogTag(blockNumber, txIndex, logIndex);
|
|
145
|
+
return makePublicLog(tag, contractAddress);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/** Creates a checkpoint with specified logs on each tx effect. */ export async function makeCheckpointWithLogs(blockNumber, options = {}) {
|
|
149
|
+
const { previousArchive, numTxsPerBlock = 4, privateLogs, publicLogs } = options;
|
|
150
|
+
const block = await L2BlockNew.random(BlockNumber(blockNumber), {
|
|
151
|
+
checkpointNumber: CheckpointNumber(blockNumber),
|
|
152
|
+
indexWithinCheckpoint: IndexWithinCheckpoint(0),
|
|
153
|
+
state: makeStateForBlock(blockNumber, numTxsPerBlock),
|
|
154
|
+
...previousArchive ? {
|
|
155
|
+
lastArchive: previousArchive
|
|
156
|
+
} : {}
|
|
157
|
+
});
|
|
158
|
+
block.header.globalVariables.blockNumber = BlockNumber(blockNumber);
|
|
159
|
+
block.body.txEffects = await timesParallel(numTxsPerBlock, async (txIndex)=>{
|
|
160
|
+
const txEffect = await TxEffect.random();
|
|
161
|
+
txEffect.privateLogs = privateLogs ? mockPrivateLogs(blockNumber, txIndex, privateLogs.numLogsPerTx) : [];
|
|
162
|
+
txEffect.publicLogs = publicLogs ? makePublicLogs(blockNumber, txIndex, publicLogs.numLogsPerTx, publicLogs.contractAddress) : [];
|
|
163
|
+
return txEffect;
|
|
164
|
+
});
|
|
165
|
+
const checkpoint = new Checkpoint(AppendOnlyTreeSnapshot.random(), CheckpointHeader.random(), [
|
|
166
|
+
block
|
|
167
|
+
], CheckpointNumber(blockNumber));
|
|
168
|
+
return makePublishedCheckpoint(checkpoint, blockNumber);
|
|
169
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/archiver",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.f295ac2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
7
|
-
"./data-retrieval": "./dest/archiver/data_retrieval.js",
|
|
8
|
-
"./epoch": "./dest/archiver/epoch_helpers.js",
|
|
9
7
|
"./test": "./dest/test/index.js",
|
|
10
|
-
"./config": "./dest/
|
|
8
|
+
"./config": "./dest/config.js"
|
|
11
9
|
},
|
|
12
10
|
"typedocOptions": {
|
|
13
11
|
"entryPoints": [
|
|
@@ -66,18 +64,18 @@
|
|
|
66
64
|
]
|
|
67
65
|
},
|
|
68
66
|
"dependencies": {
|
|
69
|
-
"@aztec/blob-client": "0.0.1-commit.
|
|
70
|
-
"@aztec/blob-lib": "0.0.1-commit.
|
|
71
|
-
"@aztec/constants": "0.0.1-commit.
|
|
72
|
-
"@aztec/epoch-cache": "0.0.1-commit.
|
|
73
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
74
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
75
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
76
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
77
|
-
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.
|
|
78
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
79
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
80
|
-
"@aztec/telemetry-client": "0.0.1-commit.
|
|
67
|
+
"@aztec/blob-client": "0.0.1-commit.f295ac2",
|
|
68
|
+
"@aztec/blob-lib": "0.0.1-commit.f295ac2",
|
|
69
|
+
"@aztec/constants": "0.0.1-commit.f295ac2",
|
|
70
|
+
"@aztec/epoch-cache": "0.0.1-commit.f295ac2",
|
|
71
|
+
"@aztec/ethereum": "0.0.1-commit.f295ac2",
|
|
72
|
+
"@aztec/foundation": "0.0.1-commit.f295ac2",
|
|
73
|
+
"@aztec/kv-store": "0.0.1-commit.f295ac2",
|
|
74
|
+
"@aztec/l1-artifacts": "0.0.1-commit.f295ac2",
|
|
75
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.f295ac2",
|
|
76
|
+
"@aztec/protocol-contracts": "0.0.1-commit.f295ac2",
|
|
77
|
+
"@aztec/stdlib": "0.0.1-commit.f295ac2",
|
|
78
|
+
"@aztec/telemetry-client": "0.0.1-commit.f295ac2",
|
|
81
79
|
"lodash.groupby": "^4.6.0",
|
|
82
80
|
"lodash.omit": "^4.5.0",
|
|
83
81
|
"tslib": "^2.5.0",
|
|
@@ -90,7 +88,7 @@
|
|
|
90
88
|
"@types/lodash.groupby": "^4.6.9",
|
|
91
89
|
"@types/lodash.omit": "^4.5.7",
|
|
92
90
|
"@types/node": "^22.15.17",
|
|
93
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
91
|
+
"@typescript/native-preview": "7.0.0-dev.20260113.1",
|
|
94
92
|
"concurrently": "^8.0.1",
|
|
95
93
|
"jest": "^30.0.0",
|
|
96
94
|
"jest-mock-extended": "^4.0.0",
|