calculateLifecycleReserveFunding
calculateLifecycleReserveFunding(
params):OutputType
Defined in: packages/synapse-core/src/warm-storage/calculate-lifecycle-reserve-funding.ts:49
Calculate lifecycle-reserve funding for an upload.
FWSS pays operation fees from the PDP rail’s fixed lifecycle reserve. Before
each fee flush it replenishes an active reserve when the remaining balance
would fall below replenishThreshold. Because runtime batch boundaries
cannot be inferred from raw sizes alone, each supplied piece is
conservatively simulated as its own add-pieces operation and fee flush.
Operation fees remain real charges, but they must not also be added directly to the deposit: paying a fee reduces account funds and fixed lockup by the same amount. Only initial reserve creation and conditional replenishments require additional funding.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
params | ParamsType | calculateLifecycleReserveFunding.ParamsType |
Returns
Section titled “Returns”Lifecycle funding and expected final balance calculateLifecycleReserveFunding.OutputType
Throws
Section titled “Throws”ValidationError when counts or existing reserve state are invalid