Use wasm-builder from git (#3354)

* Use wasm-builder from git

This brings new features like compressed runtimes out of the box.

* chore: update wasm builder dep. from 3.0.0 to master

* Fix tests

* Update node/core/pvf/tests/it/main.rs

Co-authored-by: Sergei Shulepov <sergei@parity.io>

Co-authored-by: chevdor <chevdor@gmail.com>
Co-authored-by: Sergei Shulepov <sergei@parity.io>
This commit is contained in:
Bastian Köcher
2021-06-28 10:34:47 +02:00
committed by GitHub
parent feefc34567
commit ab6c79ecb6
11 changed files with 32 additions and 17 deletions
+5 -4
View File
@@ -15,9 +15,7 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
use polkadot_node_core_pvf::{Pvf, ValidationHost, start, Config, InvalidCandidate, ValidationError};
use polkadot_parachain::{
primitives::{BlockData, ValidationParams, ValidationResult},
};
use polkadot_parachain::primitives::{BlockData, ValidationParams, ValidationResult};
use parity_scale_codec::Encode as _;
use async_std::sync::Mutex;
@@ -58,11 +56,14 @@ impl TestHost {
params: ValidationParams,
) -> Result<ValidationResult, ValidationError> {
let (result_tx, result_rx) = futures::channel::oneshot::channel();
let code = sp_maybe_compressed_blob::decompress(code, 16 * 1024 * 1024).expect("Compression works");
self.host
.lock()
.await
.execute_pvf(
Pvf::from_code(code.to_vec()),
Pvf::from_code(code.into()),
params.encode(),
polkadot_node_core_pvf::Priority::Normal,
result_tx,