@aztec/blob-lib 3.0.0-nightly.20251119 → 3.0.0-nightly.20251121
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/blob_batching.d.ts +1 -1
- package/dest/blob_batching.js +4 -4
- package/package.json +3 -3
- package/src/blob_batching.ts +4 -4
package/dest/blob_batching.d.ts
CHANGED
|
@@ -128,7 +128,7 @@ export declare class BatchedBlobAccumulator {
|
|
|
128
128
|
/**
|
|
129
129
|
* Given blobs, accumulate all state.
|
|
130
130
|
* We assume the input blobs have not been evaluated at z.
|
|
131
|
-
* @param blobs - The blobs to accumulate. They should be
|
|
131
|
+
* @param blobs - The blobs to accumulate. They should be for the same checkpoint.
|
|
132
132
|
* @returns An updated blob accumulator.
|
|
133
133
|
*/
|
|
134
134
|
accumulateBlobs(blobs: Blob[]): Promise<BatchedBlobAccumulator>;
|
package/dest/blob_batching.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AZTEC_MAX_EPOCH_DURATION,
|
|
1
|
+
import { AZTEC_MAX_EPOCH_DURATION, BLOBS_PER_CHECKPOINT } from '@aztec/constants';
|
|
2
2
|
import { poseidon2Hash, sha256ToField } from '@aztec/foundation/crypto';
|
|
3
3
|
import { BLS12Fr, BLS12Point, Fr } from '@aztec/foundation/fields';
|
|
4
4
|
import { computeBlobFieldsHashFromBlobs } from './blob_utils.js';
|
|
@@ -198,11 +198,11 @@ import { kzg } from './kzg_context.js';
|
|
|
198
198
|
/**
|
|
199
199
|
* Given blobs, accumulate all state.
|
|
200
200
|
* We assume the input blobs have not been evaluated at z.
|
|
201
|
-
* @param blobs - The blobs to accumulate. They should be
|
|
201
|
+
* @param blobs - The blobs to accumulate. They should be for the same checkpoint.
|
|
202
202
|
* @returns An updated blob accumulator.
|
|
203
203
|
*/ async accumulateBlobs(blobs) {
|
|
204
|
-
if (blobs.length >
|
|
205
|
-
throw new Error(`Too many blobs to accumulate. The maximum is ${
|
|
204
|
+
if (blobs.length > BLOBS_PER_CHECKPOINT) {
|
|
205
|
+
throw new Error(`Too many blobs to accumulate. The maximum is ${BLOBS_PER_CHECKPOINT} per checkpoint. Got ${blobs.length}.`);
|
|
206
206
|
}
|
|
207
207
|
// Compute the hash of all the fields in the block.
|
|
208
208
|
const blobFieldsHash = await computeBlobFieldsHashFromBlobs(blobs);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/blob-lib",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251121",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"../package.common.json"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
31
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
30
|
+
"@aztec/constants": "3.0.0-nightly.20251121",
|
|
31
|
+
"@aztec/foundation": "3.0.0-nightly.20251121",
|
|
32
32
|
"@crate-crypto/node-eth-kzg": "^0.10.0",
|
|
33
33
|
"tslib": "^2.4.0"
|
|
34
34
|
},
|
package/src/blob_batching.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AZTEC_MAX_EPOCH_DURATION,
|
|
1
|
+
import { AZTEC_MAX_EPOCH_DURATION, BLOBS_PER_CHECKPOINT } from '@aztec/constants';
|
|
2
2
|
import { poseidon2Hash, sha256ToField } from '@aztec/foundation/crypto';
|
|
3
3
|
import { BLS12Fr, BLS12Point, Fr } from '@aztec/foundation/fields';
|
|
4
4
|
|
|
@@ -234,13 +234,13 @@ export class BatchedBlobAccumulator {
|
|
|
234
234
|
/**
|
|
235
235
|
* Given blobs, accumulate all state.
|
|
236
236
|
* We assume the input blobs have not been evaluated at z.
|
|
237
|
-
* @param blobs - The blobs to accumulate. They should be
|
|
237
|
+
* @param blobs - The blobs to accumulate. They should be for the same checkpoint.
|
|
238
238
|
* @returns An updated blob accumulator.
|
|
239
239
|
*/
|
|
240
240
|
async accumulateBlobs(blobs: Blob[]) {
|
|
241
|
-
if (blobs.length >
|
|
241
|
+
if (blobs.length > BLOBS_PER_CHECKPOINT) {
|
|
242
242
|
throw new Error(
|
|
243
|
-
`Too many blobs to accumulate. The maximum is ${
|
|
243
|
+
`Too many blobs to accumulate. The maximum is ${BLOBS_PER_CHECKPOINT} per checkpoint. Got ${blobs.length}.`,
|
|
244
244
|
);
|
|
245
245
|
}
|
|
246
246
|
|