diff --git a/node/core/pvf/src/executor_intf.rs b/node/core/pvf/src/executor_intf.rs index c5578f5f81ad..976cfd8f8200 100644 --- a/node/core/pvf/src/executor_intf.rs +++ b/node/core/pvf/src/executor_intf.rs @@ -25,6 +25,7 @@ use sp_core::storage::{ChildInfo, TrackedStorageKey}; use sp_externalities::MultiRemovalResults; use std::{ any::{Any, TypeId}, + borrow::Cow, path::Path, }; @@ -227,19 +228,25 @@ type HostFunctions = ( struct ValidationExternalities(sp_externalities::Extensions); impl sp_externalities::Externalities for ValidationExternalities { - fn storage(&self, _: &[u8]) -> Option> { + fn storage(&mut self, _: &[u8], _: u32, _: Option) -> Option> { panic!("storage: unsupported feature for parachain validation") } - fn storage_hash(&self, _: &[u8]) -> Option> { + fn storage_hash(&mut self, _: &[u8]) -> Option> { panic!("storage_hash: unsupported feature for parachain validation") } - fn child_storage_hash(&self, _: &ChildInfo, _: &[u8]) -> Option> { + fn child_storage_hash(&mut self, _: &ChildInfo, _: &[u8]) -> Option> { panic!("child_storage_hash: unsupported feature for parachain validation") } - fn child_storage(&self, _: &ChildInfo, _: &[u8]) -> Option> { + fn child_storage( + &mut self, + _: &ChildInfo, + _: &[u8], + _: u32, + _: Option, + ) -> Option> { panic!("child_storage: unsupported feature for parachain validation") } @@ -275,7 +282,7 @@ impl sp_externalities::Externalities for ValidationExternalities { panic!("place_storage: unsupported feature for parachain validation") } - fn place_child_storage(&mut self, _: &ChildInfo, _: Vec, _: Option>) { + fn place_child_storage(&mut self, _: &ChildInfo, _: &[u8], _: Option<&[u8]>) -> bool { panic!("place_child_storage: unsupported feature for parachain validation") } @@ -283,15 +290,28 @@ impl sp_externalities::Externalities for ValidationExternalities { panic!("storage_root: unsupported feature for parachain validation") } - fn child_storage_root(&mut self, _: &ChildInfo, _: sp_core::storage::StateVersion) -> Vec { + fn child_storage_root( + &mut self, + _: &ChildInfo, + _: sp_core::storage::StateVersion, + ) -> Option> { panic!("child_storage_root: unsupported feature for parachain validation") } - fn next_child_storage_key(&self, _: &ChildInfo, _: &[u8]) -> Option> { + fn next_child_storage_key( + &mut self, + child_info: &ChildInfo, + key: &[u8], + count: u32, + ) -> Option>> { panic!("next_child_storage_key: unsupported feature for parachain validation") } - fn next_storage_key(&self, _: &[u8]) -> Option> { + fn next_storage_key(&mut self, _: &[u8]) -> Option> { + panic!("next_storage_key: unsupported feature for parachain validation") + } + + fn child_storage_len(&mut self, _: &ChildInfo, _: &[u8]) -> Option { panic!("next_storage_key: unsupported feature for parachain validation") }