Skip to main content

Introduction

This document provides a comprehensive reference for all metering points in Cowboy’s dual-gas system. Use this as a lookup table to understand exactly when and how much resources are consumed.
Consensus-Critical: All metering rules in this document are part of the consensus protocol. Any deviation will cause state forks.
Note: Names and code snippets shown here are conceptual and illustrative. The normative content is the metering points and costs (per CIP-3). Final SDK interfaces and naming may differ; always refer to the SDK and Developer Guide for usage.

Cycle Metering Points

Cycles are charged before each operation executes. If insufficient cycles remain, execution halts immediately.

Python Bytecode Operations

Dynamic surcharges apply based on operand types and sizes (see Dynamic Typing Surcharges).

Host Function Categories (CIP-backed)

Built-in Functions (Selected, CIP-backed)

Dynamic Typing Surcharges

Operations have base cost + dynamic surcharge based on runtime types:

Exception Handling

Module Imports

Cell Metering Points

Cells are charged at specific I/O boundaries, not on every instruction.

Transaction Intrinsic

When: Before VM execution begins
What: Transaction payload size
Charged immediately upon transaction submission based on payload size.

Memory Allocation

When: Object creation
What: Allocated memory size

Quick Reference (Selected)