Struct rusk_vm::Schedule[][src]

pub struct Schedule {
Show fields pub version: u32, pub put_code_per_byte_cost: Gas, pub grow_mem_cost: Gas, pub regular_op_cost: Gas, pub return_data_per_byte_cost: Gas, pub event_data_per_byte_cost: Gas, pub event_per_topic_cost: Gas, pub event_base_cost: Gas, pub call_base_cost: Gas, pub instantiate_base_cost: Gas, pub sandbox_data_read_cost: Gas, pub sandbox_data_write_cost: Gas, pub max_event_topics: u32, pub max_stack_height: u32, pub max_memory_pages: u32, pub max_table_size: u32, pub enable_println: bool, pub max_subject_len: u32,
}
Expand description

Definition of the cost schedule and other parameterizations for wasm vm.

Fields

version: u32

Version of the schedule.

put_code_per_byte_cost: Gas

Cost of putting a byte of code into storage.

grow_mem_cost: Gas

Gas cost of a growing memory by single page.

regular_op_cost: Gas

Gas cost of a regular operation.

return_data_per_byte_cost: Gas

Gas cost per one byte returned.

event_data_per_byte_cost: Gas

Gas cost to deposit an event; the per-byte portion.

event_per_topic_cost: Gas

Gas cost to deposit an event; the cost per topic.

event_base_cost: Gas

Gas cost to deposit an event; the base.

call_base_cost: Gas

Base gas cost to call into a contract.

instantiate_base_cost: Gas

Base gas cost to instantiate a contract.

sandbox_data_read_cost: Gas

Gas cost per one byte read from the sandbox memory.

sandbox_data_write_cost: Gas

Gas cost per one byte written to the sandbox memory.

max_event_topics: u32

The maximum number of topics supported by an event.

max_stack_height: u32

Maximum allowed stack height.

See https://wiki.parity.io/WebAssembly-StackHeight to find out how the stack frame cost is calculated.

max_memory_pages: u32

Maximum number of memory pages allowed for a contract.

max_table_size: u32

Maximum allowed size of a declared table.

enable_println: bool

Whether the ext_println function is allowed to be used contracts. MUST only be enabled for dev chains, NOT for production chains

max_subject_len: u32

The maximum length of a subject used for PRNG generation.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Return a reference to the key of the leaf type

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.