diff --git a/lib/src/executor/host.rs b/lib/src/executor/host.rs index 33cf1a9f54..73894782b5 100644 --- a/lib/src/executor/host.rs +++ b/lib/src/executor/host.rs @@ -2290,6 +2290,22 @@ impl ReadyToRun { }, } } + HostFunction::ext_transaction_index_index_version_1 => { + // TODO: this is currently a no-op; because not all the parameters are verified, this might lead to consensus issues + let _tx_ptr = expect_pointer_size_raw!(0); + HostVm::ReadyToRun(ReadyToRun { + inner: self.inner, + resume_value: None, + }) + } + HostFunction::ext_transaction_index_renew_version_1 => { + // TODO: this is currently a no-op; because not all the parameters are verified, this might lead to consensus issues + let _tx_ptr = expect_pointer_size_raw!(0); + HostVm::ReadyToRun(ReadyToRun { + inner: self.inner, + resume_value: None, + }) + } } } } diff --git a/lib/src/executor/host/functions.rs b/lib/src/executor/host/functions.rs index c20fd490d6..fcf4d07ebe 100644 --- a/lib/src/executor/host/functions.rs +++ b/lib/src/executor/host/functions.rs @@ -156,6 +156,8 @@ host_functions! { ext_logging_log_version_1, ext_logging_max_level_version_1, ext_panic_handler_abort_on_panic_version_1, + ext_transaction_index_index_version_1, + ext_transaction_index_renew_version_1, } impl HostFunction { @@ -456,6 +458,12 @@ impl HostFunction { HostFunction::ext_panic_handler_abort_on_panic_version_1 => { crate::signature!((vm::ValueType::I64) => ()) } + HostFunction::ext_transaction_index_index_version_1 => { + crate::signature!((vm::ValueType::I32, vm::ValueType::I32, vm::ValueType::I32) => ()) + } + HostFunction::ext_transaction_index_renew_version_1 => { + crate::signature!((vm::ValueType::I32, vm::ValueType::I32) => ()) + } } } } diff --git a/wasm-node/CHANGELOG.md b/wasm-node/CHANGELOG.md index a943ee6060..ff2a923548 100644 --- a/wasm-node/CHANGELOG.md +++ b/wasm-node/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Added + +- Add support for the `ext_transaction_index_index_version_1` and `ext_transaction_index_renew_version_1` host functions as no-op. ([#2189](https://github.com/smol-dot/smoldot/pull/2189)) + ## 2.0.39 - 2025-09-15 ### Fixed