pieceSizesToLeafCount
pieceSizesToLeafCount(
pieceSizes):bigint
Defined in: packages/synapse-core/src/utils/pdp-size.ts:61
Sum the PDP data-bearing leaves produced by known raw piece sizes.
Leaf rounding is applied independently to each piece, matching PDPVerifier.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
pieceSizes | readonly bigint[] | Raw payload size of every piece, in bytes |
Returns
Section titled “Returns”bigint
Aggregate data-bearing leaf count added by the pieces
Throws
Section titled “Throws”ValidationError when the piece sizes are invalid