Struct near_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: 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 near-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_implicit_accounts: bool
Enable the EthImplicitAccounts
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
source§impl PartialEq for Config
impl PartialEq for Config
impl Eq for Config
impl StructuralEq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.