@aztec/archiver 0.0.0-test.1 → 0.0.1-commit.1142ef1
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 +27 -6
- package/dest/archiver/archiver.d.ts +204 -94
- package/dest/archiver/archiver.d.ts.map +1 -1
- package/dest/archiver/archiver.js +1616 -414
- package/dest/archiver/archiver_store.d.ts +178 -83
- package/dest/archiver/archiver_store.d.ts.map +1 -1
- package/dest/archiver/archiver_store_test_suite.d.ts +1 -1
- package/dest/archiver/archiver_store_test_suite.d.ts.map +1 -1
- package/dest/archiver/archiver_store_test_suite.js +2373 -397
- package/dest/archiver/config.d.ts +7 -22
- package/dest/archiver/config.d.ts.map +1 -1
- package/dest/archiver/config.js +30 -14
- package/dest/archiver/errors.d.ts +33 -1
- package/dest/archiver/errors.d.ts.map +1 -1
- package/dest/archiver/errors.js +49 -0
- package/dest/archiver/index.d.ts +3 -4
- package/dest/archiver/index.d.ts.map +1 -1
- package/dest/archiver/index.js +1 -2
- package/dest/archiver/instrumentation.d.ts +14 -6
- package/dest/archiver/instrumentation.d.ts.map +1 -1
- package/dest/archiver/instrumentation.js +45 -41
- package/dest/archiver/kv_archiver_store/block_store.d.ts +98 -21
- package/dest/archiver/kv_archiver_store/block_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/block_store.js +495 -86
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts +4 -4
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/contract_class_store.js +13 -19
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts +12 -9
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/contract_instance_store.js +30 -16
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +81 -75
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.js +145 -83
- package/dest/archiver/kv_archiver_store/log_store.d.ts +12 -16
- package/dest/archiver/kv_archiver_store/log_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/log_store.js +151 -114
- package/dest/archiver/kv_archiver_store/message_store.d.ts +25 -18
- package/dest/archiver/kv_archiver_store/message_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/message_store.js +152 -49
- package/dest/archiver/l1/bin/retrieve-calldata.d.ts +3 -0
- package/dest/archiver/l1/bin/retrieve-calldata.d.ts.map +1 -0
- package/dest/archiver/l1/bin/retrieve-calldata.js +149 -0
- package/dest/archiver/l1/calldata_retriever.d.ts +112 -0
- package/dest/archiver/l1/calldata_retriever.d.ts.map +1 -0
- package/dest/archiver/l1/calldata_retriever.js +471 -0
- package/dest/archiver/l1/data_retrieval.d.ts +90 -0
- package/dest/archiver/l1/data_retrieval.d.ts.map +1 -0
- package/dest/archiver/l1/data_retrieval.js +331 -0
- package/dest/archiver/l1/debug_tx.d.ts +19 -0
- package/dest/archiver/l1/debug_tx.d.ts.map +1 -0
- package/dest/archiver/l1/debug_tx.js +73 -0
- package/dest/archiver/l1/spire_proposer.d.ts +70 -0
- package/dest/archiver/l1/spire_proposer.d.ts.map +1 -0
- package/dest/archiver/l1/spire_proposer.js +157 -0
- package/dest/archiver/l1/trace_tx.d.ts +97 -0
- package/dest/archiver/l1/trace_tx.d.ts.map +1 -0
- package/dest/archiver/l1/trace_tx.js +91 -0
- package/dest/archiver/l1/types.d.ts +12 -0
- package/dest/archiver/l1/types.d.ts.map +1 -0
- package/dest/archiver/l1/types.js +3 -0
- package/dest/archiver/l1/validate_trace.d.ts +29 -0
- package/dest/archiver/l1/validate_trace.d.ts.map +1 -0
- package/dest/archiver/l1/validate_trace.js +150 -0
- package/dest/archiver/structs/data_retrieval.d.ts +1 -1
- package/dest/archiver/structs/inbox_message.d.ts +15 -0
- package/dest/archiver/structs/inbox_message.d.ts.map +1 -0
- package/dest/archiver/structs/inbox_message.js +39 -0
- package/dest/archiver/structs/published.d.ts +2 -11
- package/dest/archiver/structs/published.d.ts.map +1 -1
- package/dest/archiver/structs/published.js +1 -1
- package/dest/archiver/validation.d.ts +17 -0
- package/dest/archiver/validation.d.ts.map +1 -0
- package/dest/archiver/validation.js +98 -0
- package/dest/factory.d.ts +9 -14
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +22 -52
- package/dest/index.d.ts +2 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -1
- package/dest/rpc/index.d.ts +2 -3
- package/dest/rpc/index.d.ts.map +1 -1
- package/dest/rpc/index.js +1 -4
- package/dest/test/index.d.ts +1 -1
- package/dest/test/mock_archiver.d.ts +16 -8
- package/dest/test/mock_archiver.d.ts.map +1 -1
- package/dest/test/mock_archiver.js +19 -14
- package/dest/test/mock_l1_to_l2_message_source.d.ts +9 -6
- package/dest/test/mock_l1_to_l2_message_source.d.ts.map +1 -1
- package/dest/test/mock_l1_to_l2_message_source.js +30 -7
- package/dest/test/mock_l2_block_source.d.ts +56 -13
- package/dest/test/mock_l2_block_source.d.ts.map +1 -1
- package/dest/test/mock_l2_block_source.js +196 -25
- package/dest/test/mock_structs.d.ts +10 -0
- package/dest/test/mock_structs.d.ts.map +1 -0
- package/dest/test/mock_structs.js +38 -0
- package/package.json +29 -30
- package/src/archiver/archiver.ts +1596 -512
- package/src/archiver/archiver_store.ts +205 -88
- package/src/archiver/archiver_store_test_suite.ts +2386 -354
- package/src/archiver/config.ts +38 -46
- package/src/archiver/errors.ts +85 -0
- package/src/archiver/index.ts +2 -3
- package/src/archiver/instrumentation.ts +65 -45
- package/src/archiver/kv_archiver_store/block_store.ts +668 -101
- package/src/archiver/kv_archiver_store/contract_class_store.ts +14 -24
- package/src/archiver/kv_archiver_store/contract_instance_store.ts +36 -28
- package/src/archiver/kv_archiver_store/kv_archiver_store.ts +197 -113
- package/src/archiver/kv_archiver_store/log_store.ts +204 -132
- package/src/archiver/kv_archiver_store/message_store.ts +213 -54
- package/src/archiver/l1/README.md +98 -0
- package/src/archiver/l1/bin/retrieve-calldata.ts +182 -0
- package/src/archiver/l1/calldata_retriever.ts +641 -0
- package/src/archiver/l1/data_retrieval.ts +512 -0
- package/src/archiver/l1/debug_tx.ts +99 -0
- package/src/archiver/l1/spire_proposer.ts +160 -0
- package/src/archiver/l1/trace_tx.ts +128 -0
- package/src/archiver/l1/types.ts +13 -0
- package/src/archiver/l1/validate_trace.ts +211 -0
- package/src/archiver/structs/inbox_message.ts +41 -0
- package/src/archiver/structs/published.ts +1 -11
- package/src/archiver/validation.ts +124 -0
- package/src/factory.ts +28 -69
- package/src/index.ts +1 -1
- package/src/rpc/index.ts +1 -5
- package/src/test/fixtures/debug_traceTransaction-multicall3.json +88 -0
- package/src/test/fixtures/debug_traceTransaction-multiplePropose.json +153 -0
- package/src/test/fixtures/debug_traceTransaction-proxied.json +122 -0
- package/src/test/fixtures/trace_transaction-multicall3.json +65 -0
- package/src/test/fixtures/trace_transaction-multiplePropose.json +319 -0
- package/src/test/fixtures/trace_transaction-proxied.json +128 -0
- package/src/test/fixtures/trace_transaction-randomRevert.json +216 -0
- package/src/test/mock_archiver.ts +22 -16
- package/src/test/mock_l1_to_l2_message_source.ts +26 -8
- package/src/test/mock_l2_block_source.ts +254 -31
- package/src/test/mock_structs.ts +50 -0
- package/dest/archiver/data_retrieval.d.ts +0 -74
- package/dest/archiver/data_retrieval.d.ts.map +0 -1
- package/dest/archiver/data_retrieval.js +0 -283
- package/dest/archiver/kv_archiver_store/nullifier_store.d.ts +0 -12
- package/dest/archiver/kv_archiver_store/nullifier_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/nullifier_store.js +0 -73
- package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.d.ts +0 -23
- package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.d.ts.map +0 -1
- package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.js +0 -49
- package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts +0 -175
- package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts.map +0 -1
- package/dest/archiver/memory_archiver_store/memory_archiver_store.js +0 -636
- package/src/archiver/data_retrieval.ts +0 -422
- package/src/archiver/kv_archiver_store/nullifier_store.ts +0 -97
- package/src/archiver/memory_archiver_store/l1_to_l2_message_store.ts +0 -61
- package/src/archiver/memory_archiver_store/memory_archiver_store.ts +0 -801
|
@@ -1,57 +1,113 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import { Buffer16, Buffer32 } from '@aztec/foundation/buffer';
|
|
3
|
+
import { toArray } from '@aztec/foundation/iterable';
|
|
3
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
6
|
+
import { mapRange } from '@aztec/kv-store';
|
|
4
7
|
import { InboxLeaf } from '@aztec/stdlib/messaging';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
import { deserializeInboxMessage, serializeInboxMessage, updateRollingHash } from '../structs/inbox_message.js';
|
|
9
|
+
export class MessageStoreError extends Error {
|
|
10
|
+
inboxMessage;
|
|
11
|
+
constructor(message, inboxMessage){
|
|
12
|
+
super(message), this.inboxMessage = inboxMessage;
|
|
13
|
+
this.name = 'MessageStoreError';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export class MessageStore {
|
|
8
17
|
db;
|
|
9
|
-
#l1ToL2Messages;
|
|
10
|
-
#l1ToL2MessageIndices;
|
|
11
|
-
#lastSynchedL1Block;
|
|
12
|
-
#totalMessageCount;
|
|
18
|
+
/** Maps from message index to serialized InboxMessage */ #l1ToL2Messages;
|
|
19
|
+
/** Maps from hex-stringified message leaf to its index */ #l1ToL2MessageIndices;
|
|
20
|
+
/** Stores L1 block number and hash of the L1 synchpoint */ #lastSynchedL1Block;
|
|
21
|
+
/** Stores total messages stored */ #totalMessageCount;
|
|
13
22
|
#log;
|
|
14
|
-
#l1ToL2MessagesSubtreeSize;
|
|
15
23
|
constructor(db){
|
|
16
24
|
this.db = db;
|
|
17
25
|
this.#log = createLogger('archiver:message_store');
|
|
18
|
-
this.#l1ToL2MessagesSubtreeSize = 2 ** L1_TO_L2_MSG_SUBTREE_HEIGHT;
|
|
19
26
|
this.#l1ToL2Messages = db.openMap('archiver_l1_to_l2_messages');
|
|
20
27
|
this.#l1ToL2MessageIndices = db.openMap('archiver_l1_to_l2_message_indices');
|
|
21
|
-
this.#lastSynchedL1Block = db.openSingleton('
|
|
28
|
+
this.#lastSynchedL1Block = db.openSingleton('archiver_last_l1_block_id');
|
|
22
29
|
this.#totalMessageCount = db.openSingleton('archiver_l1_to_l2_message_count');
|
|
23
30
|
}
|
|
24
31
|
async getTotalL1ToL2MessageCount() {
|
|
25
32
|
return await this.#totalMessageCount.getAsync() ?? 0n;
|
|
26
33
|
}
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
/** Gets the last L1 block synced. */ async getSynchedL1Block() {
|
|
35
|
+
const buffer = await this.#lastSynchedL1Block.getAsync();
|
|
36
|
+
if (!buffer) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
const reader = BufferReader.asReader(buffer);
|
|
40
|
+
return {
|
|
41
|
+
l1BlockNumber: reader.readUInt256(),
|
|
42
|
+
l1BlockHash: Buffer32.fromBuffer(reader.readBytes(Buffer32.SIZE))
|
|
43
|
+
};
|
|
32
44
|
}
|
|
33
|
-
async
|
|
34
|
-
|
|
45
|
+
/** Sets the last L1 block synced */ async setSynchedL1Block(l1Block) {
|
|
46
|
+
const buffer = serializeToBuffer([
|
|
47
|
+
l1Block.l1BlockNumber,
|
|
48
|
+
l1Block.l1BlockHash
|
|
49
|
+
]);
|
|
50
|
+
await this.#lastSynchedL1Block.set(buffer);
|
|
35
51
|
}
|
|
36
52
|
/**
|
|
37
53
|
* Append L1 to L2 messages to the store.
|
|
38
|
-
*
|
|
39
|
-
*
|
|
54
|
+
* Requires new messages to be in order and strictly after the last message added.
|
|
55
|
+
* Throws if out of order messages are added or if the rolling hash is invalid.
|
|
40
56
|
*/ addL1ToL2Messages(messages) {
|
|
57
|
+
if (messages.length === 0) {
|
|
58
|
+
return Promise.resolve();
|
|
59
|
+
}
|
|
41
60
|
return this.db.transactionAsync(async ()=>{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
61
|
+
let lastMessage = await this.getLastMessage();
|
|
62
|
+
let messageCount = 0;
|
|
63
|
+
for (const message of messages){
|
|
64
|
+
// Check messages are inserted in increasing order, but allow reinserting messages.
|
|
65
|
+
if (lastMessage && message.index <= lastMessage.index) {
|
|
66
|
+
const existing = await this.#l1ToL2Messages.getAsync(this.indexToKey(message.index));
|
|
67
|
+
if (existing && deserializeInboxMessage(existing).rollingHash.equals(message.rollingHash)) {
|
|
68
|
+
// We reinsert instead of skipping in case the message was re-orged and got added in a different L1 block.
|
|
69
|
+
this.#log.trace(`Reinserting message with index ${message.index} in the store`);
|
|
70
|
+
await this.#l1ToL2Messages.set(this.indexToKey(message.index), serializeInboxMessage(message));
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
throw new MessageStoreError(`Cannot insert L1 to L2 message with index ${message.index} before last message with index ${lastMessage.index}`, message);
|
|
74
|
+
}
|
|
75
|
+
// Check rolling hash is valid.
|
|
76
|
+
const previousRollingHash = lastMessage?.rollingHash ?? Buffer16.ZERO;
|
|
77
|
+
const expectedRollingHash = updateRollingHash(previousRollingHash, message.leaf);
|
|
78
|
+
if (!expectedRollingHash.equals(message.rollingHash)) {
|
|
79
|
+
throw new MessageStoreError(`Invalid rolling hash for incoming L1 to L2 message ${message.leaf.toString()} ` + `with index ${message.index} ` + `(expected ${expectedRollingHash.toString()} from previous hash ${previousRollingHash} but got ${message.rollingHash.toString()})`, message);
|
|
80
|
+
}
|
|
81
|
+
// Check index corresponds to the checkpoint number.
|
|
82
|
+
const [expectedStart, expectedEnd] = InboxLeaf.indexRangeForCheckpoint(message.checkpointNumber);
|
|
83
|
+
if (message.index < expectedStart || message.index >= expectedEnd) {
|
|
84
|
+
throw new MessageStoreError(`Invalid index ${message.index} for incoming L1 to L2 message ${message.leaf.toString()} ` + `at checkpoint ${message.checkpointNumber} (expected value in range [${expectedStart}, ${expectedEnd}))`, message);
|
|
85
|
+
}
|
|
86
|
+
// Check there are no gaps in the indices within the same checkpoint.
|
|
87
|
+
if (lastMessage && message.checkpointNumber === lastMessage.checkpointNumber && message.index !== lastMessage.index + 1n) {
|
|
88
|
+
throw new MessageStoreError(`Missing prior message for incoming L1 to L2 message ${message.leaf.toString()} ` + `with index ${message.index}`, message);
|
|
89
|
+
}
|
|
90
|
+
// Check the first message in a block has the correct index.
|
|
91
|
+
if ((!lastMessage || message.checkpointNumber > lastMessage.checkpointNumber) && message.index !== expectedStart) {
|
|
92
|
+
throw new MessageStoreError(`Message ${message.leaf.toString()} for checkpoint ${message.checkpointNumber} has wrong index ` + `${message.index} (expected ${expectedStart})`, message);
|
|
93
|
+
}
|
|
94
|
+
// Perform the insertions.
|
|
95
|
+
await this.#l1ToL2Messages.set(this.indexToKey(message.index), serializeInboxMessage(message));
|
|
96
|
+
await this.#l1ToL2MessageIndices.set(this.leafToIndexKey(message.leaf), message.index);
|
|
97
|
+
messageCount++;
|
|
98
|
+
this.#log.trace(`Inserted L1 to L2 message ${message.leaf} with index ${message.index} into the store`);
|
|
99
|
+
lastMessage = message;
|
|
45
100
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
await this
|
|
50
|
-
|
|
101
|
+
// Update the L1 sync point to that of the last message added.
|
|
102
|
+
const currentSyncPoint = await this.getSynchedL1Block();
|
|
103
|
+
if (!currentSyncPoint || currentSyncPoint.l1BlockNumber < lastMessage.l1BlockNumber) {
|
|
104
|
+
await this.setSynchedL1Block({
|
|
105
|
+
l1BlockNumber: lastMessage.l1BlockNumber,
|
|
106
|
+
l1BlockHash: lastMessage.l1BlockHash
|
|
107
|
+
});
|
|
51
108
|
}
|
|
52
|
-
|
|
53
|
-
await this
|
|
54
|
-
return true;
|
|
109
|
+
// Update total message count with the number of inserted messages.
|
|
110
|
+
await this.increaseTotalMessageCount(messageCount);
|
|
55
111
|
});
|
|
56
112
|
}
|
|
57
113
|
/**
|
|
@@ -59,27 +115,74 @@ import { InboxLeaf } from '@aztec/stdlib/messaging';
|
|
|
59
115
|
* @param l1ToL2Message - The L1 to L2 message.
|
|
60
116
|
* @returns The index of the L1 to L2 message in the L1 to L2 message tree (undefined if not found).
|
|
61
117
|
*/ getL1ToL2MessageIndex(l1ToL2Message) {
|
|
62
|
-
return this.#l1ToL2MessageIndices.getAsync(
|
|
118
|
+
return this.#l1ToL2MessageIndices.getAsync(this.leafToIndexKey(l1ToL2Message));
|
|
119
|
+
}
|
|
120
|
+
async getLastMessage() {
|
|
121
|
+
const [msg] = await toArray(this.#l1ToL2Messages.valuesAsync({
|
|
122
|
+
reverse: true,
|
|
123
|
+
limit: 1
|
|
124
|
+
}));
|
|
125
|
+
return msg ? deserializeInboxMessage(msg) : undefined;
|
|
63
126
|
}
|
|
64
|
-
async getL1ToL2Messages(
|
|
127
|
+
async getL1ToL2Messages(checkpointNumber) {
|
|
65
128
|
const messages = [];
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
for
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
} else {
|
|
78
|
-
undefinedMessageFound = true;
|
|
79
|
-
// We continue iterating over messages here to verify that there are no more messages after the undefined one.
|
|
80
|
-
// --> If this was the case this would imply there is some issue with log fetching.
|
|
129
|
+
const [startIndex, endIndex] = InboxLeaf.indexRangeForCheckpoint(checkpointNumber);
|
|
130
|
+
let lastIndex = startIndex - 1n;
|
|
131
|
+
for await (const msgBuffer of this.#l1ToL2Messages.valuesAsync({
|
|
132
|
+
start: this.indexToKey(startIndex),
|
|
133
|
+
end: this.indexToKey(endIndex)
|
|
134
|
+
})){
|
|
135
|
+
const msg = deserializeInboxMessage(msgBuffer);
|
|
136
|
+
if (msg.checkpointNumber !== checkpointNumber) {
|
|
137
|
+
throw new Error(`L1 to L2 message with index ${msg.index} has invalid checkpoint number ${msg.checkpointNumber}`);
|
|
138
|
+
} else if (msg.index !== lastIndex + 1n) {
|
|
139
|
+
throw new Error(`Expected L1 to L2 message with index ${lastIndex + 1n} but got ${msg.index}`);
|
|
81
140
|
}
|
|
141
|
+
lastIndex = msg.index;
|
|
142
|
+
messages.push(msg.leaf);
|
|
82
143
|
}
|
|
83
144
|
return messages;
|
|
84
145
|
}
|
|
146
|
+
async *iterateL1ToL2Messages(range = {}) {
|
|
147
|
+
const entriesRange = mapRange(range, this.indexToKey);
|
|
148
|
+
for await (const msgBuffer of this.#l1ToL2Messages.valuesAsync(entriesRange)){
|
|
149
|
+
yield deserializeInboxMessage(msgBuffer);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
removeL1ToL2Messages(startIndex) {
|
|
153
|
+
this.#log.debug(`Deleting L1 to L2 messages from index ${startIndex}`);
|
|
154
|
+
let deleteCount = 0;
|
|
155
|
+
return this.db.transactionAsync(async ()=>{
|
|
156
|
+
for await (const [key, msgBuffer] of this.#l1ToL2Messages.entriesAsync({
|
|
157
|
+
start: this.indexToKey(startIndex)
|
|
158
|
+
})){
|
|
159
|
+
this.#log.trace(`Deleting L1 to L2 message with index ${key - 1} from the store`);
|
|
160
|
+
await this.#l1ToL2Messages.delete(key);
|
|
161
|
+
await this.#l1ToL2MessageIndices.delete(this.leafToIndexKey(deserializeInboxMessage(msgBuffer).leaf));
|
|
162
|
+
deleteCount++;
|
|
163
|
+
}
|
|
164
|
+
await this.increaseTotalMessageCount(-deleteCount);
|
|
165
|
+
this.#log.warn(`Deleted ${deleteCount} L1 to L2 messages from index ${startIndex} from the store`);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
rollbackL1ToL2MessagesToCheckpoint(targetCheckpointNumber) {
|
|
169
|
+
this.#log.debug(`Deleting L1 to L2 messages up to target checkpoint ${targetCheckpointNumber}`);
|
|
170
|
+
const startIndex = InboxLeaf.smallestIndexForCheckpoint(CheckpointNumber(targetCheckpointNumber + 1));
|
|
171
|
+
return this.removeL1ToL2Messages(startIndex);
|
|
172
|
+
}
|
|
173
|
+
indexToKey(index) {
|
|
174
|
+
return Number(index);
|
|
175
|
+
}
|
|
176
|
+
leafToIndexKey(leaf) {
|
|
177
|
+
return leaf.toString();
|
|
178
|
+
}
|
|
179
|
+
async increaseTotalMessageCount(count) {
|
|
180
|
+
if (count === 0) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
return await this.db.transactionAsync(async ()=>{
|
|
184
|
+
const lastTotalMessageCount = await this.getTotalL1ToL2MessageCount();
|
|
185
|
+
await this.#totalMessageCount.set(lastTotalMessageCount + BigInt(count));
|
|
186
|
+
});
|
|
187
|
+
}
|
|
85
188
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export {};
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmV0cmlldmUtY2FsbGRhdGEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9hcmNoaXZlci9sMS9iaW4vcmV0cmlldmUtY2FsbGRhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieve-calldata.d.ts","sourceRoot":"","sources":["../../../../src/archiver/l1/bin/retrieve-calldata.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
5
|
+
import { createPublicClient, http } from 'viem';
|
|
6
|
+
import { mainnet } from 'viem/chains';
|
|
7
|
+
import { CalldataRetriever } from '../calldata_retriever.js';
|
|
8
|
+
const logger = createLogger('archiver:calldata-test');
|
|
9
|
+
function parseArgs() {
|
|
10
|
+
const args = process.argv.slice(2);
|
|
11
|
+
if (args.length < 2) {
|
|
12
|
+
// eslint-disable-next-line no-console
|
|
13
|
+
console.error('Usage: node index.js <rollup-address> <tx-hash> [target-committee-size]');
|
|
14
|
+
// eslint-disable-next-line no-console
|
|
15
|
+
console.error('');
|
|
16
|
+
// eslint-disable-next-line no-console
|
|
17
|
+
console.error('Environment variables:');
|
|
18
|
+
// eslint-disable-next-line no-console
|
|
19
|
+
console.error(' ETHEREUM_HOST or RPC_URL - Ethereum RPC endpoint');
|
|
20
|
+
// eslint-disable-next-line no-console
|
|
21
|
+
console.error('');
|
|
22
|
+
// eslint-disable-next-line no-console
|
|
23
|
+
console.error('Example:');
|
|
24
|
+
// eslint-disable-next-line no-console
|
|
25
|
+
console.error(' RPC_URL=https://eth-mainnet.g.alchemy.com/v2/YOUR-API-KEY \\');
|
|
26
|
+
// eslint-disable-next-line no-console
|
|
27
|
+
console.error(' node index.js 0x1234... 0xabcd... 32');
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
const rollupAddress = EthAddress.fromString(args[0]);
|
|
31
|
+
const txHash = args[1];
|
|
32
|
+
const targetCommitteeSize = args[2] ? parseInt(args[2], 10) : 24;
|
|
33
|
+
const rpcUrl = process.env.ETHEREUM_HOST || process.env.RPC_URL;
|
|
34
|
+
if (!rpcUrl) {
|
|
35
|
+
// eslint-disable-next-line no-console
|
|
36
|
+
console.error('Error: ETHEREUM_HOST or RPC_URL environment variable must be set');
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
if (targetCommitteeSize <= 0 || targetCommitteeSize > 256) {
|
|
40
|
+
// eslint-disable-next-line no-console
|
|
41
|
+
console.error('Error: target-committee-size must be between 1 and 256');
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
rollupAddress,
|
|
46
|
+
txHash,
|
|
47
|
+
rpcUrl,
|
|
48
|
+
targetCommitteeSize
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
async function main() {
|
|
52
|
+
const { rollupAddress, txHash, rpcUrl, targetCommitteeSize } = parseArgs();
|
|
53
|
+
logger.info('Calldata Retriever Test Script');
|
|
54
|
+
logger.info('===============================');
|
|
55
|
+
logger.info(`Rollup Address: ${rollupAddress.toString()}`);
|
|
56
|
+
logger.info(`Transaction Hash: ${txHash}`);
|
|
57
|
+
logger.info(`RPC URL: ${rpcUrl}`);
|
|
58
|
+
logger.info(`Target Committee Size: ${targetCommitteeSize}`);
|
|
59
|
+
logger.info('');
|
|
60
|
+
try {
|
|
61
|
+
// Create viem public client
|
|
62
|
+
const publicClient = createPublicClient({
|
|
63
|
+
chain: mainnet,
|
|
64
|
+
transport: http(rpcUrl, {
|
|
65
|
+
batch: false
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
logger.info('Fetching transaction...');
|
|
69
|
+
const tx = await publicClient.getTransaction({
|
|
70
|
+
hash: txHash
|
|
71
|
+
});
|
|
72
|
+
if (!tx) {
|
|
73
|
+
throw new Error(`Transaction ${txHash} not found`);
|
|
74
|
+
}
|
|
75
|
+
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
|
+
// Create CalldataRetriever
|
|
83
|
+
const retriever = new CalldataRetriever(publicClient, publicClient, targetCommitteeSize, undefined, logger, {
|
|
84
|
+
rollupAddress,
|
|
85
|
+
governanceProposerAddress,
|
|
86
|
+
slashingProposerAddress,
|
|
87
|
+
slashFactoryAddress
|
|
88
|
+
});
|
|
89
|
+
// Extract L2 block number from transaction logs
|
|
90
|
+
logger.info('Decoding transaction to extract L2 block number...');
|
|
91
|
+
const receipt = await publicClient.getTransactionReceipt({
|
|
92
|
+
hash: txHash
|
|
93
|
+
});
|
|
94
|
+
const l2BlockProposedEvent = receipt.logs.find((log)=>{
|
|
95
|
+
try {
|
|
96
|
+
// Try to match the L2BlockProposed event
|
|
97
|
+
return log.address.toLowerCase() === rollupAddress.toString().toLowerCase() && log.topics[0] === '0x2f1d0e696fa5186494a2f2f89a0e0bcbb15d607f6c5eac4637e07e1e5e7d3c00' // L2BlockProposed event signature
|
|
98
|
+
;
|
|
99
|
+
} catch {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
let l2BlockNumber;
|
|
104
|
+
if (l2BlockProposedEvent && l2BlockProposedEvent.topics[1]) {
|
|
105
|
+
// L2 block number is typically the first indexed parameter
|
|
106
|
+
l2BlockNumber = Number(BigInt(l2BlockProposedEvent.topics[1]));
|
|
107
|
+
logger.info(`L2 Block Number (from event): ${l2BlockNumber}`);
|
|
108
|
+
} else {
|
|
109
|
+
// Fallback: try to extract from transaction data or use a default
|
|
110
|
+
logger.warn('Could not extract L2 block number from event, using block number as fallback');
|
|
111
|
+
l2BlockNumber = Number(tx.blockNumber);
|
|
112
|
+
}
|
|
113
|
+
logger.info('');
|
|
114
|
+
logger.info('Retrieving block header from rollup transaction...');
|
|
115
|
+
logger.info('');
|
|
116
|
+
// For this script, we don't have blob hashes or expected hashes, so pass empty arrays/objects
|
|
117
|
+
const result = await retriever.getCheckpointFromRollupTx(txHash, [], CheckpointNumber(l2BlockNumber), {});
|
|
118
|
+
logger.info(' Successfully retrieved block header!');
|
|
119
|
+
logger.info('');
|
|
120
|
+
logger.info('Block Header Details:');
|
|
121
|
+
logger.info('====================');
|
|
122
|
+
logger.info(`Checkpoint Number: ${result.checkpointNumber}`);
|
|
123
|
+
logger.info(`Block Hash: ${result.blockHash}`);
|
|
124
|
+
logger.info(`Archive Root: ${result.archiveRoot.toString()}`);
|
|
125
|
+
logger.info('');
|
|
126
|
+
logger.info('Header:');
|
|
127
|
+
logger.info(` Slot Number: ${result.header.slotNumber.toString()}`);
|
|
128
|
+
logger.info(` Timestamp: ${result.header.timestamp.toString()}`);
|
|
129
|
+
logger.info(` Coinbase: ${result.header.coinbase.toString()}`);
|
|
130
|
+
logger.info(` Fee Recipient: ${result.header.feeRecipient.toString()}`);
|
|
131
|
+
logger.info(` Total Mana Used: ${result.header.totalManaUsed.toString()}`);
|
|
132
|
+
logger.info('');
|
|
133
|
+
logger.info('Attestations:');
|
|
134
|
+
logger.info(` Count: ${result.attestations.length}`);
|
|
135
|
+
logger.info(` Non-empty attestations: ${result.attestations.filter((a)=>!a.signature.isEmpty()).length}`);
|
|
136
|
+
process.exit(0);
|
|
137
|
+
} catch (error) {
|
|
138
|
+
logger.error('Error retrieving block header:');
|
|
139
|
+
logger.error(error instanceof Error ? error.message : String(error));
|
|
140
|
+
if (error instanceof Error && error.stack) {
|
|
141
|
+
logger.debug(error.stack);
|
|
142
|
+
}
|
|
143
|
+
process.exit(1);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
// Only run if this is the main module
|
|
147
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
148
|
+
void main();
|
|
149
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { ViemPublicClient, ViemPublicDebugClient } from '@aztec/ethereum/types';
|
|
2
|
+
import { CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
|
+
import type { Logger } from '@aztec/foundation/log';
|
|
6
|
+
import { CommitteeAttestation } from '@aztec/stdlib/block';
|
|
7
|
+
import { CheckpointHeader } from '@aztec/stdlib/rollup';
|
|
8
|
+
import { type Hex, type Transaction } from 'viem';
|
|
9
|
+
import type { ArchiverInstrumentation } from '../instrumentation.js';
|
|
10
|
+
/**
|
|
11
|
+
* Extracts calldata to the `propose` method of the rollup contract from an L1 transaction
|
|
12
|
+
* in order to reconstruct an L2 block header.
|
|
13
|
+
*/
|
|
14
|
+
export declare class CalldataRetriever {
|
|
15
|
+
private readonly publicClient;
|
|
16
|
+
private readonly debugClient;
|
|
17
|
+
private readonly targetCommitteeSize;
|
|
18
|
+
private readonly instrumentation;
|
|
19
|
+
private readonly logger;
|
|
20
|
+
/** Pre-computed valid contract calls for validation */
|
|
21
|
+
private readonly validContractCalls;
|
|
22
|
+
private readonly rollupAddress;
|
|
23
|
+
constructor(publicClient: ViemPublicClient, debugClient: ViemPublicDebugClient, targetCommitteeSize: number, instrumentation: ArchiverInstrumentation | undefined, logger: Logger, contractAddresses: {
|
|
24
|
+
rollupAddress: EthAddress;
|
|
25
|
+
governanceProposerAddress: EthAddress;
|
|
26
|
+
slashingProposerAddress: EthAddress;
|
|
27
|
+
slashFactoryAddress?: EthAddress;
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* Gets checkpoint header and metadata from the calldata of an L1 transaction.
|
|
31
|
+
* Tries multicall3 decoding, falls back to trace-based extraction.
|
|
32
|
+
* @param txHash - Hash of the tx that published it.
|
|
33
|
+
* @param blobHashes - Blob hashes for the checkpoint.
|
|
34
|
+
* @param checkpointNumber - Checkpoint number.
|
|
35
|
+
* @param expectedHashes - Optional expected hashes from the CheckpointProposed event for validation
|
|
36
|
+
* @returns Checkpoint header and metadata from the calldata, deserialized
|
|
37
|
+
*/
|
|
38
|
+
getCheckpointFromRollupTx(txHash: `0x${string}`, _blobHashes: Buffer[], checkpointNumber: CheckpointNumber, expectedHashes: {
|
|
39
|
+
attestationsHash?: Hex;
|
|
40
|
+
payloadDigest?: Hex;
|
|
41
|
+
}): Promise<{
|
|
42
|
+
checkpointNumber: CheckpointNumber;
|
|
43
|
+
archiveRoot: Fr;
|
|
44
|
+
header: CheckpointHeader;
|
|
45
|
+
attestations: CommitteeAttestation[];
|
|
46
|
+
blockHash: string;
|
|
47
|
+
}>;
|
|
48
|
+
/** Gets rollup propose calldata from a transaction */
|
|
49
|
+
protected getProposeCallData(tx: Transaction, checkpointNumber: CheckpointNumber): Promise<Hex>;
|
|
50
|
+
/**
|
|
51
|
+
* Attempts to decode a transaction as a Spire Proposer multicall wrapper.
|
|
52
|
+
* If successful, extracts the wrapped call and validates it as either multicall3 or direct propose.
|
|
53
|
+
* @param tx - The transaction to decode
|
|
54
|
+
* @returns The propose calldata if successfully decoded and validated, undefined otherwise
|
|
55
|
+
*/
|
|
56
|
+
protected tryDecodeSpireProposer(tx: Transaction): Promise<Hex | undefined>;
|
|
57
|
+
/**
|
|
58
|
+
* Attempts to decode transaction input as multicall3 and extract propose calldata.
|
|
59
|
+
* Returns undefined if validation fails.
|
|
60
|
+
* @param tx - The transaction-like object with to, input, and hash
|
|
61
|
+
* @returns The propose calldata if successfully validated, undefined otherwise
|
|
62
|
+
*/
|
|
63
|
+
protected tryDecodeMulticall3(tx: {
|
|
64
|
+
to: Hex | null | undefined;
|
|
65
|
+
input: Hex;
|
|
66
|
+
hash: Hex;
|
|
67
|
+
}): Hex | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Attempts to decode transaction as a direct propose call to the rollup contract.
|
|
70
|
+
* Returns undefined if validation fails.
|
|
71
|
+
* @param tx - The transaction-like object with to, input, and hash
|
|
72
|
+
* @returns The propose calldata if successfully validated, undefined otherwise
|
|
73
|
+
*/
|
|
74
|
+
protected tryDecodeDirectPropose(tx: {
|
|
75
|
+
to: Hex | null | undefined;
|
|
76
|
+
input: Hex;
|
|
77
|
+
hash: Hex;
|
|
78
|
+
}): Hex | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Uses debug/trace RPC to extract the actual calldata from the successful propose call.
|
|
81
|
+
* This is the definitive fallback that works for any transaction pattern.
|
|
82
|
+
* Tries trace_transaction first, then falls back to debug_traceTransaction.
|
|
83
|
+
* @param txHash - The transaction hash to trace
|
|
84
|
+
* @returns The propose calldata from the successful call
|
|
85
|
+
*/
|
|
86
|
+
protected extractCalldataViaTrace(txHash: Hex): Promise<Hex>;
|
|
87
|
+
/**
|
|
88
|
+
* Extracts the CommitteeAttestations struct definition from RollupAbi.
|
|
89
|
+
* Finds the _attestations parameter by name in the propose function.
|
|
90
|
+
* Lazy-loaded to avoid issues during module initialization.
|
|
91
|
+
*/
|
|
92
|
+
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
|
+
}
|
|
112
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsbGRhdGFfcmV0cmlldmVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9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