From a05f40f1beff4bf6bacf13830e4b01fc5c07c684 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Tue, 9 Apr 2024 19:31:18 -0400 Subject: [PATCH] Added note on BLS modulo size per BLOb field. --- src.ts/transaction/transaction.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src.ts/transaction/transaction.ts b/src.ts/transaction/transaction.ts index 1413902aa..c024640b4 100644 --- a/src.ts/transaction/transaction.ts +++ b/src.ts/transaction/transaction.ts @@ -27,6 +27,9 @@ const BN_MAX_UINT = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffff const BLOB_SIZE = 4096 * 32; +// The BLS Modulo; each field within a BLOb must be less than this +//const BLOB_BLS_MODULO = BigInt("0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001"); + /** * A **TransactionLike** is an object which is appropriate as a loose * input for many operations which will populate missing properties of @@ -793,6 +796,11 @@ export class Transaction implements TransactionLike { * [[KzgLibrary]] will be used to compute the committment and * proof for the blob. * + * A BLOb is a sequence of field elements, each of which must + * be within the BLS field modulo, so some additional processing + * may be required to encode arbitrary data to ensure each 32 byte + * field is within the valid range. + * * Setting this automatically populates [[blobVersionedHashes]], * overwriting any existing values. Setting this to ``null`` * does **not** remove the [[blobVersionedHashes]], leaving them