From b0965ddb87247092fe7cc60407691c16f868af45 Mon Sep 17 00:00:00 2001 From: Dmitry Sinyavin Date: Wed, 5 Apr 2023 09:53:00 +0100 Subject: [PATCH] Expose WASM bulk memory extension in execution environment parameters --- node/core/pvf/src/executor_intf.rs | 1 + primitives/src/v4/executor_params.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/node/core/pvf/src/executor_intf.rs b/node/core/pvf/src/executor_intf.rs index 7ea263b4ae6e..1092e97c5e01 100644 --- a/node/core/pvf/src/executor_intf.rs +++ b/node/core/pvf/src/executor_intf.rs @@ -133,6 +133,7 @@ fn params_to_wasmtime_semantics(par: &ExecutorParams) -> Result stack_limit.logical_max = *slm, ExecutorParam::StackNativeMax(snm) => stack_limit.native_stack_max = *snm, + ExecutorParam::WasmExtBulkMemory => sem.wasm_bulk_memory = true, ExecutorParam::PrecheckingMaxMemory(_) => (), // TODO: Not implemented yet ExecutorParam::PvfPrepTimeout(_, _) | ExecutorParam::PvfExecTimeout(_, _) => (), // Not used here } diff --git a/primitives/src/v4/executor_params.rs b/primitives/src/v4/executor_params.rs index 56d3e446d0c5..0f7665f72029 100644 --- a/primitives/src/v4/executor_params.rs +++ b/primitives/src/v4/executor_params.rs @@ -49,6 +49,9 @@ pub enum ExecutorParam { /// PVF execution timeouts, millisec #[codec(index = 6)] PvfExecTimeout(PvfExecTimeoutKind, u64), + /// Enables WASM bulk memory proposal + #[codec(index = 7)] + WasmExtBulkMemory, } /// Unit type wrapper around [`type@Hash`] that represents an execution parameter set hash.