pub struct Spec {Show 90 fields
pub stack_limit: usize,
pub max_depth: usize,
pub tier_step_gas: [usize; 8],
pub exp_gas: usize,
pub exp_byte_gas: usize,
pub sha3_gas: usize,
pub sha3_word_gas: usize,
pub cold_sload_gas: usize,
pub sstore_set_gas: usize,
pub sstore_reset_gas: usize,
pub sstore_refund_gas: usize,
pub jumpdest_gas: usize,
pub log_gas: usize,
pub log_data_gas: usize,
pub log_topic_gas: usize,
pub create_gas: usize,
pub call_gas: usize,
pub call_stipend: usize,
pub call_value_transfer_gas: usize,
pub call_new_account_gas: usize,
pub suicide_refund_gas: usize,
pub memory_gas: usize,
pub quad_coeff_div: usize,
pub create_data_gas: usize,
pub create_data_limit: usize,
pub init_code_data_limit: usize,
pub init_code_word_gas: usize,
pub tx_gas: usize,
pub tx_create_gas: usize,
pub tx_data_zero_gas: usize,
pub tx_data_non_zero_gas: usize,
pub tx_data_floor_zero_gas: usize,
pub tx_data_floor_non_zero_gas: usize,
pub copy_gas: usize,
pub extcodesize_gas: usize,
pub extcodecopy_base_gas: usize,
pub balance_gas: usize,
pub extcodehash_gas: usize,
pub suicide_gas: usize,
pub retire_gas: usize,
pub eip1820_gas: usize,
pub access_list_storage_key_gas: usize,
pub access_list_address_gas: usize,
pub cold_account_access_cost: usize,
pub warm_access_gas: usize,
pub suicide_to_new_account_cost: usize,
pub sub_gas_cap_divisor: Option<usize>,
pub blockhash_gas: usize,
pub evm_gas_ratio: usize,
pub per_auth_base_cost: usize,
pub per_empty_account_cost: usize,
pub cip43_init: bool,
pub cip43_contract: bool,
pub cip62: bool,
pub cip64: bool,
pub cip71: bool,
pub cip78a: bool,
pub cip78b: bool,
pub cip90: bool,
pub cip94: bool,
pub cip94_activation_block_number: u64,
pub params_dao_vote_period: u64,
pub cip97: bool,
pub cip98: bool,
pub cip105: bool,
pub cip_sigma_fix: bool,
pub cip107: bool,
pub cip118: bool,
pub cip119: bool,
pub cip131: bool,
pub cip132: bool,
pub cip133_b: BlockNumber,
pub cip133_e: BlockHeight,
pub cip133_core: bool,
pub cip137: bool,
pub cip1559: bool,
pub cancun_opcodes: bool,
pub cip144: bool,
pub cip145: bool,
pub cip145_fix: bool,
pub cip150: bool,
pub cip151: bool,
pub cip152: bool,
pub cip154: bool,
pub cip7702: bool,
pub cip645: CIP645Spec,
pub eip2935: bool,
pub eip7623: bool,
pub align_evm: bool,
pub cip_c2_fix: bool,
}Expand description
Definition of the cost spec and other parameterisations for the VM.
Fields§
§stack_limit: usizeVM stack limit
max_depth: usizeMax number of nested calls/creates
tier_step_gas: [usize; 8]Gas prices for instructions in all tiers
exp_gas: usizeGas price for EXP opcode
exp_byte_gas: usizeAdditional gas for EXP opcode for each byte of exponent
sha3_gas: usizeGas price for SHA3 opcode
sha3_word_gas: usizeAdditional gas for SHA3 opcode for each word of hashed memory
cold_sload_gas: usizeGas price for loading from storage. Code sload gas after CIP-645f: EIP-2929
sstore_set_gas: usizeGas price for setting new value to storage (storage==0, new!=0)
sstore_reset_gas: usizeGas price for altering value in storage
sstore_refund_gas: usizeGas refund for SSTORE clearing (when storage!=0, new==0)
jumpdest_gas: usizeGas price for JUMPDEST opcode
log_gas: usizeGas price for LOG*
log_data_gas: usizeAdditional gas for data in LOG*
log_topic_gas: usizeAdditional gas for each topic in LOG*
create_gas: usizeGas price for CREATE opcode
call_gas: usizeGas price for *CALL* opcodes
call_stipend: usizeStipend for transfer for CALL|CALLCODE opcode when value>0
call_value_transfer_gas: usizeAdditional gas required for value transfer (CALL|CALLCODE)
call_new_account_gas: usizeAdditional gas for creating new account (CALL|CALLCODE)
suicide_refund_gas: usizeRefund for SUICIDE
memory_gas: usizeGas for used memory
quad_coeff_div: usizeCoefficient used to convert memory size to gas price for memory
create_data_gas: usizeCost for contract length when executing CREATE
create_data_limit: usizeMaximum code size when creating a contract.
init_code_data_limit: usizeMaximum init code size (CIP-645i: EIP-3860)
init_code_word_gas: usizeInit code word size (CIP-645i: EIP-3860)
tx_gas: usizeTransaction cost
tx_create_gas: usizeCREATE transaction cost
tx_data_zero_gas: usizeAdditional cost for empty data transaction
tx_data_non_zero_gas: usizeAditional cost for non-empty data transaction
tx_data_floor_zero_gas: usizeFloor gas cost from empty data transaction (EIP-7623)
tx_data_floor_non_zero_gas: usizeFloor gas cost from non-empty data transaction (EIP-7623)
copy_gas: usizeGas price for copying memory
extcodesize_gas: usizePrice of EXTCODESIZE
extcodecopy_base_gas: usizeBase price of EXTCODECOPY
balance_gas: usizePrice of BALANCE
extcodehash_gas: usizePrice of EXTCODEHASH
suicide_gas: usizePrice of SUICIDE
retire_gas: usizePrice for retiring PoS node.
eip1820_gas: usizePrice for deploying Eip-1820 contract.
access_list_storage_key_gas: usize§access_list_address_gas: usize§cold_account_access_cost: usize§warm_access_gas: usize§suicide_to_new_account_cost: usizeAmount of additional gas to pay when SUICIDE credits a non-existant account
sub_gas_cap_divisor: Option<usize>If Some(x): let limit = GAS * (x - 1) / x; let CALL’s gas = min(requested, limit); let CREATE’s gas = limit; If None: let CALL’s gas = (requested > GAS ? [OOG] : GAS); let CREATE’s gas = GAS;
blockhash_gas: usizeBlockhash instruction gas cost.
evm_gas_ratio: usizeThe magnification of gas storage occupying related operaions.
per_auth_base_cost: usizePER_AUTH_BASE_COST in CIP-7702
per_empty_account_cost: usizePER_EMPTY_ACCOUNT_COST in CIP-7702
cip43_init: boolCIP-43: Introduce Finality via Voting Among Staked
cip43_contract: bool§cip62: boolCIP-62: Enable EC-related builtin contract
cip64: boolCIP-64: Get current epoch number through internal contract
cip71: boolCIP-71: Disable anti-reentrancy
cip78a: boolCIP-78: Correct is_sponsored fields in receipt
cip78b: boolCIP-78: Correct is_sponsored fields in receipt
cip90: boolCIP-90: A Space that Fully EVM Compatible
cip94: boolCIP-94: On-chain Parameter DAO Vote
cip94_activation_block_number: u64§params_dao_vote_period: u64§cip97: boolCIP-97: Remove staking list
cip98: boolCIP-98: Fix espace bug
cip105: boolCIP-105: Minimal DAO votes requirement based on PoS votes.
cip_sigma_fix: bool§cip107: boolCIP-107: Reduce storage collateral refund.
cip118: boolCIP-118: Query Unused Storage Points in Internal Contract
cip119: boolCIP-119: PUSH0 instruction
cip131: boolCIP-131: Retain Whitelist on Contract Deletion
cip132: boolCIP-132: Fix Static Context Check for Internal Contracts
cip133_b: BlockNumberCIP-133: Enhanced Block Hash Query
cip133_e: BlockHeight§cip133_core: bool§cip137: boolCIP-137: Base Fee Sharing in CIP-1559
cip1559: boolCIP-1559: Fee Market Change for Conflux
cancun_opcodes: boolCIP-141: Disable Subroutine Opcodes CIP-142: Transient Storage Opcodes CIP-143: MCOPY (0x5e) Opcode for Efficient Memory Copy
cip144: boolCIP-144: Point Evaluation Precompile from EIP-4844
cip145: boolCIP-145: Fix Receipts upon NotEnoughBalance Error
cip145_fix: bool§cip150: boolCIP-150: Reject New Contract Code Starting with the 0xEF byte
cip151: boolCIP-151: SELFDESTRUCT only in Same Transaction
cip152: boolCIP-152: Reject Transactions from Senders with Deployed Code
cip154: boolCIP-154: Fix Inconsistent Implementation of TLOAD
cip7702: boolCIP-7702: Set Code for EOA
cip645: CIP645SpecCIP-645: Align Conflux Gas Pricing with EVM
eip2935: boolEIP-2935: Serve historical block hashes from state
eip7623: boolEIP-7623: Increase calldata cost
align_evm: bool§cip_c2_fix: boolImplementations§
Source§impl Spec
impl Spec
Sourcepub const fn genesis_spec() -> Spec
pub const fn genesis_spec() -> Spec
The spec when Conflux launches the mainnet. It should never changed since the mainnet has launched.