WASM Local-blob override (#7317)
* Provide WASM overwrite functionality in LocalCallExecutor - add a new module `wasm_overwrite.rs` in client - scrapes given folder for runtimes - add two new CLI Options `wasm-overwrite` and `wasm_overwrite_path` * formatting * Make comment clearer remove sc-runtime-test from dev-dependencies * comments * Update client/service/src/client/wasm_overwrite.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/service/src/client/wasm_overwrite.rs Co-authored-by: Bastian Köcher <[email protected]> * Fix spaces, remove call into backend for 'heap_pages' in 'try_replace' * Error if path is not a directory, Comments, Doc Comment for WasmOverwrite * make WasmOverwrite Option<> * Change to one CLI argument for overwrites - move getting runtime version into LocalCallExecutor * change unwrap() to expect() * comment * Remove `check_overwrites` * Encapsulate checking for overwrites in LocalCallExecutor * move duplicate code into function * Update client/cli/src/params/import_params.rs Co-authored-by: Bastian Köcher <[email protected]> * comma * Update client/service/src/client/wasm_overwrite.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/service/src/client/wasm_overwrite.rs Co-authored-by: Bastian Köcher <[email protected]> * cache hash in WasmBlob * Update client/service/src/client/wasm_overwrite.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/service/src/client/client.rs Co-authored-by: Bastian Köcher <[email protected]> * move getting overwrite into its own function * fix error when directory is not a directory * Error on duplicate WASM runtimes * better comment, grammar * docs * Revert StateBackend back to _ * Update client/service/src/client/wasm_overwrite.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/service/src/client/wasm_overwrite.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/service/src/client/call_executor.rs Co-authored-by: Bastian Köcher <[email protected]> * Add two tests, fix doc comments Add a test for the runtime_version method of WasmOverwrite Add a test for check_overwrite method of LocalCallExecutor * remove redundant `Return` from expect msg * Update client/cli/src/params/import_params.rs Co-authored-by: David <[email protected]> * Update client/service/src/client/call_executor.rs Co-authored-by: David <[email protected]> * Update client/service/src/client/wasm_overwrite.rs Co-authored-by: David <[email protected]> * Update client/service/src/config.rs Co-authored-by: David <[email protected]> * Update client/service/src/client/wasm_overwrite.rs Co-authored-by: David <[email protected]> * Add Module Documentation, match on '.wasm' extension * Add test for scraping WASM blob * fix expect * remove creating another block in LocalCallExecutor test * remove unused import * add tests for duplicates and scraping wasm * make tests a bit nicer * add test for ignoring non-.wasm files * check error message in test * Update client/service/src/client/wasm_overwrite.rs Co-authored-by: Bastian Köcher <[email protected]> * remove println * Update client/service/src/client/wasm_overwrite.rs Co-authored-by: Bastian Köcher <[email protected]> * make tests prettier * Update client/service/src/client/wasm_overwrite.rs Co-authored-by: Bastian Köcher <[email protected]> * comment for seemingly random client * locally-built -> custom * remove unused import * fix comment * rename all references to overwrite with override * fix cli flag in module documentation Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: David <[email protected]>
parent
891900a9
Please register or sign in to comment