Skip to main content

Module gas

Module gas 

Source
Expand description

Gas-accounting constants shared with spec.rs.

Constantsยง

COLD_SLOAD ๐Ÿ”’
SSTORE_CREATE_COST
TIP-1000 storage creation component for a zero-to-nonzero SSTORE.
SSTORE_SET_COST
TIP-1060 SSTORE residual: EVM 0โ†’x base cost paid even when a credit applies.
STORAGE_CREDIT_VALUE
TIP-1060 value credited for clearing one occupied storage slot.
T1_SSTORE_SET ๐Ÿ”’
TEMPO_T0_BASE_FEE
T0 base fee: 10 billion attodollars (1ร—10^10).
TEMPO_T1_BASE_FEE
T1 base fee: 20 billion attodollars (2ร—10^10).
TEMPO_T1_EXISTING_NONCE_KEY_GAS
Gas cost for using an existing 2D nonce key (cold SLOAD + warm SSTORE reset).
TEMPO_T1_GENERAL_GAS_LIMIT
TIP-1010 general (non-payment) gas limit: 30 million gas per block. Cap for non-payment transactions.
TEMPO_T1_NEW_NONCE_KEY_GAS
Gas cost for using a new 2D nonce key (cold SLOAD + SSTORE set for 0 -> non-zero).
TEMPO_T1_TX_GAS_LIMIT_CAP
TIP-1010 per-transaction gas limit cap: 30 million gas. Allows maximum-sized contract deployments under TIP-1000 state creation costs.
TEMPO_T2_EXISTING_NONCE_KEY_GAS
T2 adds 2 warm SLOADs for the extended nonce key lookup.
TEMPO_T2_NEW_NONCE_KEY_GAS
T2 adds 2 warm SLOADs for the extended nonce key lookup.
TEMPO_T7_BASE_FEE_CAP
TIP-1067 base fee cap: below the T1 fixed base fee.
TEMPO_T7_BASE_FEE_FLOOR
TIP-1067 base fee floor: one twentieth of the TIP-1067 cap.
TEMPO_T7_BASE_FEE_GAS_TARGET
TIP-1067 gas target for the dynamic base fee controller.
TEMPO_T7_BASE_FEE_PARAMS
TIP-1067 uses EIP-1559โ€™s base-fee update formula with a fixed 10M gas target.
WARM_SLOAD ๐Ÿ”’
WARM_SSTORE_RESET ๐Ÿ”’

Functionsยง

tempo_t7_next_block_base_fee
Returns the TIP-1067 base fee for the child of a block.