diff --git a/polkadot/node/core/pvf/src/executor_intf.rs b/polkadot/node/core/pvf/src/executor_intf.rs index 0cc533f4a8..cbd76be60c 100644 --- a/polkadot/node/core/pvf/src/executor_intf.rs +++ b/polkadot/node/core/pvf/src/executor_intf.rs @@ -118,9 +118,10 @@ fn params_to_wasmtime_semantics(par: ExecutorParams) -> Result sem.max_memory_size = Some(*mms as usize), + ExecutorParam::MaxMemoryPages(mms) => sem.max_memory_size = Some(*mms as usize * 65536), ExecutorParam::StackLogicalMax(slm) => stack_limit.logical_max = *slm, ExecutorParam::StackNativeMax(snm) => stack_limit.native_stack_max = *snm, ExecutorParam::PrecheckingMaxMemory(_) => (), // TODO: Not implemented yet diff --git a/polkadot/primitives/src/vstaging/executor_params.rs b/polkadot/primitives/src/vstaging/executor_params.rs index 8d924122f3..831d95bc1f 100644 --- a/polkadot/primitives/src/vstaging/executor_params.rs +++ b/polkadot/primitives/src/vstaging/executor_params.rs @@ -27,12 +27,11 @@ use polkadot_core_primitives::Hash; use scale_info::TypeInfo; use sp_std::{ops::Deref, vec, vec::Vec}; -/// A single executor parameter +/// The different executor parameters for changing the execution environment semantics. #[derive(Clone, Debug, Encode, Decode, PartialEq, Eq, TypeInfo)] pub enum ExecutorParam { - /// ## Parameters setting the executuion environment semantics: - /// Max. memory size - MaxMemorySize(u32), + /// Maximum number of memory pages (64KiB bytes per page) the executor can allocate. + MaxMemoryPages(u32), /// Wasm logical stack size limit (max. number of Wasm values on stack) StackLogicalMax(u32), /// Executor machine stack size limit, in bytes