Skip to main content

Module costs

Module costs 

Source
Expand description

Benchmarked consumption costs of the standard notes, and helpers turning them into fees.

Each constant is the number of VM cycles of the canonical network-account transaction consuming the note, measured by the bench-transaction binary: an account authenticated with AuthNetworkAccount (carrying the components the note requires) consumes the note on a fee-charging chain, so the measured cycles include the allowlist checks and TX_FEE note creation.

The values are denominated in cycles rather than fee units, since the fee (verification_base_fee * (ilog2(cycles) + 1)) depends on a block-header parameter. Use the NetworkNotePricer in miden-tx to turn cycle costs into concrete fees and populate a fee schedule via BasicConstantFeePolicy::with_fees.

The values are estimates from canonical scenarios, not worst cases: asset-scaling paths carry 16 callback-free assets (the maximum per note) and action notes run one selector, so callback-carrying notes can exceed the values - do not treat them as guaranteed fee upper bounds.

Terminology: a note’s cost is its measured cycle count; its price is the fee derived from that cost (and from the costs of the notes its consumption creates).

The table is regenerated with make update-note-costs; a snapshot test in bench-transaction fails CI when a checked-in value drifts more than 5% from the measured one (small drift from unrelated changes is tolerated - the pricing safety margin dwarfs it).

Structs§

NoteCost
A note’s benchmarked consumption cost together with the notes its consumption creates.

Constants§

ALLOWLIST_CONFIG_CONSUMPTION_CYCLES
Cycles of consuming an ALLOWLIST_CONFIG note (single benchmarked path).
BLOCKLIST_CONFIG_CONSUMPTION_CYCLES
Cycles of consuming a BLOCKLIST_CONFIG note (single benchmarked path).
BURN_CONSUMPTION_CYCLES
Cycles of consuming a BURN note (single benchmarked path).
CONSTANT_FEE_POLICY_CONFIG_CONSUMPTION_CYCLES
Cycles of consuming a CONSTANT_FEE_POLICY_CONFIG note (single benchmarked path).
FAUCET_METADATA_CONFIG_CONSUMPTION_CYCLES
Cycles of consuming a FAUCET_METADATA_CONFIG note (single benchmarked path).
FAUCET_POLICY_CONFIG_CONSUMPTION_CYCLES
Cycles of consuming a FAUCET_POLICY_CONFIG note (single benchmarked path).
FEE_SPONSORSHIP_CONSUMPTION_CYCLES
Cycles of consuming a FEE_SPONSORSHIP note (single benchmarked path).
MINT_CONSUMPTION_CYCLES
Cycles of consuming a MINT note: fungible faucet 32747, non-fungible faucet 35637 (maximum).
MIN_BURN_AMOUNT_CONFIG_CONSUMPTION_CYCLES
Cycles of consuming a MIN_BURN_AMOUNT_CONFIG note (single benchmarked path).
NETWORK_ACCOUNT_CONFIG_CONSUMPTION_CYCLES
Cycles of consuming a NETWORK_ACCOUNT_CONFIG note (single benchmarked path).
OWNER_CONFIG_CONSUMPTION_CYCLES
Cycles of consuming an OWNER_CONFIG note (single benchmarked path).
P2IDE_CONSUMPTION_CYCLES
Cycles of consuming a P2IDE note: claim 19032, claim with 16 assets 58095 (maximum), reclaim 19187.
P2ID_CONSUMPTION_CYCLES
Cycles of consuming a P2ID note: 1 asset 18907, 16 assets 57970 (maximum).
PAUSE_CONFIG_CONSUMPTION_CYCLES
Cycles of consuming a PAUSE_CONFIG note (single benchmarked path).
PSWAP_CONSUMPTION_CYCLES
Cycles of consuming a PSWAP note: full fill 25743, partial fill 29942 (maximum).
RBAC_CONFIG_CONSUMPTION_CYCLES
Cycles of consuming an RBAC_CONFIG note (single benchmarked path).
SWAP_CONSUMPTION_CYCLES
Cycles of consuming a SWAP note: public payback 23213 (maximum), private payback 22699.

Traits§

NoteConsumptionCost
Benchmarked consumption cost of a note when consumed by a network account.