pub struct Schedule {Show 67 fields
pub exceptional_failed_code_deposit: bool,
pub have_delegate_call: bool,
pub have_create2: bool,
pub have_revert: bool,
pub have_extcodehash: bool,
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 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 cold_sload_cost: usize,
pub cold_account_access_cost: usize,
pub warm_storage_read_cost: 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 tx_gas: usize,
pub tx_create_gas: usize,
pub tx_data_zero_gas: usize,
pub tx_data_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 suicide_to_new_account_cost: usize,
pub sub_gas_cap_divisor: Option<usize>,
pub no_empty: bool,
pub kill_empty: bool,
pub blockhash_gas: usize,
pub have_static_call: bool,
pub have_return_data: bool,
pub have_bitwise_shifting: bool,
pub have_chain_id: bool,
pub have_selfbalance: bool,
pub have_subs: bool,
pub kill_dust: CleanDustMode,
pub eip1283: bool,
pub eip1706: bool,
pub keep_unsigned_nonce: bool,
pub wasm: Option<WasmCosts>,
pub eip2929: bool,
pub eip2930: bool,
pub eip1559: bool,
pub eip1559_elasticity_multiplier: usize,
pub eip1559_gas_limit_bump: usize,
pub eip3198: bool,
pub max_refund_quotient: usize,
pub eip3541: bool,
}Expand description
Definition of the cost schedule and other parameterisations for the EVM.
Fields
exceptional_failed_code_deposit: boolDoes it support exceptional failed code deposit
have_delegate_call: boolDoes it have a delegate cal
have_create2: boolDoes it have a CREATE2 instruction
have_revert: boolDoes it have a REVERT instruction
have_extcodehash: boolDoes it have a EXTCODEHASH instruction
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
sload_gas: usizeGas price for loading from storage
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
cold_sload_cost: usizeEIP-2929 COLD_SLOAD_COST
cold_account_access_cost: usizeEIP-2929 COLD_ACCOUNT_ACCESS_COST
warm_storage_read_cost: usizeEIP-2929 WARM_STORAGE_READ_COST
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.
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: usizeAdditional cost for non-empty data transaction
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
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
no_empty: boolDon’t ever make empty accounts; contracts start with nonce=1. Also, don’t charge 25k when sending/suicide zero-value.
kill_empty: boolKill empty accounts if touched.
blockhash_gas: usizeBlockhash instruction gas cost.
have_static_call: boolStatic Call opcode enabled.
have_return_data: boolRETURNDATA and RETURNDATASIZE opcodes enabled.
have_bitwise_shifting: boolSHL, SHR, SAR opcodes enabled.
have_chain_id: boolCHAINID opcode enabled.
have_selfbalance: boolSELFBALANCE opcode enabled.
have_subs: boolBEGINSUB, JUMPSUB and RETURNSUB opcodes enabled.
kill_dust: CleanDustModeKill basic accounts below this balance if touched.
eip1283: boolEnable EIP-1283 rules
eip1706: boolEnable EIP-1706 rules
keep_unsigned_nonce: boolVM execution does not increase null signed address nonce if this field is true.
wasm: Option<WasmCosts>Wasm extra schedule settings, if wasm activated
eip2929: boolEnable EIP-2929 rules
eip2930: boolEnable EIP-2930 rules for optional access list transactions. it depends on EIP-2929
eip1559: boolEnable EIP-1559 rules
eip1559_elasticity_multiplier: usizeElasticity multiplier
eip1559_gas_limit_bump: usizeEIP-1559 bumps the gas_limit of fork block by elasticity_multiplier
eip3198: boolEnable BASEFEE opcode
max_refund_quotient: usizeGas used in transaction divided by this number is the maximum refundable amount.
eip3541: boolImplementations
sourceimpl Schedule
impl Schedule
sourcepub fn new_frontier() -> Schedule
pub fn new_frontier() -> Schedule
Schedule for the Frontier-era of the Ethereum main net.
sourcepub fn new_homestead() -> Schedule
pub fn new_homestead() -> Schedule
Schedule for the Homestead-era of the Ethereum main net.
sourcepub fn new_post_eip150(
max_code_size: usize,
fix_exp: bool,
no_empty: bool,
kill_empty: bool
) -> Schedule
pub fn new_post_eip150(
max_code_size: usize,
fix_exp: bool,
no_empty: bool,
kill_empty: bool
) -> Schedule
Schedule for the post-EIP-150-era of the Ethereum main net.
sourcepub fn new_byzantium() -> Schedule
pub fn new_byzantium() -> Schedule
Schedule for the Byzantium fork of the Ethereum main net.
sourcepub fn new_constantinople() -> Schedule
pub fn new_constantinople() -> Schedule
Schedule for the Constantinople fork of the Ethereum main net.
sourcepub fn new_istanbul() -> Schedule
pub fn new_istanbul() -> Schedule
Schedule for the Istanbul fork of the Ethereum main net.
sourcepub fn new_berlin() -> Schedule
pub fn new_berlin() -> Schedule
Schedule for the Yolov3 testnet of the Ethereum main net.
sourcepub fn new_london() -> Schedule
pub fn new_london() -> Schedule
Schedule for the London fork of the Ethereum main net.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Schedule
impl Send for Schedule
impl Sync for Schedule
impl Unpin for Schedule
impl UnwindSafe for Schedule
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more