@aztec-labs/blob-lib 6.0.0-nightly.20260829
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/batched_blob.d.ts +31 -0
- package/dest/batched_blob.d.ts.map +1 -0
- package/dest/batched_blob.js +20 -0
- package/dest/blob.d.ts +121 -0
- package/dest/blob.d.ts.map +1 -0
- package/dest/blob.js +167 -0
- package/dest/blob_batching.d.ts +118 -0
- package/dest/blob_batching.d.ts.map +1 -0
- package/dest/blob_batching.js +225 -0
- package/dest/blob_utils.d.ts +40 -0
- package/dest/blob_utils.d.ts.map +1 -0
- package/dest/blob_utils.js +69 -0
- package/dest/circuit_types/blob_accumulator.d.ts +23 -0
- package/dest/circuit_types/blob_accumulator.d.ts.map +1 -0
- package/dest/circuit_types/blob_accumulator.js +62 -0
- package/dest/circuit_types/final_blob_accumulator.d.ts +23 -0
- package/dest/circuit_types/final_blob_accumulator.d.ts.map +1 -0
- package/dest/circuit_types/final_blob_accumulator.js +66 -0
- package/dest/circuit_types/final_blob_batching_challenges.d.ts +16 -0
- package/dest/circuit_types/final_blob_batching_challenges.d.ts.map +1 -0
- package/dest/circuit_types/final_blob_batching_challenges.js +26 -0
- package/dest/circuit_types/index.d.ts +4 -0
- package/dest/circuit_types/index.d.ts.map +1 -0
- package/dest/circuit_types/index.js +4 -0
- package/dest/encoding/block_blob_data.d.ts +26 -0
- package/dest/encoding/block_blob_data.d.ts.map +1 -0
- package/dest/encoding/block_blob_data.js +72 -0
- package/dest/encoding/block_end_marker.d.ts +11 -0
- package/dest/encoding/block_end_marker.d.ts.map +1 -0
- package/dest/encoding/block_end_marker.js +41 -0
- package/dest/encoding/block_end_state_field.d.ts +12 -0
- package/dest/encoding/block_end_state_field.d.ts.map +1 -0
- package/dest/encoding/block_end_state_field.js +39 -0
- package/dest/encoding/checkpoint_blob_data.d.ts +15 -0
- package/dest/encoding/checkpoint_blob_data.d.ts.map +1 -0
- package/dest/encoding/checkpoint_blob_data.js +66 -0
- package/dest/encoding/checkpoint_end_marker.d.ts +8 -0
- package/dest/encoding/checkpoint_end_marker.d.ts.map +1 -0
- package/dest/encoding/checkpoint_end_marker.js +28 -0
- package/dest/encoding/fixtures.d.ts +39 -0
- package/dest/encoding/fixtures.d.ts.map +1 -0
- package/dest/encoding/fixtures.js +139 -0
- package/dest/encoding/index.d.ts +10 -0
- package/dest/encoding/index.d.ts.map +1 -0
- package/dest/encoding/index.js +9 -0
- package/dest/encoding/tx_blob_data.d.ts +19 -0
- package/dest/encoding/tx_blob_data.d.ts.map +1 -0
- package/dest/encoding/tx_blob_data.js +79 -0
- package/dest/encoding/tx_start_marker.d.ts +16 -0
- package/dest/encoding/tx_start_marker.d.ts.map +1 -0
- package/dest/encoding/tx_start_marker.js +77 -0
- package/dest/errors.d.ts +4 -0
- package/dest/errors.d.ts.map +1 -0
- package/dest/errors.js +6 -0
- package/dest/hash.d.ts +44 -0
- package/dest/hash.d.ts.map +1 -0
- package/dest/hash.js +82 -0
- package/dest/index.d.ts +11 -0
- package/dest/index.d.ts.map +1 -0
- package/dest/index.js +10 -0
- package/dest/interface.d.ts +8 -0
- package/dest/interface.d.ts.map +1 -0
- package/dest/interface.js +3 -0
- package/dest/kzg_context.d.ts +14 -0
- package/dest/kzg_context.d.ts.map +1 -0
- package/dest/kzg_context.js +37 -0
- package/dest/sponge_blob.d.ts +50 -0
- package/dest/sponge_blob.d.ts.map +1 -0
- package/dest/sponge_blob.js +144 -0
- package/dest/testing.d.ts +31 -0
- package/dest/testing.d.ts.map +1 -0
- package/dest/testing.js +66 -0
- package/dest/types.d.ts +17 -0
- package/dest/types.d.ts.map +1 -0
- package/dest/types.js +4 -0
- package/package.json +91 -0
- package/src/batched_blob.ts +26 -0
- package/src/blob.ts +191 -0
- package/src/blob_batching.ts +303 -0
- package/src/blob_utils.ts +84 -0
- package/src/circuit_types/blob_accumulator.ts +96 -0
- package/src/circuit_types/final_blob_accumulator.ts +75 -0
- package/src/circuit_types/final_blob_batching_challenges.ts +30 -0
- package/src/circuit_types/index.ts +4 -0
- package/src/encoding/block_blob_data.ts +113 -0
- package/src/encoding/block_end_marker.ts +55 -0
- package/src/encoding/block_end_state_field.ts +59 -0
- package/src/encoding/checkpoint_blob_data.ts +100 -0
- package/src/encoding/checkpoint_end_marker.ts +40 -0
- package/src/encoding/fixtures.ts +202 -0
- package/src/encoding/index.ts +9 -0
- package/src/encoding/tx_blob_data.ts +116 -0
- package/src/encoding/tx_start_marker.ts +97 -0
- package/src/errors.ts +6 -0
- package/src/hash.ts +94 -0
- package/src/index.ts +10 -0
- package/src/interface.ts +7 -0
- package/src/kzg_context.ts +48 -0
- package/src/sponge_blob.ts +175 -0
- package/src/testing.ts +94 -0
- package/src/trusted_setup_bit_reversed.json +4100 -0
- package/src/types.ts +17 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BLS12Fr, BLS12Point } from '@aztec-labs/foundation/curves/bls12';
|
|
2
|
+
import { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
3
|
+
import { FinalBlobAccumulator } from './circuit_types/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* A class to represent the result from accumulating blobs in an epoch using BatchedBlobAccumulator.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BatchedBlob {
|
|
8
|
+
/** Hash of Cs (to link to L1 blob hashes). */
|
|
9
|
+
readonly blobCommitmentsHash: Fr;
|
|
10
|
+
/** Challenge point z such that p_i(z) = y_i. */
|
|
11
|
+
readonly z: Fr;
|
|
12
|
+
/** Evaluation y, linear combination of all evaluations y_i = p_i(z) with gamma. */
|
|
13
|
+
readonly y: BLS12Fr;
|
|
14
|
+
/** Commitment C, linear combination of all commitments C_i = [p_i] with gamma. */
|
|
15
|
+
readonly commitment: BLS12Point;
|
|
16
|
+
/** KZG opening 'proof' Q (commitment to the quotient poly.), linear combination of all blob kzg 'proofs' Q_i with gamma. */
|
|
17
|
+
readonly q: BLS12Point;
|
|
18
|
+
constructor(
|
|
19
|
+
/** Hash of Cs (to link to L1 blob hashes). */
|
|
20
|
+
blobCommitmentsHash: Fr,
|
|
21
|
+
/** Challenge point z such that p_i(z) = y_i. */
|
|
22
|
+
z: Fr,
|
|
23
|
+
/** Evaluation y, linear combination of all evaluations y_i = p_i(z) with gamma. */
|
|
24
|
+
y: BLS12Fr,
|
|
25
|
+
/** Commitment C, linear combination of all commitments C_i = [p_i] with gamma. */
|
|
26
|
+
commitment: BLS12Point,
|
|
27
|
+
/** KZG opening 'proof' Q (commitment to the quotient poly.), linear combination of all blob kzg 'proofs' Q_i with gamma. */
|
|
28
|
+
q: BLS12Point);
|
|
29
|
+
toFinalBlobAccumulator(): FinalBlobAccumulator;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmF0Y2hlZF9ibG9iLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYmF0Y2hlZF9ibG9iLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFDMUUsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0FBRXpELE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRWhFOztHQUVHO0FBQ0gscUJBQWEsV0FBVztJQUVwQiw4Q0FBOEM7YUFDOUIsbUJBQW1CLEVBQUUsRUFBRTtJQUN2QyxnREFBZ0Q7YUFDaEMsQ0FBQyxFQUFFLEVBQUU7SUFDckIsbUZBQW1GO2FBQ25FLENBQUMsRUFBRSxPQUFPO0lBQzFCLGtGQUFrRjthQUNsRSxVQUFVLEVBQUUsVUFBVTtJQUN0Qyw0SEFBNEg7YUFDNUcsQ0FBQyxFQUFFLFVBQVU7SUFWL0I7SUFDRSw4Q0FBOEM7SUFDOUIsbUJBQW1CLEVBQUUsRUFBRTtJQUN2QyxnREFBZ0Q7SUFDaEMsQ0FBQyxFQUFFLEVBQUU7SUFDckIsbUZBQW1GO0lBQ25FLENBQUMsRUFBRSxPQUFPO0lBQzFCLGtGQUFrRjtJQUNsRSxVQUFVLEVBQUUsVUFBVTtJQUN0Qyw0SEFBNEg7SUFDNUcsQ0FBQyxFQUFFLFVBQVUsRUFDM0I7SUFFSixzQkFBc0IseUJBRXJCO0NBQ0YifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batched_blob.d.ts","sourceRoot":"","sources":["../src/batched_blob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,EAAE,EAAE,MAAM,qCAAqC,CAAC;AAEzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;GAEG;AACH,qBAAa,WAAW;IAEpB,8CAA8C;aAC9B,mBAAmB,EAAE,EAAE;IACvC,gDAAgD;aAChC,CAAC,EAAE,EAAE;IACrB,mFAAmF;aACnE,CAAC,EAAE,OAAO;IAC1B,kFAAkF;aAClE,UAAU,EAAE,UAAU;IACtC,4HAA4H;aAC5G,CAAC,EAAE,UAAU;IAV/B;IACE,8CAA8C;IAC9B,mBAAmB,EAAE,EAAE;IACvC,gDAAgD;IAChC,CAAC,EAAE,EAAE;IACrB,mFAAmF;IACnE,CAAC,EAAE,OAAO;IAC1B,kFAAkF;IAClE,UAAU,EAAE,UAAU;IACtC,4HAA4H;IAC5G,CAAC,EAAE,UAAU,EAC3B;IAEJ,sBAAsB,yBAErB;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FinalBlobAccumulator } from './circuit_types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* A class to represent the result from accumulating blobs in an epoch using BatchedBlobAccumulator.
|
|
4
|
+
*/ export class BatchedBlob {
|
|
5
|
+
blobCommitmentsHash;
|
|
6
|
+
z;
|
|
7
|
+
y;
|
|
8
|
+
commitment;
|
|
9
|
+
q;
|
|
10
|
+
constructor(/** Hash of Cs (to link to L1 blob hashes). */ blobCommitmentsHash, /** Challenge point z such that p_i(z) = y_i. */ z, /** Evaluation y, linear combination of all evaluations y_i = p_i(z) with gamma. */ y, /** Commitment C, linear combination of all commitments C_i = [p_i] with gamma. */ commitment, /** KZG opening 'proof' Q (commitment to the quotient poly.), linear combination of all blob kzg 'proofs' Q_i with gamma. */ q){
|
|
11
|
+
this.blobCommitmentsHash = blobCommitmentsHash;
|
|
12
|
+
this.z = z;
|
|
13
|
+
this.y = y;
|
|
14
|
+
this.commitment = commitment;
|
|
15
|
+
this.q = q;
|
|
16
|
+
}
|
|
17
|
+
toFinalBlobAccumulator() {
|
|
18
|
+
return new FinalBlobAccumulator(this.blobCommitmentsHash, this.z, this.y, this.commitment);
|
|
19
|
+
}
|
|
20
|
+
}
|
package/dest/blob.d.ts
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { FIELDS_PER_BLOB } from '@aztec-labs/constants';
|
|
2
|
+
import { BLS12Fr } from '@aztec-labs/foundation/curves/bls12';
|
|
3
|
+
import { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
4
|
+
import { BufferReader } from '@aztec-labs/foundation/serialize';
|
|
5
|
+
import type { BlobJson } from './interface.js';
|
|
6
|
+
export { FIELDS_PER_BLOB };
|
|
7
|
+
/**
|
|
8
|
+
* A class to create, manage, and prove EVM blobs.
|
|
9
|
+
*
|
|
10
|
+
* @dev Note: All methods in this class do not check the encoding of the given data. It's the responsibility of other
|
|
11
|
+
* components to ensure that the blob data (which might spread across multiple blobs) was created following the protocol
|
|
12
|
+
* and is correctly encoded.
|
|
13
|
+
*/
|
|
14
|
+
export declare class Blob {
|
|
15
|
+
/**
|
|
16
|
+
* The data to be broadcast on L1 in bytes form.
|
|
17
|
+
*/
|
|
18
|
+
readonly data: Uint8Array;
|
|
19
|
+
/**
|
|
20
|
+
* Commitment to the blob data. Used in compressed BLS12 point format (48 bytes).
|
|
21
|
+
*/
|
|
22
|
+
readonly commitment: Buffer;
|
|
23
|
+
constructor(
|
|
24
|
+
/**
|
|
25
|
+
* The data to be broadcast on L1 in bytes form.
|
|
26
|
+
*/
|
|
27
|
+
data: Uint8Array,
|
|
28
|
+
/**
|
|
29
|
+
* Commitment to the blob data. Used in compressed BLS12 point format (48 bytes).
|
|
30
|
+
*/
|
|
31
|
+
commitment: Buffer);
|
|
32
|
+
/**
|
|
33
|
+
* Create a Blob from a buffer.
|
|
34
|
+
* @param data - The buffer of the Blob.
|
|
35
|
+
* @returns A Blob created from the buffer.
|
|
36
|
+
*
|
|
37
|
+
* @throws If data does not match the expected length (getBytesPerBlob()).
|
|
38
|
+
*/
|
|
39
|
+
static fromBlobBuffer(data: Uint8Array): Promise<Blob>;
|
|
40
|
+
/**
|
|
41
|
+
* Create a Blob from an array of fields.
|
|
42
|
+
*
|
|
43
|
+
* @dev This method pads 0s to the data, extending it to the size of a full blob.
|
|
44
|
+
*
|
|
45
|
+
* @param fields - The array of fields to create the Blob from.
|
|
46
|
+
* @returns A Blob created from the array of fields.
|
|
47
|
+
*/
|
|
48
|
+
static fromFields(fields: Fr[]): Promise<Blob>;
|
|
49
|
+
/**
|
|
50
|
+
* Get the fields from the blob data.
|
|
51
|
+
*
|
|
52
|
+
* @dev WARNING: this method returns all fields
|
|
53
|
+
*
|
|
54
|
+
* @returns The fields from the blob.
|
|
55
|
+
*/
|
|
56
|
+
toFields(): Fr[];
|
|
57
|
+
/**
|
|
58
|
+
* Create a Blob from a JSON object.
|
|
59
|
+
*
|
|
60
|
+
* Blobs will be in this form when requested from the blob client, or from
|
|
61
|
+
* the beacon chain via `getBlobSidecars`
|
|
62
|
+
* https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Beacon/getBlobSidecars
|
|
63
|
+
*
|
|
64
|
+
* @param json - The JSON object to create the Blob from.
|
|
65
|
+
* @returns A Blob created from the JSON object.
|
|
66
|
+
*/
|
|
67
|
+
static fromJson(json: BlobJson): Promise<Blob>;
|
|
68
|
+
/**
|
|
69
|
+
* Get the JSON representation of the blob.
|
|
70
|
+
*
|
|
71
|
+
* @returns The JSON representation of the blob.
|
|
72
|
+
*/
|
|
73
|
+
toJSON(): BlobJson;
|
|
74
|
+
getEthVersionedBlobHash(): Buffer;
|
|
75
|
+
/**
|
|
76
|
+
* Challenge point z (= H(H(tx_effects), kzgCommitment)).
|
|
77
|
+
* Used such that p(z) = y for a single blob, used as z_i in batching (see ./blob_batching.ts).
|
|
78
|
+
*/
|
|
79
|
+
computeChallengeZ(blobFieldsHash: Fr): Promise<Fr>;
|
|
80
|
+
/**
|
|
81
|
+
* Evaluate the blob at a given challenge and return the evaluation and KZG proof.
|
|
82
|
+
*
|
|
83
|
+
* @param challengeZ - The challenge z at which to evaluate the blob.
|
|
84
|
+
* @param verifyProof - Whether to verify the KZG proof.
|
|
85
|
+
*
|
|
86
|
+
* @returns
|
|
87
|
+
* y: BLS12Fr - Evaluation y = p(z), where p() is the blob polynomial. BLS12 field element, rep. as BigNum in nr, bigint in ts.
|
|
88
|
+
* proof: Buffer - KZG opening proof for y = p(z). The commitment to quotient polynomial Q, used in compressed BLS12 point format (48 bytes).
|
|
89
|
+
*/
|
|
90
|
+
evaluate(challengeZ: Fr, verifyProof?: boolean): Promise<{
|
|
91
|
+
y: BLS12Fr;
|
|
92
|
+
proof: Buffer<ArrayBuffer>;
|
|
93
|
+
}>;
|
|
94
|
+
/**
|
|
95
|
+
* Get the buffer representation of the ENTIRE blob.
|
|
96
|
+
*
|
|
97
|
+
* @dev WARNING: this buffer contains all metadata as well as the data itself.
|
|
98
|
+
*
|
|
99
|
+
* @returns The buffer representation of the blob.
|
|
100
|
+
*/
|
|
101
|
+
toBuffer(): Buffer;
|
|
102
|
+
/**
|
|
103
|
+
* Create a Blob from a buffer.
|
|
104
|
+
*
|
|
105
|
+
* @dev WARNING: this method contains all metadata as well as the data itself.
|
|
106
|
+
*
|
|
107
|
+
* @param buf - The buffer to create the Blob from.
|
|
108
|
+
* @returns A Blob created from the buffer.
|
|
109
|
+
*/
|
|
110
|
+
static fromBuffer(buf: Buffer | BufferReader): Blob;
|
|
111
|
+
/**
|
|
112
|
+
* Get the size of the blob in bytes
|
|
113
|
+
*/
|
|
114
|
+
getSize(): number;
|
|
115
|
+
static getViemKzgInstance(): {
|
|
116
|
+
blobToKzgCommitment: (blob: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>;
|
|
117
|
+
computeBlobKzgProof: (blob: Uint8Array<ArrayBufferLike>, commitment: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>;
|
|
118
|
+
computeCellsAndKzgProofs: (b: Uint8Array<ArrayBufferLike>) => [Uint8Array<ArrayBufferLike>[], Uint8Array<ArrayBufferLike>[]];
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvYi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2Jsb2IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ3hELE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxxQ0FBcUMsQ0FBQztBQUM5RCxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFDekQsT0FBTyxFQUFFLFlBQVksRUFBcUIsTUFBTSxrQ0FBa0MsQ0FBQztBQUduRixPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUcvQyxPQUFPLEVBQUUsZUFBZSxFQUFFLENBQUM7QUFFM0I7Ozs7OztHQU1HO0FBQ0gscUJBQWEsSUFBSTtJQUViOztP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AE,EAAE,EAAE,WAAW,UAAQ;;;OAUjD;IAED;;;;;;OAMG;IACH,QAAQ,IAAI,MAAM,CAEjB;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAGlD;IAED;;OAEG;IACH,OAAO,WAEN;IAED,MAAM,CAAC,kBAAkB;;;;MAUxB;CACF"}
|
package/dest/blob.js
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { FIELDS_PER_BLOB } from '@aztec-labs/constants';
|
|
2
|
+
import { BLS12Fr } from '@aztec-labs/foundation/curves/bls12';
|
|
3
|
+
import { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
4
|
+
import { BufferReader, serializeToBuffer } from '@aztec-labs/foundation/serialize';
|
|
5
|
+
import { computeBlobCommitment, computeChallengeZ, computeEthVersionedBlobHash } from './hash.js';
|
|
6
|
+
import { getBytesPerBlob, getBytesPerCommitment, getKzg } from './kzg_context.js';
|
|
7
|
+
export { FIELDS_PER_BLOB };
|
|
8
|
+
/**
|
|
9
|
+
* A class to create, manage, and prove EVM blobs.
|
|
10
|
+
*
|
|
11
|
+
* @dev Note: All methods in this class do not check the encoding of the given data. It's the responsibility of other
|
|
12
|
+
* components to ensure that the blob data (which might spread across multiple blobs) was created following the protocol
|
|
13
|
+
* and is correctly encoded.
|
|
14
|
+
*/ export class Blob {
|
|
15
|
+
data;
|
|
16
|
+
commitment;
|
|
17
|
+
constructor(/**
|
|
18
|
+
* The data to be broadcast on L1 in bytes form.
|
|
19
|
+
*/ data, /**
|
|
20
|
+
* Commitment to the blob data. Used in compressed BLS12 point format (48 bytes).
|
|
21
|
+
*/ commitment){
|
|
22
|
+
this.data = data;
|
|
23
|
+
this.commitment = commitment;
|
|
24
|
+
if (data.length !== getBytesPerBlob()) {
|
|
25
|
+
throw new Error(`Blob data must be ${getBytesPerBlob()} bytes. Got ${data.length}.`);
|
|
26
|
+
}
|
|
27
|
+
if (commitment.length !== getBytesPerCommitment()) {
|
|
28
|
+
throw new Error(`Blob commitment must be ${getBytesPerCommitment()} bytes. Got ${commitment.length}.`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Create a Blob from a buffer.
|
|
33
|
+
* @param data - The buffer of the Blob.
|
|
34
|
+
* @returns A Blob created from the buffer.
|
|
35
|
+
*
|
|
36
|
+
* @throws If data does not match the expected length (getBytesPerBlob()).
|
|
37
|
+
*/ static async fromBlobBuffer(data) {
|
|
38
|
+
const commitment = await computeBlobCommitment(data);
|
|
39
|
+
return new Blob(data, commitment);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Create a Blob from an array of fields.
|
|
43
|
+
*
|
|
44
|
+
* @dev This method pads 0s to the data, extending it to the size of a full blob.
|
|
45
|
+
*
|
|
46
|
+
* @param fields - The array of fields to create the Blob from.
|
|
47
|
+
* @returns A Blob created from the array of fields.
|
|
48
|
+
*/ static async fromFields(fields) {
|
|
49
|
+
if (fields.length > FIELDS_PER_BLOB) {
|
|
50
|
+
throw new Error(`Attempted to overfill blob with ${fields.length} fields. The maximum is ${FIELDS_PER_BLOB}.`);
|
|
51
|
+
}
|
|
52
|
+
const data = Buffer.concat([
|
|
53
|
+
serializeToBuffer(fields)
|
|
54
|
+
], getBytesPerBlob());
|
|
55
|
+
const commitment = await computeBlobCommitment(data);
|
|
56
|
+
return new Blob(data, commitment);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Get the fields from the blob data.
|
|
60
|
+
*
|
|
61
|
+
* @dev WARNING: this method returns all fields
|
|
62
|
+
*
|
|
63
|
+
* @returns The fields from the blob.
|
|
64
|
+
*/ toFields() {
|
|
65
|
+
const reader = BufferReader.asReader(this.data);
|
|
66
|
+
const numTotalFields = this.data.length / Fr.SIZE_IN_BYTES;
|
|
67
|
+
return reader.readArray(numTotalFields, Fr);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Create a Blob from a JSON object.
|
|
71
|
+
*
|
|
72
|
+
* Blobs will be in this form when requested from the blob client, or from
|
|
73
|
+
* the beacon chain via `getBlobSidecars`
|
|
74
|
+
* https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Beacon/getBlobSidecars
|
|
75
|
+
*
|
|
76
|
+
* @param json - The JSON object to create the Blob from.
|
|
77
|
+
* @returns A Blob created from the JSON object.
|
|
78
|
+
*/ static async fromJson(json) {
|
|
79
|
+
const blobBuffer = Buffer.from(json.blob.slice(2), 'hex');
|
|
80
|
+
const blob = await Blob.fromBlobBuffer(blobBuffer);
|
|
81
|
+
if (blob.commitment.toString('hex') !== json.kzg_commitment.slice(2)) {
|
|
82
|
+
throw new Error('KZG commitment does not match');
|
|
83
|
+
}
|
|
84
|
+
return blob;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Get the JSON representation of the blob.
|
|
88
|
+
*
|
|
89
|
+
* @returns The JSON representation of the blob.
|
|
90
|
+
*/ toJSON() {
|
|
91
|
+
return {
|
|
92
|
+
blob: `0x${Buffer.from(this.data).toString('hex')}`,
|
|
93
|
+
// eslint-disable-next-line camelcase
|
|
94
|
+
kzg_commitment: `0x${this.commitment.toString('hex')}`
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
getEthVersionedBlobHash() {
|
|
98
|
+
return computeEthVersionedBlobHash(this.commitment);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Challenge point z (= H(H(tx_effects), kzgCommitment)).
|
|
102
|
+
* Used such that p(z) = y for a single blob, used as z_i in batching (see ./blob_batching.ts).
|
|
103
|
+
*/ async computeChallengeZ(blobFieldsHash) {
|
|
104
|
+
return await computeChallengeZ(blobFieldsHash, this.commitment);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Evaluate the blob at a given challenge and return the evaluation and KZG proof.
|
|
108
|
+
*
|
|
109
|
+
* @param challengeZ - The challenge z at which to evaluate the blob.
|
|
110
|
+
* @param verifyProof - Whether to verify the KZG proof.
|
|
111
|
+
*
|
|
112
|
+
* @returns
|
|
113
|
+
* y: BLS12Fr - Evaluation y = p(z), where p() is the blob polynomial. BLS12 field element, rep. as BigNum in nr, bigint in ts.
|
|
114
|
+
* proof: Buffer - KZG opening proof for y = p(z). The commitment to quotient polynomial Q, used in compressed BLS12 point format (48 bytes).
|
|
115
|
+
*/ async evaluate(challengeZ, verifyProof = false) {
|
|
116
|
+
const kzg = getKzg();
|
|
117
|
+
const res = await kzg.asyncComputeKzgProof(this.data, challengeZ.toBuffer());
|
|
118
|
+
if (verifyProof && !kzg.verifyKzgProof(this.commitment, challengeZ.toBuffer(), res[1], res[0])) {
|
|
119
|
+
throw new Error(`KZG proof did not verify.`);
|
|
120
|
+
}
|
|
121
|
+
const proof = Buffer.from(res[0]);
|
|
122
|
+
const y = BLS12Fr.fromBuffer(Buffer.from(res[1]));
|
|
123
|
+
return {
|
|
124
|
+
y,
|
|
125
|
+
proof
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get the buffer representation of the ENTIRE blob.
|
|
130
|
+
*
|
|
131
|
+
* @dev WARNING: this buffer contains all metadata as well as the data itself.
|
|
132
|
+
*
|
|
133
|
+
* @returns The buffer representation of the blob.
|
|
134
|
+
*/ toBuffer() {
|
|
135
|
+
return Buffer.from(serializeToBuffer(this.data.length, this.data, this.commitment.length, this.commitment));
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Create a Blob from a buffer.
|
|
139
|
+
*
|
|
140
|
+
* @dev WARNING: this method contains all metadata as well as the data itself.
|
|
141
|
+
*
|
|
142
|
+
* @param buf - The buffer to create the Blob from.
|
|
143
|
+
* @returns A Blob created from the buffer.
|
|
144
|
+
*/ static fromBuffer(buf) {
|
|
145
|
+
const reader = BufferReader.asReader(buf);
|
|
146
|
+
return new Blob(reader.readUint8Array(), reader.readBuffer());
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Get the size of the blob in bytes
|
|
150
|
+
*/ getSize() {
|
|
151
|
+
return this.data.length;
|
|
152
|
+
}
|
|
153
|
+
static getViemKzgInstance() {
|
|
154
|
+
const kzg = getKzg();
|
|
155
|
+
return {
|
|
156
|
+
blobToKzgCommitment: kzg.blobToKzgCommitment.bind(kzg),
|
|
157
|
+
computeBlobKzgProof: kzg.computeBlobKzgProof.bind(kzg),
|
|
158
|
+
computeCellsAndKzgProofs: (b)=>{
|
|
159
|
+
const result = kzg.computeCellsAndKzgProofs(b);
|
|
160
|
+
return [
|
|
161
|
+
result.cells,
|
|
162
|
+
result.proofs
|
|
163
|
+
];
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { BLS12Fr, BLS12Point } from '@aztec-labs/foundation/curves/bls12';
|
|
2
|
+
import { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
3
|
+
import { BatchedBlob } from './batched_blob.js';
|
|
4
|
+
import { Blob } from './blob.js';
|
|
5
|
+
import { BlobAccumulator, FinalBlobAccumulator, FinalBlobBatchingChallenges } from './circuit_types/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* A class to create, manage, and prove batched EVM blobs.
|
|
8
|
+
* See noir-projects/fnd/noir-protocol-circuits/crates/blob/src/abis/blob_accumulator.nr
|
|
9
|
+
*/
|
|
10
|
+
export declare class BatchedBlobAccumulator {
|
|
11
|
+
/** Hash of Cs (to link to L1 blob hashes). */
|
|
12
|
+
readonly blobCommitmentsHashAcc: Fr;
|
|
13
|
+
/** Challenge point z_acc. Final value used such that p_i(z) = y_i. */
|
|
14
|
+
readonly zAcc: Fr;
|
|
15
|
+
/** Evaluation y_acc. Final value is is linear combination of all evaluations y_i = p_i(z) with gamma. */
|
|
16
|
+
readonly yAcc: BLS12Fr;
|
|
17
|
+
/** Commitment c_acc. Final value is linear combination of all commitments C_i = [p_i] with gamma. */
|
|
18
|
+
readonly cAcc: BLS12Point;
|
|
19
|
+
/** KZG opening q_acc. Final value is linear combination of all blob kzg 'proofs' Q_i with gamma. */
|
|
20
|
+
readonly qAcc: BLS12Point;
|
|
21
|
+
/**
|
|
22
|
+
* Challenge point gamma_acc for multi opening. Used with y, C, and kzg 'proof' Q above.
|
|
23
|
+
* TODO(#13608): We calculate this by hashing natively in the circuit (hence Fr representation), but it's actually used
|
|
24
|
+
* as a BLS12Fr field elt. Is this safe? Is there a skew?
|
|
25
|
+
*/
|
|
26
|
+
readonly gammaAcc: Fr;
|
|
27
|
+
/** Simply gamma^(i + 1) at blob i. Used for calculating the i'th element of the above linear comb.s */
|
|
28
|
+
readonly gammaPow: BLS12Fr;
|
|
29
|
+
/** Final challenge values used in evaluation. Optimistically input and checked in the final acc. */
|
|
30
|
+
readonly finalBlobChallenges: FinalBlobBatchingChallenges;
|
|
31
|
+
constructor(
|
|
32
|
+
/** Hash of Cs (to link to L1 blob hashes). */
|
|
33
|
+
blobCommitmentsHashAcc: Fr,
|
|
34
|
+
/** Challenge point z_acc. Final value used such that p_i(z) = y_i. */
|
|
35
|
+
zAcc: Fr,
|
|
36
|
+
/** Evaluation y_acc. Final value is is linear combination of all evaluations y_i = p_i(z) with gamma. */
|
|
37
|
+
yAcc: BLS12Fr,
|
|
38
|
+
/** Commitment c_acc. Final value is linear combination of all commitments C_i = [p_i] with gamma. */
|
|
39
|
+
cAcc: BLS12Point,
|
|
40
|
+
/** KZG opening q_acc. Final value is linear combination of all blob kzg 'proofs' Q_i with gamma. */
|
|
41
|
+
qAcc: BLS12Point,
|
|
42
|
+
/**
|
|
43
|
+
* Challenge point gamma_acc for multi opening. Used with y, C, and kzg 'proof' Q above.
|
|
44
|
+
* TODO(#13608): We calculate this by hashing natively in the circuit (hence Fr representation), but it's actually used
|
|
45
|
+
* as a BLS12Fr field elt. Is this safe? Is there a skew?
|
|
46
|
+
*/
|
|
47
|
+
gammaAcc: Fr,
|
|
48
|
+
/** Simply gamma^(i + 1) at blob i. Used for calculating the i'th element of the above linear comb.s */
|
|
49
|
+
gammaPow: BLS12Fr,
|
|
50
|
+
/** Final challenge values used in evaluation. Optimistically input and checked in the final acc. */
|
|
51
|
+
finalBlobChallenges: FinalBlobBatchingChallenges);
|
|
52
|
+
/**
|
|
53
|
+
* Create the empty accumulation state of the epoch.
|
|
54
|
+
* @returns An empty blob accumulator with challenges.
|
|
55
|
+
*/
|
|
56
|
+
static newWithChallenges(finalBlobChallenges: FinalBlobBatchingChallenges): BatchedBlobAccumulator;
|
|
57
|
+
/**
|
|
58
|
+
* Returns an empty BatchedBlobAccumulator with precomputed challenges from all blobs in the epoch.
|
|
59
|
+
* @dev MUST input all blobs to be broadcast. Does not work in multiple calls because z and gamma are calculated
|
|
60
|
+
* beforehand from ALL blobs.
|
|
61
|
+
*/
|
|
62
|
+
static fromBlobFields(blobFieldsPerCheckpoint: Fr[][]): Promise<BatchedBlobAccumulator>;
|
|
63
|
+
/**
|
|
64
|
+
* Get the final batched opening proof from multiple blobs.
|
|
65
|
+
* @dev MUST input all blobs to be broadcast. Does not work in multiple calls because z and gamma are calculated
|
|
66
|
+
* beforehand from ALL blobs.
|
|
67
|
+
*
|
|
68
|
+
* @returns A batched blob.
|
|
69
|
+
*/
|
|
70
|
+
static batch(blobFieldsPerCheckpoint: Fr[][], verifyProof?: boolean): Promise<BatchedBlob>;
|
|
71
|
+
/**
|
|
72
|
+
* Gets the final challenges based on all blobs and their elements to perform a multi opening proof.
|
|
73
|
+
* Used in BatchedBlobAccumulator as 'finalZ' and finalGamma':
|
|
74
|
+
* - z = H(...H(H(z_0, z_1) z_2)..z_n)
|
|
75
|
+
* - where z_i = H(H(fields of blob_i), C_i) = Blob.challengeZ,
|
|
76
|
+
* - used such that p_i(z) = y_i = Blob.evaluationY for all n blob polynomials p_i().
|
|
77
|
+
* - gamma = H(H(...H(H(y_0, y_1) y_2)..y_n), z)
|
|
78
|
+
* - used such that y = sum_i { gamma^i * y_i }, and C = sum_i { gamma^i * C_i }, for all blob evaluations y_i (see above) and commitments C_i.
|
|
79
|
+
*
|
|
80
|
+
* @param blobs - The blobs to precompute the challenges for. Each sub-array is the blobs for an L1 block.
|
|
81
|
+
* @returns Challenges z and gamma.
|
|
82
|
+
*/
|
|
83
|
+
static precomputeBatchedBlobChallenges(blobFieldsPerCheckpoint: Fr[][]): Promise<FinalBlobBatchingChallenges>;
|
|
84
|
+
/**
|
|
85
|
+
* Given blob i, accumulate all state.
|
|
86
|
+
* We assume the input blob has not been evaluated at z.
|
|
87
|
+
* @returns An updated blob accumulator.
|
|
88
|
+
*/
|
|
89
|
+
accumulateBlob(blob: Blob, blobFieldsHash: Fr): Promise<BatchedBlobAccumulator>;
|
|
90
|
+
/**
|
|
91
|
+
* Given blobs, accumulate all state.
|
|
92
|
+
* We assume the input blobs have not been evaluated at z.
|
|
93
|
+
* @param blobFields - The blob fields of a checkpoint to accumulate.
|
|
94
|
+
* @returns An updated blob accumulator.
|
|
95
|
+
*/
|
|
96
|
+
accumulateFields(blobFields: Fr[]): Promise<BatchedBlobAccumulator>;
|
|
97
|
+
/**
|
|
98
|
+
* Finalize accumulation state of the epoch.
|
|
99
|
+
* We assume ALL blobs in the epoch have been accumulated.
|
|
100
|
+
*
|
|
101
|
+
* Final accumulated values:
|
|
102
|
+
* - v := v_acc (hash of all commitments (C_i s) to be checked on L1)
|
|
103
|
+
* - z := z_acc (final challenge, at which all blobs are evaluated)
|
|
104
|
+
* - y := y_acc (final opening to be checked on L1)
|
|
105
|
+
* - c := c_acc (final commitment to be checked on L1)
|
|
106
|
+
* - gamma := poseidon2(BLOB_GAMMA_FINAL, gamma_acc, z) (challenge for linear combination of y and C, above)
|
|
107
|
+
*
|
|
108
|
+
* @param verifyProof - Whether to verify the KZG proof.
|
|
109
|
+
* @returns A batched blob.
|
|
110
|
+
*/
|
|
111
|
+
finalize(verifyProof?: boolean): Promise<BatchedBlob>;
|
|
112
|
+
verify(): boolean;
|
|
113
|
+
isEmptyState(): boolean;
|
|
114
|
+
clone(): BatchedBlobAccumulator;
|
|
115
|
+
toBlobAccumulator(): BlobAccumulator;
|
|
116
|
+
toFinalBlobAccumulator(): FinalBlobAccumulator;
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvYl9iYXRjaGluZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2Jsb2JfYmF0Y2hpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0EsT0FBTyxFQUFFLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxxQ0FBcUMsQ0FBQztBQUMxRSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFFekQsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ2hELE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFFakMsT0FBTyxFQUFFLGVBQWUsRUFBRSxvQkFBb0IsRUFBRSwyQkFBMkIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBSTlHOzs7R0FHRztBQUNILHFCQUFhLHNCQUFzQjtJQUUvQiw4Q0FBOEM7YUFDOUIsc0JBQXNCLEVBQUUsRUFBRTtJQUMxQyxzRUFBc0U7YUFDdEQsSUFBSSxFQUFFLEVBQUU7SUFDeEIseUdBQXlHO2FBQ3pGLElBQUksRUFBRSxPQUFPO0lBQzdCLHFHQUFxRzthQUNyRixJQUFJLEVBQUUsVUFBVTtJQUNoQyxvR0FBb0c7YUFDcEYsSUFBSSxFQUFFLFVBQVU7SUFDaEM7Ozs7T0FJRzthQUNhLFFBQVEsRUFBRSxFQUFFO0lBQzVCLHVHQUF1RzthQUN2RixRQUFRLEVBQUUsT0FBTztJQUNqQyxvR0FBb0c7YUFDcEYsbUJBQW1CLEVBQUUsMkJBQTJCO0lBcEJsRTtJQUNFLDhDQUE4QztJQ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