leafCountToRawSize
leafCountToRawSize(
leafCount):bigint
Defined in: packages/synapse-core/src/utils/pdp-size.ts:16
Convert a PDP data-bearing leaf count to the byte size used by FWSS pricing.
This mirrors PDP’s Cids.leafCountToRawSize(). It is an aggregate
approximation: because PDP records only data-bearing leaves, the result can
exceed the exact raw payload size by up to 31 bytes per piece. FWSS applies
this conversion once to the total data-set leaf count before calculating the
storage rate.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
leafCount | bigint | Number of 32-byte leaves reported by PDP Verifier |
Returns
Section titled “Returns”bigint
Aggregate byte size used by FWSS storage pricing