Skip to main content

SyntheticCost

@midnight/ledger v7.0.0


@midnight/ledger / SyntheticCost

Type Alias: SyntheticCost

type SyntheticCost = {
blockUsage: bigint;
bytesChurned: bigint;
bytesWritten: bigint;
computeTime: bigint;
readTime: bigint;
};

A modelled cost of a transaction or block.

Properties

blockUsage

blockUsage: bigint;

The number of bytes of blockspace used


bytesChurned

bytesChurned: bigint;

The number of (modelled) bytes written temporarily or overwritten.


bytesWritten

bytesWritten: bigint;

The net number of (modelled) bytes written, i.e. max(0, absolute written bytes less deleted bytes).


computeTime

computeTime: bigint;

The amount of (modelled) time spent in single-threaded compute, measured in picoseconds.


readTime

readTime: bigint;

The amount of (modelled) time spent reading from disk, measured in picoseconds.