Module ckb_script::cost_model[][src]

CKB VM cost model.

The cost model assign cycles to instructions.

Constants

BYTES_PER_CYCLE

How many bytes can transfer when VM costs one cycle.

Functions

instruction_cycles

Returns the spent cycles to execute the secific instruction.

transferred_byte_cycles

Calculates how many cycles spent to load the specified number of bytes.