Struct unc_parameters::vm::Config
source · 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_implicit_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: ExtCostsConfigCosts for runtime externals
grow_mem_cost: u32Gas cost of a growing memory by single page.
regular_op_cost: u32Gas cost of a regular operation.
vm_kind: VMKindThe kind of the VM implementation to use
disable_9393_fix: boolDisable the fix for the #9393 issue in unc-vm-runner.
storage_get_mode: StorageGetModeSet to StorageGetMode::FlatStorage in order to enable the FlatStorageReads protocol
feature.
fix_contract_loading_cost: boolEnable the FixContractLoadingCost protocol feature.
implicit_account_creation: boolEnable the ImplicitAccountCreation protocol feature.
math_extension: boolEnable the host functions added by the MathExtension protocol feature.
ed25519_verify: boolEnable the host functions added by the Ed25519Verify protocol feature.
alt_bn128: boolEnable the host functions added by the AltBn128 protocol feature.
function_call_weight: boolEnable the FunctionCallWeight protocol feature.
eth_implicit_accounts: boolEnable the EthImplicitAccounts protocol feature.
limit_config: LimitConfigDescribes 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
source§impl PartialEq for Config
impl PartialEq for Config
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<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.