pub struct Config {Show 14 fields
pub ext_costs: ExtCostsConfig,
pub grow_mem_cost: u32,
pub regular_op_cost: u32,
pub vm_kind: VMKind,
pub disable_9393_fix: bool,
pub storage_get_mode: StorageGetMode,
pub fix_contract_loading_cost: bool,
pub implicit_account_creation: bool,
pub math_extension: bool,
pub ed25519_verify: bool,
pub alt_bn128: bool,
pub function_call_weight: bool,
pub eth_accounts: bool,
pub limit_config: LimitConfig,
}
Expand description
Dynamic configuration parameters required for the WASM runtime to execute a smart contract.
This (VMConfig
) and RuntimeFeesConfig
combined are sufficient to define
protocol specific behavior of the contract runtime. The former contains
configuration for the WASM runtime specifically, while the latter contains
configuration for the transaction runtime and WASM runtime.
Fields§
§ext_costs: ExtCostsConfig
Costs for runtime externals
grow_mem_cost: u32
Gas cost of a growing memory by single page.
regular_op_cost: u32
Gas cost of a regular operation.
vm_kind: VMKind
The kind of the VM implementation to use
disable_9393_fix: bool
Disable the fix for the #9393 issue in unc-vm-runner.
storage_get_mode: StorageGetMode
Set to StorageGetMode::FlatStorage
in order to enable the FlatStorageReads
protocol
feature.
fix_contract_loading_cost: bool
Enable the FixContractLoadingCost
protocol feature.
implicit_account_creation: bool
Enable the ImplicitAccountCreation
protocol feature.
math_extension: bool
Enable the host functions added by the MathExtension
protocol feature.
ed25519_verify: bool
Enable the host functions added by the Ed25519Verify
protocol feature.
alt_bn128: bool
Enable the host functions added by the AltBn128
protocol feature.
function_call_weight: bool
Enable the FunctionCallWeight
protocol feature.
eth_accounts: bool
Enable the EthAccounts
protocol feature.
limit_config: LimitConfig
Describes limits for VM and Runtime.
Implementations§
Trait Implementations§
Source§impl From<Config> for VMConfigView
impl From<Config> for VMConfigView
Source§impl From<VMConfigView> for Config
impl From<VMConfigView> for Config
Source§fn from(view: VMConfigView) -> Self
fn from(view: VMConfigView) -> Self
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.