Improve Runtime execution by caching runtime lookup (#276)
* Improve Runtime execution by caching runtime lookup Cache whether the native or wasm runtime should be used for a given code and if the latter, keep around the parsed wasmi::Module for faster execution. * Additional comment and code style fixes * Fallback to WASM runtime if we can't call the version function * The previous assumption that the wasm-code was compiled with rustc might be wrong now, that the code comes from the blockchain. Added Notes about that.
Showing
- substrate/Cargo.lock 3 additions, 0 deletionssubstrate/Cargo.lock
- substrate/substrate/executor/Cargo.toml 3 additions, 0 deletionssubstrate/substrate/executor/Cargo.toml
- substrate/substrate/executor/src/lib.rs 5 additions, 0 deletionssubstrate/substrate/executor/src/lib.rs
- substrate/substrate/executor/src/native_executor.rs 48 additions, 11 deletionssubstrate/substrate/executor/src/native_executor.rs
- substrate/substrate/executor/src/wasm_executor.rs 22 additions, 7 deletionssubstrate/substrate/executor/src/wasm_executor.rs
Please register or sign in to comment