ExtCostsConfig

Struct ExtCostsConfig 

Source
pub struct ExtCostsConfig {
Show 49 fields pub base: u64, pub contract_compile_base: u64, pub contract_compile_bytes: u64, pub read_memory_base: u64, pub read_memory_byte: u64, pub write_memory_base: u64, pub write_memory_byte: u64, pub read_register_base: u64, pub read_register_byte: u64, pub write_register_base: u64, pub write_register_byte: u64, pub utf8_decoding_base: u64, pub utf8_decoding_byte: u64, pub utf16_decoding_base: u64, pub utf16_decoding_byte: u64, pub sha256_base: u64, pub sha256_byte: u64, pub keccak256_base: u64, pub keccak256_byte: u64, pub keccak512_base: u64, pub keccak512_byte: u64, pub log_base: u64, pub log_byte: u64, pub storage_write_base: u64, pub storage_write_key_byte: u64, pub storage_write_value_byte: u64, pub storage_write_evicted_byte: u64, pub storage_read_base: u64, pub storage_read_key_byte: u64, pub storage_read_value_byte: u64, pub storage_remove_base: u64, pub storage_remove_key_byte: u64, pub storage_remove_ret_value_byte: u64, pub storage_has_key_base: u64, pub storage_has_key_byte: u64, pub storage_iter_create_prefix_base: u64, pub storage_iter_create_prefix_byte: u64, pub storage_iter_create_range_base: u64, pub storage_iter_create_from_byte: u64, pub storage_iter_create_to_byte: u64, pub storage_iter_next_base: u64, pub storage_iter_next_key_byte: u64, pub storage_iter_next_value_byte: u64, pub touching_trie_node: u64, pub promise_and_base: u64, pub promise_and_per_promise: u64, pub promise_return: u64, pub validator_stake_base: u64, pub validator_total_stake_base: u64,
}

Fields§

§base: u64

Base cost for calling a host function.

§contract_compile_base: u64

Base cost of loading and compiling contract

§contract_compile_bytes: u64

Cost of the execution to load and compile contract

§read_memory_base: u64

Base cost for guest memory read

§read_memory_byte: u64

Cost for guest memory read

§write_memory_base: u64

Base cost for guest memory write

§write_memory_byte: u64

Cost for guest memory write per byte

§read_register_base: u64

Base cost for reading from register

§read_register_byte: u64

Cost for reading byte from register

§write_register_base: u64

Base cost for writing into register

§write_register_byte: u64

Cost for writing byte into register

§utf8_decoding_base: u64

Base cost of decoding utf8. It’s used for log_utf8 and panic_utf8.

§utf8_decoding_byte: u64

Cost per byte of decoding utf8. It’s used for log_utf8 and panic_utf8.

§utf16_decoding_base: u64

Base cost of decoding utf16. It’s used for log_utf16.

§utf16_decoding_byte: u64

Cost per byte of decoding utf16. It’s used for log_utf16.

§sha256_base: u64

Cost of getting sha256 base

§sha256_byte: u64

Cost of getting sha256 per byte

§keccak256_base: u64

Cost of getting sha256 base

§keccak256_byte: u64

Cost of getting sha256 per byte

§keccak512_base: u64

Cost of getting sha256 base

§keccak512_byte: u64

Cost of getting sha256 per byte

§log_base: u64

Cost for calling logging.

§log_byte: u64

Cost for logging per byte

§storage_write_base: u64

Storage trie write key base cost

§storage_write_key_byte: u64

Storage trie write key per byte cost

§storage_write_value_byte: u64

Storage trie write value per byte cost

§storage_write_evicted_byte: u64

Storage trie write cost per byte of evicted value.

§storage_read_base: u64

Storage trie read key base cost

§storage_read_key_byte: u64

Storage trie read key per byte cost

§storage_read_value_byte: u64

Storage trie read value cost per byte cost

§storage_remove_base: u64

Remove key from trie base cost

§storage_remove_key_byte: u64

Remove key from trie per byte cost

§storage_remove_ret_value_byte: u64

Remove key from trie ret value byte cost

§storage_has_key_base: u64

Storage trie check for key existence cost base

§storage_has_key_byte: u64

Storage trie check for key existence per key byte

§storage_iter_create_prefix_base: u64

Create trie prefix iterator cost base

§storage_iter_create_prefix_byte: u64

Create trie prefix iterator cost per byte.

§storage_iter_create_range_base: u64

Create trie range iterator cost base

§storage_iter_create_from_byte: u64

Create trie range iterator cost per byte of from key.

§storage_iter_create_to_byte: u64

Create trie range iterator cost per byte of to key.

§storage_iter_next_base: u64

Trie iterator per key base cost

§storage_iter_next_key_byte: u64

Trie iterator next key byte cost

§storage_iter_next_value_byte: u64

Trie iterator next key byte cost

§touching_trie_node: u64

Cost per touched trie node

§promise_and_base: u64

Cost for calling promise_and

§promise_and_per_promise: u64

Cost for calling promise_and for each promise

§promise_return: u64

Cost for calling promise_return

§validator_stake_base: u64

Cost of calling validator_stake.

§validator_total_stake_base: u64

Cost of calling validator_total_stake.

Trait Implementations§

Source§

impl Clone for ExtCostsConfig

Source§

fn clone(&self) -> ExtCostsConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExtCostsConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for ExtCostsConfig

Source§

fn default() -> ExtCostsConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ExtCostsConfig

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<ExtCostsConfig, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Hash for ExtCostsConfig

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ExtCostsConfig

Source§

fn eq(&self, other: &ExtCostsConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ExtCostsConfig

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for ExtCostsConfig

Source§

impl StructuralPartialEq for ExtCostsConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,