Narrow the set of available host functions for PVF (#3005)

This commit is contained in:
Sergei Shulepov
2021-05-13 12:15:46 +02:00
committed by GitHub
parent 60fbca3c2a
commit d326c3431e
2 changed files with 159 additions and 152 deletions
+151 -151
View File
File diff suppressed because it is too large Load Diff
+8 -1
View File
@@ -79,7 +79,14 @@ pub fn execute(
})?
}
type HostFunctions = sp_io::SubstrateHostFunctions;
type HostFunctions = (
sp_io::misc::HostFunctions,
sp_io::crypto::HostFunctions,
sp_io::hashing::HostFunctions,
sp_io::allocator::HostFunctions,
sp_io::logging::HostFunctions,
sp_io::trie::HostFunctions,
);
/// The validation externalities that will panic on any storage related access.
struct ValidationExternalities(sp_externalities::Extensions);