Parachain validation moved to external process (#325)

* Improved execution & tests

* Style

* Made CLI arg const

* Moved Upwards message

* CLI subcommand for validation worker

* Build halting parachain

* Build halting parachain

* Made stuff private

* Reorganized parachain tests

* Comment

* Whitespace

* Apply suggestions from code review

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Fixed call data size check and introduced an enum

* Apply suggestions from code review

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Arkadiy Paronyan
2019-07-23 11:09:30 +02:00
committed by Bastian Köcher
parent 157cd9a217
commit f1fdb0cb83
19 changed files with 1076 additions and 417 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ use polkadot_primitives::{Block, Hash, BlockId, Balance, parachain::{
Id as ParaId, Collation, Extrinsic, OutgoingMessage, UpwardMessage, FeeSchedule,
}};
use runtime_primitives::traits::ProvideRuntimeApi;
use parachain::{wasm_executor::{self, ExternalitiesError}, MessageRef, UpwardMessageRef};
use parachain::{wasm_executor::{self, ExternalitiesError, ExecutionMode}, MessageRef, UpwardMessageRef};
use futures::prelude::*;
use log::debug;
@@ -434,7 +434,7 @@ pub fn validate_collation<P>(
fees_charged: 0,
};
match wasm_executor::validate_candidate(&validation_code, params, &mut ext) {
match wasm_executor::validate_candidate(&validation_code, params, &mut ext, ExecutionMode::Remote) {
Ok(result) => {
if result.head_data == collation.receipt.head_data.0 {
ext.final_checks(&collation.receipt)