@aztec/archiver 3.0.0-nightly.20251216 → 3.0.0-nightly.20251218
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/dest/archiver/archiver.d.ts +60 -36
- package/dest/archiver/archiver.d.ts.map +1 -1
- package/dest/archiver/archiver.js +366 -180
- package/dest/archiver/archiver_store.d.ts +79 -23
- 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 +1624 -251
- package/dest/archiver/errors.d.ts +25 -1
- package/dest/archiver/errors.d.ts.map +1 -1
- package/dest/archiver/errors.js +37 -0
- package/dest/archiver/index.d.ts +2 -2
- package/dest/archiver/index.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/block_store.d.ts +49 -17
- package/dest/archiver/kv_archiver_store/block_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/block_store.js +320 -83
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +29 -27
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.js +50 -26
- package/dest/archiver/kv_archiver_store/log_store.d.ts +4 -4
- package/dest/archiver/kv_archiver_store/log_store.d.ts.map +1 -1
- package/dest/archiver/l1/data_retrieval.d.ts +11 -8
- package/dest/archiver/l1/data_retrieval.d.ts.map +1 -1
- package/dest/archiver/l1/data_retrieval.js +25 -17
- package/dest/archiver/structs/published.d.ts +1 -2
- package/dest/archiver/structs/published.d.ts.map +1 -1
- package/dest/test/mock_l2_block_source.d.ts +3 -2
- package/dest/test/mock_l2_block_source.d.ts.map +1 -1
- package/dest/test/mock_l2_block_source.js +8 -15
- package/package.json +13 -13
- package/src/archiver/archiver.ts +464 -222
- package/src/archiver/archiver_store.ts +88 -22
- package/src/archiver/archiver_store_test_suite.ts +1626 -232
- package/src/archiver/errors.ts +64 -0
- package/src/archiver/index.ts +1 -1
- package/src/archiver/kv_archiver_store/block_store.ts +435 -94
- package/src/archiver/kv_archiver_store/kv_archiver_store.ts +62 -38
- package/src/archiver/kv_archiver_store/log_store.ts +4 -4
- package/src/archiver/l1/data_retrieval.ts +27 -13
- package/src/archiver/structs/published.ts +0 -1
- package/src/test/mock_l2_block_source.ts +9 -16
|
@@ -6,6 +6,7 @@ import { Fr } from '@aztec/foundation/curves/bn254';
|
|
|
6
6
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
7
7
|
import { createLogger } from '@aztec/foundation/log';
|
|
8
8
|
import { L2Block, L2BlockHash, PublishedL2Block } from '@aztec/stdlib/block';
|
|
9
|
+
import { L1PublishedData } from '@aztec/stdlib/checkpoint';
|
|
9
10
|
import { EmptyL1RollupConstants, getSlotRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
|
|
10
11
|
import { TxReceipt, TxStatus } from '@aztec/stdlib/tx';
|
|
11
12
|
/**
|
|
@@ -61,6 +62,10 @@ import { TxReceipt, TxStatus } from '@aztec/stdlib/tx';
|
|
|
61
62
|
getProvenBlockNumber() {
|
|
62
63
|
return Promise.resolve(BlockNumber(this.provenBlockNumber));
|
|
63
64
|
}
|
|
65
|
+
getCheckpointedBlock(_number) {
|
|
66
|
+
// In this mock, we don't track checkpointed blocks separately
|
|
67
|
+
return Promise.resolve(undefined);
|
|
68
|
+
}
|
|
64
69
|
/**
|
|
65
70
|
* Gets an l2 block.
|
|
66
71
|
* @param number - The block number to return (inclusive).
|
|
@@ -88,11 +93,7 @@ import { TxReceipt, TxStatus } from '@aztec/stdlib/tx';
|
|
|
88
93
|
const blocks = await this.getBlocks(from, limit, proven);
|
|
89
94
|
return blocks.map((block)=>PublishedL2Block.fromFields({
|
|
90
95
|
block,
|
|
91
|
-
l1:
|
|
92
|
-
blockNumber: BigInt(block.number),
|
|
93
|
-
blockHash: Buffer32.random().toString(),
|
|
94
|
-
timestamp: BigInt(block.number)
|
|
95
|
-
},
|
|
96
|
+
l1: new L1PublishedData(BigInt(block.number), BigInt(block.number), Buffer32.random().toString()),
|
|
96
97
|
attestations: []
|
|
97
98
|
}));
|
|
98
99
|
}
|
|
@@ -102,11 +103,7 @@ import { TxReceipt, TxStatus } from '@aztec/stdlib/tx';
|
|
|
102
103
|
if (hash.equals(blockHash)) {
|
|
103
104
|
return PublishedL2Block.fromFields({
|
|
104
105
|
block,
|
|
105
|
-
l1:
|
|
106
|
-
blockNumber: BigInt(block.number),
|
|
107
|
-
blockHash: Buffer32.random().toString(),
|
|
108
|
-
timestamp: BigInt(block.number)
|
|
109
|
-
},
|
|
106
|
+
l1: new L1PublishedData(BigInt(block.number), BigInt(block.number), Buffer32.random().toString()),
|
|
110
107
|
attestations: []
|
|
111
108
|
});
|
|
112
109
|
}
|
|
@@ -120,11 +117,7 @@ import { TxReceipt, TxStatus } from '@aztec/stdlib/tx';
|
|
|
120
117
|
}
|
|
121
118
|
return Promise.resolve(PublishedL2Block.fromFields({
|
|
122
119
|
block,
|
|
123
|
-
l1:
|
|
124
|
-
blockNumber: BigInt(block.number),
|
|
125
|
-
blockHash: Buffer32.random().toString(),
|
|
126
|
-
timestamp: BigInt(block.number)
|
|
127
|
-
},
|
|
120
|
+
l1: new L1PublishedData(BigInt(block.number), BigInt(block.number), Buffer32.random().toString()),
|
|
128
121
|
attestations: []
|
|
129
122
|
}));
|
|
130
123
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/archiver",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251218",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -66,18 +66,18 @@
|
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@aztec/blob-lib": "3.0.0-nightly.
|
|
70
|
-
"@aztec/blob-sink": "3.0.0-nightly.
|
|
71
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
72
|
-
"@aztec/epoch-cache": "3.0.0-nightly.
|
|
73
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
74
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
75
|
-
"@aztec/kv-store": "3.0.0-nightly.
|
|
76
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
77
|
-
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.
|
|
78
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
79
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
80
|
-
"@aztec/telemetry-client": "3.0.0-nightly.
|
|
69
|
+
"@aztec/blob-lib": "3.0.0-nightly.20251218",
|
|
70
|
+
"@aztec/blob-sink": "3.0.0-nightly.20251218",
|
|
71
|
+
"@aztec/constants": "3.0.0-nightly.20251218",
|
|
72
|
+
"@aztec/epoch-cache": "3.0.0-nightly.20251218",
|
|
73
|
+
"@aztec/ethereum": "3.0.0-nightly.20251218",
|
|
74
|
+
"@aztec/foundation": "3.0.0-nightly.20251218",
|
|
75
|
+
"@aztec/kv-store": "3.0.0-nightly.20251218",
|
|
76
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251218",
|
|
77
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251218",
|
|
78
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251218",
|
|
79
|
+
"@aztec/stdlib": "3.0.0-nightly.20251218",
|
|
80
|
+
"@aztec/telemetry-client": "3.0.0-nightly.20251218",
|
|
81
81
|
"lodash.groupby": "^4.6.0",
|
|
82
82
|
"lodash.omit": "^4.5.0",
|
|
83
83
|
"tslib": "^2.5.0",
|