diff --git a/substrate/core/test-runtime/src/system.rs b/substrate/core/test-runtime/src/system.rs index a119c8b62d..266b7130d4 100644 --- a/substrate/core/test-runtime/src/system.rs +++ b/substrate/core/test-runtime/src/system.rs @@ -21,7 +21,7 @@ use rstd::prelude::*; use runtime_io::{storage_root, enumerated_trie_root, storage_changes_root, twox_128}; use runtime_support::storage::{self, StorageValue, StorageMap}; use runtime_support::storage_items; -use runtime_primitives::traits::{Hash as HashT, BlakeTwo256, Digest as DigestT, NumberFor, Block as BlockT}; +use runtime_primitives::traits::{Hash as HashT, BlakeTwo256, Digest as DigestT}; use runtime_primitives::generic; use runtime_primitives::{ApplyError, ApplyOutcome, ApplyResult, transaction_validity::TransactionValidity}; use parity_codec::{KeyedVec, Encode}; @@ -70,15 +70,6 @@ pub fn initialize_block(header: &Header) { storage::unhashed::put(well_known_keys::EXTRINSIC_INDEX, &0u32); } -fn execute_extrinsics_without_checks(extrinsics: Vec<::Extrinsic>) { - // execute transactions - extrinsics.into_iter().enumerate().for_each(|(i, e)| { - storage::unhashed::put(well_known_keys::EXTRINSIC_INDEX, &(i as u32)); - execute_transaction_backend(&e).unwrap_or_else(|_| panic!("Invalid transaction")); - storage::unhashed::kill(well_known_keys::EXTRINSIC_INDEX); - }); -} - /// Actually execute all transitioning for `block`. pub fn polish_block(block: &mut Block) { let header = &mut block.header; @@ -120,7 +111,12 @@ pub fn execute_block(block: Block) { info_expect_equal_hash(&txs_root, &header.extrinsics_root); assert!(txs_root == header.extrinsics_root, "Transaction trie root must be valid."); - execute_extrinsics_without_checks(block.extrinsics); + // execute transactions + block.extrinsics.into_iter().enumerate().for_each(|(i, e)| { + storage::unhashed::put(well_known_keys::EXTRINSIC_INDEX, &(i as u32)); + execute_transaction_backend(&e).unwrap_or_else(|_| panic!("Invalid transaction")); + storage::unhashed::kill(well_known_keys::EXTRINSIC_INDEX); + }); // check storage root. let storage_root = storage_root().into(); @@ -145,10 +141,6 @@ impl executive::ExecuteBlock for BlockExecutor { fn execute_block(block: Block) { execute_block(block); } - - fn execute_extrinsics_without_checks(_: NumberFor, extrinsics: Vec<::Extrinsic>) { - execute_extrinsics_without_checks(extrinsics); - } } /// Execute a transaction outside of the block execution function. diff --git a/substrate/core/test-runtime/wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm b/substrate/core/test-runtime/wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm index 7b81180d05..efeca728ef 100644 Binary files a/substrate/core/test-runtime/wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm and b/substrate/core/test-runtime/wasm/target/wasm32-unknown-unknown/release/substrate_test_runtime.compact.wasm differ diff --git a/substrate/node/runtime/src/lib.rs b/substrate/node/runtime/src/lib.rs index cdab34ed9e..e028df0a62 100644 --- a/substrate/node/runtime/src/lib.rs +++ b/substrate/node/runtime/src/lib.rs @@ -59,8 +59,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("node"), impl_name: create_runtime_str!("substrate-node"), authoring_version: 10, - spec_version: 54, - impl_version: 54, + spec_version: 55, + impl_version: 55, apis: RUNTIME_API_VERSIONS, }; diff --git a/substrate/node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm b/substrate/node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm index e3ea2c3402..a58047ecfb 100644 Binary files a/substrate/node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm and b/substrate/node/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm differ diff --git a/substrate/srml/executive/src/lib.rs b/substrate/srml/executive/src/lib.rs index 48908a01b3..37b1b709f7 100644 --- a/substrate/srml/executive/src/lib.rs +++ b/substrate/srml/executive/src/lib.rs @@ -52,8 +52,6 @@ mod internal { pub trait ExecuteBlock { /// Actually execute all transitioning for `block`. fn execute_block(block: Block); - /// Execute all extrinsics like when executing a `block`, but with dropping intial and final checks. - fn execute_extrinsics_without_checks(block_number: NumberFor, extrinsics: Vec); } pub struct Executive( @@ -75,10 +73,6 @@ impl< fn execute_block(block: Block) { Executive::::execute_block(block); } - - fn execute_extrinsics_without_checks(block_number: NumberFor, extrinsics: Vec) { - Executive::::execute_extrinsics_without_checks(block_number, extrinsics); - } } impl< @@ -134,18 +128,6 @@ impl< Self::final_checks(&header); } - /// Execute all extrinsics like when executing a `block`, but with dropping intial and final checks. - pub fn execute_extrinsics_without_checks(block_number: NumberFor, extrinsics: Vec) { - // Make the api happy, but maybe we should not set them at all. - let parent_hash = ::Hashing::hash(b"parent_hash"); - let extrinsics_root = ::Hashing::hash(b"extrinsics_root"); - - Self::initialize_block_impl(&block_number, &parent_hash, &extrinsics_root); - - // execute extrinsics - Self::execute_extrinsics_with_book_keeping(extrinsics, block_number); - } - /// Execute given extrinsics and take care of post-extrinsics book-keeping fn execute_extrinsics_with_book_keeping(extrinsics: Vec, block_number: NumberFor) { extrinsics.into_iter().for_each(Self::apply_extrinsic_no_note);