Skip to content

Commit

Permalink
Added note on BLS modulo size per BLOb field.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Apr 9, 2024
1 parent 92bad88 commit a05f40f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src.ts/transaction/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -793,6 +796,11 @@ export class Transaction implements TransactionLike<string> {
* [[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
Expand Down

0 comments on commit a05f40f

Please sign in to comment.