git.delta.rocks / unique-network / refs/commits / c1b33f8c7689

difftreelog

Update to alpha.6

Ricardo Rius2020-04-15parent: #4be00bd.patch.diff
in: master

13 files changed

modifiedCargo.lockdiffbeforeafterboth
before · Cargo.lock
554 packageslockfile v1
after · Cargo.lock
552 packageslockfile v1
modifiedCargo.tomldiffbeforeafterboth
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,9 +1,8 @@
-[profile.release]
-panic = 'unwind'
-
 [workspace]
 members = [
     'node',
     'pallets/template',
     'runtime',
 ]
+[profile.release]
+panic = 'unwind'
modifiednode/Cargo.tomldiffbeforeafterboth
--- a/node/Cargo.toml
+++ b/node/Cargo.toml
@@ -1,81 +1,78 @@
 [package]
 authors = ['Anonymous']
 build = 'build.rs'
+description = 'Substrate Node template'
 edition = '2018'
 homepage = 'https://substrate.dev'
 license = 'Unlicense'
 name = 'node-template'
 repository = 'https://github.com/paritytech/substrate/'
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
-[build-dependencies]
-vergen = '3.0.4'
-
-[build-dependencies.build-script-utils]
-package = 'substrate-build-script-utils'
-version = '2.0.0-alpha.5'
+[package.metadata.docs.rs]
+targets = ['x86_64-unknown-linux-gnu']
 
 [dependencies]
-futures = '0.3.1'
+futures = '0.3.4'
 log = '0.4.8'
 structopt = '0.3.8'
 
-[dependencies.grandpa]
-package = 'sc-finality-grandpa'
-version = '0.8.0-alpha.5'
-
-[dependencies.grandpa-primitives]
-package = 'sp-finality-grandpa'
-version = '2.0.0-alpha.5'
-
 [dependencies.node-template-runtime]
 path = '../runtime'
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sc-basic-authorship]
-version = '0.8.0-alpha.5'
+version = '0.8.0-alpha.6'
 
 [dependencies.sc-cli]
-version = '0.8.0-alpha.5'
+version = '0.8.0-alpha.6'
 
 [dependencies.sc-client]
-version = '0.8.0-alpha.5'
+version = '0.8.0-alpha.6'
 
 [dependencies.sc-client-api]
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sc-consensus-aura]
-version = '0.8.0-alpha.5'
+version = '0.8.0-alpha.6'
 
 [dependencies.sc-executor]
-version = '0.8.0-alpha.5'
+version = '0.8.0-alpha.6'
+
+[dependencies.sc-finality-grandpa]
+version = '0.8.0-alpha.6'
 
 [dependencies.sc-network]
-version = '0.8.0-alpha.5'
+version = '0.8.0-alpha.6'
 
 [dependencies.sc-service]
-version = '0.8.0-alpha.5'
+version = '0.8.0-alpha.6'
 
 [dependencies.sc-transaction-pool]
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-consensus]
-version = '0.8.0-alpha.5'
+version = '0.8.0-alpha.6'
 
 [dependencies.sp-consensus-aura]
-version = '0.8.0-alpha.5'
+version = '0.8.0-alpha.6'
 
 [dependencies.sp-core]
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
+
+[dependencies.sp-finality-grandpa]
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-inherents]
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-runtime]
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-transaction-pool]
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
+[build-dependencies.substrate-build-script-utils]
+version = '2.0.0-alpha.6'
 
 [[bin]]
 name = 'node-template'
modifiednode/build.rsdiffbeforeafterboth
--- a/node/build.rs
+++ b/node/build.rs
@@ -1,9 +1,7 @@
-use vergen::{ConstantsFlags, generate_cargo_keys};
-
-const ERROR_MSG: &str = "Failed to generate metadata files";
+use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
 
 fn main() {
-	generate_cargo_keys(ConstantsFlags::SHA_SHORT).expect(ERROR_MSG);
+	generate_cargo_keys();
 
-	build_script_utils::rerun_if_git_head_changed();
+	rerun_if_git_head_changed();
 }
modifiednode/src/chain_spec.rsdiffbeforeafterboth
--- a/node/src/chain_spec.rs
+++ b/node/src/chain_spec.rs
@@ -3,10 +3,10 @@
 	AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig,
 	SudoConfig, SystemConfig, WASM_BINARY, Signature
 };
-use sp_consensus_aura::sr25519::{AuthorityId as AuraId};
-use grandpa_primitives::{AuthorityId as GrandpaId};
-use sc_service;
+use sp_consensus_aura::sr25519::AuthorityId as AuraId;
+use sp_finality_grandpa::AuthorityId as GrandpaId;
 use sp_runtime::traits::{Verify, IdentifyAccount};
+use sc_service::ChainType;
 
 // Note this is the URL for the telemetry server
 //const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
@@ -14,17 +14,6 @@
 /// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
 pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig>;
 
-/// The chain specification option. This is expected to come in from the CLI and
-/// is little more than one of a number of alternatives which can easily be converted
-/// from a string (`--chain=...`) into a `ChainSpec`.
-#[derive(Clone, Debug)]
-pub enum Alternative {
-	/// Whatever the current runtime is, with just Alice as an auth.
-	Development,
-	/// Whatever the current runtime is, with simple Alice/Bob auths.
-	LocalTestnet,
-}
-
 /// Helper function to generate a crypto pair from seed
 pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
 	TPublic::Pair::from_string(&format!("//{}", seed), None)
@@ -42,80 +31,72 @@
 }
 
 /// Helper function to generate an authority key for Aura
-pub fn get_authority_keys_from_seed(s: &str) -> (AuraId, GrandpaId) {
+pub fn authority_keys_from_seed(s: &str) -> (AuraId, GrandpaId) {
 	(
 		get_from_seed::<AuraId>(s),
 		get_from_seed::<GrandpaId>(s),
 	)
 }
 
-impl Alternative {
-	/// Get an actual chain config from one of the alternatives.
-	pub(crate) fn load(self) -> Result<ChainSpec, String> {
-		Ok(match self {
-			Alternative::Development => ChainSpec::from_genesis(
-				"Development",
-				"dev",
-				|| testnet_genesis(
-					vec![
-						get_authority_keys_from_seed("Alice"),
-					],
-					get_account_id_from_seed::<sr25519::Public>("Alice"),
-					vec![
-						get_account_id_from_seed::<sr25519::Public>("Alice"),
-						get_account_id_from_seed::<sr25519::Public>("Bob"),
-						get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
-						get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
-					],
-					true,
-				),
-				vec![],
-				None,
-				None,
-				None,
-				None
-			),
-			Alternative::LocalTestnet => ChainSpec::from_genesis(
-				"Local Testnet",
-				"local_testnet",
-				|| testnet_genesis(
-					vec![
-						get_authority_keys_from_seed("Alice"),
-						get_authority_keys_from_seed("Bob"),
-					],
-					get_account_id_from_seed::<sr25519::Public>("Alice"),
-					vec![
-						get_account_id_from_seed::<sr25519::Public>("Alice"),
-						get_account_id_from_seed::<sr25519::Public>("Bob"),
-						get_account_id_from_seed::<sr25519::Public>("Charlie"),
-						get_account_id_from_seed::<sr25519::Public>("Dave"),
-						get_account_id_from_seed::<sr25519::Public>("Eve"),
-						get_account_id_from_seed::<sr25519::Public>("Ferdie"),
-						get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
-						get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
-						get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),
-						get_account_id_from_seed::<sr25519::Public>("Dave//stash"),
-						get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
-						get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
-					],
-					true,
-				),
-				vec![],
-				None,
-				None,
-				None,
-				None
-			),
-		})
-	}
+pub fn development_config() -> ChainSpec {
+	ChainSpec::from_genesis(
+		"Development",
+		"dev",
+		ChainType::Development,
+		|| testnet_genesis(
+			vec![
+				authority_keys_from_seed("Alice"),
+			],
+			get_account_id_from_seed::<sr25519::Public>("Alice"),
+			vec![
+				get_account_id_from_seed::<sr25519::Public>("Alice"),
+				get_account_id_from_seed::<sr25519::Public>("Bob"),
+				get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
+				get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
+			],
+			true,
+		),
+		vec![],
+		None,
+		None,
+		None,
+		None,
+	)
+}
 
-	pub(crate) fn from(s: &str) -> Option<Self> {
-		match s {
-			"dev" => Some(Alternative::Development),
-			"" | "local" => Some(Alternative::LocalTestnet),
-			_ => None,
-		}
-	}
+pub fn local_testnet_config() -> ChainSpec {
+	ChainSpec::from_genesis(
+		"Local Testnet",
+		"local_testnet",
+		ChainType::Local,
+		|| testnet_genesis(
+			vec![
+				authority_keys_from_seed("Alice"),
+				authority_keys_from_seed("Bob"),
+			],
+			get_account_id_from_seed::<sr25519::Public>("Alice"),
+			vec![
+				get_account_id_from_seed::<sr25519::Public>("Alice"),
+				get_account_id_from_seed::<sr25519::Public>("Bob"),
+				get_account_id_from_seed::<sr25519::Public>("Charlie"),
+				get_account_id_from_seed::<sr25519::Public>("Dave"),
+				get_account_id_from_seed::<sr25519::Public>("Eve"),
+				get_account_id_from_seed::<sr25519::Public>("Ferdie"),
+				get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
+				get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
+				get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),
+				get_account_id_from_seed::<sr25519::Public>("Dave//stash"),
+				get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
+				get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
+			],
+			true,
+		),
+		vec![],
+		None,
+		None,
+		None,
+		None,
+	)
 }
 
 fn testnet_genesis(initial_authorities: Vec<(AuraId, GrandpaId)>,
@@ -140,11 +121,4 @@
 			key: root_key,
 		}),
 	}
-}
-
-pub fn load_spec(id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> {
-	Ok(match Alternative::from(id) {
-		Some(spec) => Box::new(spec.load()?),
-		None => Box::new(ChainSpec::from_json_file(std::path::PathBuf::from(id))?),
-	})
 }
modifiednode/src/command.rsdiffbeforeafterboth
--- a/node/src/command.rs
+++ b/node/src/command.rs
@@ -14,36 +14,68 @@
 // You should have received a copy of the GNU General Public License
 // along with Substrate.  If not, see <http://www.gnu.org/licenses/>.
 
-use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
-use sc_cli::VersionInfo;
-use crate::service;
 use crate::chain_spec;
 use crate::cli::Cli;
+use crate::service;
+use sc_cli::SubstrateCli;
+use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
+
+impl SubstrateCli for Cli {
+	fn impl_name() -> &'static str {
+		"Substrate Node"
+	}
+
+	fn impl_version() -> &'static str {
+		env!("SUBSTRATE_CLI_IMPL_VERSION")
+	}
+
+	fn description() -> &'static str {
+		env!("CARGO_PKG_DESCRIPTION")
+	}
+
+	fn author() -> &'static str {
+		env!("CARGO_PKG_AUTHORS")
+	}
+
+	fn support_url() -> &'static str {
+		"support.anonymous.an"
+	}
+
+	fn copyright_start_year() -> i32 {
+		2017
+	}
+
+	fn executable_name() -> &'static str {
+		env!("CARGO_PKG_NAME")
+	}
+
+	fn load_spec(&self, id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> {
+		Ok(match id {
+			"dev" => Box::new(chain_spec::development_config()),
+			"" | "local" => Box::new(chain_spec::local_testnet_config()),
+			path => Box::new(chain_spec::ChainSpec::from_json_file(
+				std::path::PathBuf::from(path),
+			)?),
+		})
+	}
+}
 
 /// Parse and run command line arguments
-pub fn run(version: VersionInfo) -> sc_cli::Result<()> {
-	let opt = sc_cli::from_args::<Cli>(&version);
-
-	let mut config = sc_service::Configuration::from_version(&version);
+pub fn run() -> sc_cli::Result<()> {
+	let cli = Cli::from_args();
 
-	match opt.subcommand {
+	match &cli.subcommand {
 		Some(subcommand) => {
-			subcommand.init(&version)?;
-			subcommand.update_config(&mut config, chain_spec::load_spec, &version)?;
-			subcommand.run(
-				config,
-				|config: _| Ok(new_full_start!(config).0),
-			)
-		},
+			let runner = cli.create_runner(subcommand)?;
+			runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config).0))
+		}
 		None => {
-			opt.run.init(&version)?;
-			opt.run.update_config(&mut config, chain_spec::load_spec, &version)?;
-			opt.run.run(
-				config,
+			let runner = cli.create_runner(&cli.run)?;
+			runner.run_node(
 				service::new_light,
 				service::new_full,
-				&version,
+				node_template_runtime::VERSION
 			)
-		},
+		}
 	}
 }
modifiednode/src/main.rsdiffbeforeafterboth
--- a/node/src/main.rs
+++ b/node/src/main.rs
@@ -8,16 +8,5 @@
 mod command;
 
 fn main() -> sc_cli::Result<()> {
-	let version = sc_cli::VersionInfo {
-		name: "Substrate Node",
-		commit: env!("VERGEN_SHA_SHORT"),
-		version: env!("CARGO_PKG_VERSION"),
-		executable_name: "node-template",
-		author: "Anonymous",
-		description: "Template Node",
-		support_url: "support.anonymous.an",
-		copyright_start_year: 2017,
-	};
-
-	command::run(version)
+	command::run()
 }
modifiednode/src/service.rsdiffbeforeafterboth
--- a/node/src/service.rs
+++ b/node/src/service.rs
@@ -10,7 +10,7 @@
 use sc_executor::native_executor_instance;
 pub use sc_executor::NativeExecutor;
 use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
-use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider, StorageAndProofProvider};
+use sc_finality_grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider, StorageAndProofProvider};
 
 // Our native executor instance.
 native_executor_instance!(
@@ -44,7 +44,7 @@
 					.ok_or_else(|| sc_service::Error::SelectChainRequired)?;
 
 				let (grandpa_block_import, grandpa_link) =
-					grandpa::block_import(client.clone(), &(client.clone() as Arc<_>), select_chain)?;
+					sc_finality_grandpa::block_import(client.clone(), &(client.clone() as Arc<_>), select_chain)?;
 
 				let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(
 					grandpa_block_import.clone(), client.clone(),
@@ -72,16 +72,11 @@
 pub fn new_full(config: Configuration)
 	-> Result<impl AbstractService, ServiceError>
 {
-	let is_authority = config.roles.is_authority();
+	let role = config.role.clone();
 	let force_authoring = config.force_authoring;
-	let name = config.name.clone();
+	let name = config.network.node_name.clone();
 	let disable_grandpa = config.disable_grandpa;
 
-	// sentry nodes announce themselves as authorities to the network
-	// and should run the same protocols authorities do, but it should
-	// never actively participate in any consensus process.
-	let participates_in_consensus = is_authority && !config.sentry_mode;
-
 	let (builder, mut import_setup, inherent_data_providers) = new_full_start!(config);
 
 	let (block_import, grandpa_link) =
@@ -96,11 +91,9 @@
 		})?
 		.build()?;
 
-	if participates_in_consensus {
-		let proposer = sc_basic_authorship::ProposerFactory::new(
-			service.client(),
-			service.transaction_pool()
-		);
+	if role.is_authority() {
+		let proposer =
+			sc_basic_authorship::ProposerFactory::new(service.client(), service.transaction_pool());
 
 		let client = service.client();
 		let select_chain = service.select_chain()
@@ -129,20 +122,20 @@
 
 	// if the node isn't actively participating in consensus then it doesn't
 	// need a keystore, regardless of which protocol we use below.
-	let keystore = if participates_in_consensus {
+	let keystore = if role.is_authority() {
 		Some(service.keystore())
 	} else {
 		None
 	};
 
-	let grandpa_config = grandpa::Config {
+	let grandpa_config = sc_finality_grandpa::Config {
 		// FIXME #1578 make this available through chainspec
 		gossip_duration: Duration::from_millis(333),
 		justification_period: 512,
 		name: Some(name),
 		observer_enabled: false,
 		keystore,
-		is_authority,
+		is_authority: role.is_network_authority(),
 	};
 
 	let enable_grandpa = !disable_grandpa;
@@ -153,13 +146,13 @@
 		// and vote data availability than the observer. The observer has not
 		// been tested extensively yet and having most nodes in a network run it
 		// could lead to finality stalls.
-		let grandpa_config = grandpa::GrandpaParams {
+		let grandpa_config = sc_finality_grandpa::GrandpaParams {
 			config: grandpa_config,
 			link: grandpa_link,
 			network: service.network(),
 			inherent_data_providers: inherent_data_providers.clone(),
 			telemetry_on_connect: Some(service.telemetry_on_connect_stream()),
-			voting_rule: grandpa::VotingRulesBuilder::default().build(),
+			voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
 			prometheus_registry: service.prometheus_registry()
 		};
 
@@ -167,10 +160,10 @@
 		// if it fails we take down the service with it.
 		service.spawn_essential_task(
 			"grandpa-voter",
-			grandpa::run_grandpa_voter(grandpa_config)?
+			sc_finality_grandpa::run_grandpa_voter(grandpa_config)?
 		);
 	} else {
-		grandpa::setup_disabled_grandpa(
+		sc_finality_grandpa::setup_disabled_grandpa(
 			service.client(),
 			&inherent_data_providers,
 			service.network(),
@@ -204,7 +197,7 @@
 			let fetch_checker = fetcher
 				.map(|fetcher| fetcher.checker().clone())
 				.ok_or_else(|| "Trying to start light import queue without active fetch checker")?;
-			let grandpa_block_import = grandpa::light_block_import(
+			let grandpa_block_import = sc_finality_grandpa::light_block_import(
 				client.clone(),
 				backend,
 				&(client.clone() as Arc<_>),
modifiedpallets/template/Cargo.tomldiffbeforeafterboth
--- a/pallets/template/Cargo.toml
+++ b/pallets/template/Cargo.toml
@@ -6,44 +6,40 @@
 license = 'Unlicense'
 name = 'pallet-template'
 repository = 'https://github.com/paritytech/substrate/'
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
+[package.metadata.docs.rs]
+targets = ['x86_64-unknown-linux-gnu']
+
 [dependencies.codec]
 default-features = false
 features = ['derive']
 package = 'parity-scale-codec'
-version = '1.2.0'
+version = '1.3.0'
 
 [dependencies.frame-support]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
-[dependencies.safe-mix]
+[dependencies.frame-system]
 default-features = false
-version = '1.0.0'
-
-[dependencies.system]
-default-features = false
-package = 'frame-system'
-version = '2.0.0-alpha.5'
-
+version = '2.0.0-alpha.6'
 [dev-dependencies.sp-core]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dev-dependencies.sp-io]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dev-dependencies.sp-runtime]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [features]
 default = ['std']
 std = [
     'codec/std',
     'frame-support/std',
-    'safe-mix/std',
-    'system/std',
+    'frame-system/std',
 ]
modifiedpallets/template/src/lib.rsdiffbeforeafterboth
--- a/pallets/template/src/lib.rs
+++ b/pallets/template/src/lib.rs
@@ -10,7 +10,7 @@
 /// https://github.com/paritytech/substrate/blob/master/frame/example/src/lib.rs
 
 use frame_support::{decl_module, decl_storage, decl_event, decl_error, dispatch};
-use system::ensure_signed;
+use frame_system::{self as system, ensure_signed};
 
 #[cfg(test)]
 mod mock;
@@ -75,6 +75,7 @@
 		/// Just a dummy entry point.
 		/// function that can be called by the external world as an extrinsics call
 		/// takes a parameter of the type `AccountId`, stores it, and emits an event
+		#[weight = frame_support::weights::SimpleDispatchInfo::default()]
 		pub fn do_something(origin, something: u32) -> dispatch::DispatchResult {
 			// Check it was signed and get the signer. See also: ensure_root and ensure_none
 			let who = ensure_signed(origin)?;
@@ -90,6 +91,7 @@
 
 		/// Another dummy entry point.
 		/// takes no parameters, attempts to increment storage value, and possibly throws an error
+		#[weight = frame_support::weights::SimpleDispatchInfo::default()]
 		pub fn cause_error(origin) -> dispatch::DispatchResult {
 			// Check it was signed and get the signer. See also: ensure_root and ensure_none
 			let _who = ensure_signed(origin)?;
modifiedpallets/template/src/mock.rsdiffbeforeafterboth
--- a/pallets/template/src/mock.rs
+++ b/pallets/template/src/mock.rs
@@ -6,6 +6,7 @@
 use sp_runtime::{
 	traits::{BlakeTwo256, IdentityLookup}, testing::Header, Perbill,
 };
+use frame_system as system;
 
 impl_outer_origin! {
 	pub enum Origin for Test {}
modifiedruntime/Cargo.tomldiffbeforeafterboth
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -1,45 +1,36 @@
-[package]
-authors = ['Anonymous']
-edition = '2018'
-homepage = 'https://substrate.dev'
-license = 'Unlicense'
-name = 'node-template-runtime'
-repository = 'https://github.com/paritytech/substrate/'
-version = '2.0.0-alpha.5'
-
 [dependencies.aura]
 default-features = false
 package = 'pallet-aura'
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.balances]
 default-features = false
 package = 'pallet-balances'
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.codec]
 default-features = false
 features = ['derive']
 package = 'parity-scale-codec'
-version = '1.2.0'
+version = '1.3.0'
 
 [dependencies.frame-executive]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.frame-support]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.grandpa]
 default-features = false
 package = 'pallet-grandpa'
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.randomness-collective-flip]
 default-features = false
 package = 'pallet-randomness-collective-flip'
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.serde]
 features = ['derive']
@@ -48,81 +39,94 @@
 
 [dependencies.sp-api]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-block-builder]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-consensus-aura]
 default-features = false
-version = '0.8.0-alpha.5'
+version = '0.8.0-alpha.6'
 
 [dependencies.sp-core]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-inherents]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-io]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-offchain]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-runtime]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-session]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-std]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-transaction-pool]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sp-version]
 default-features = false
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.sudo]
 default-features = false
 package = 'pallet-sudo'
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.system]
 default-features = false
 package = 'frame-system'
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.template]
 default-features = false
 package = 'pallet-template'
 path = '../pallets/template'
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.timestamp]
 default-features = false
 package = 'pallet-timestamp'
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
 
 [dependencies.transaction-payment]
 default-features = false
 package = 'pallet-transaction-payment'
-version = '2.0.0-alpha.5'
+version = '2.0.0-alpha.6'
+
 [build-dependencies.wasm-builder-runner]
 package = 'substrate-wasm-builder-runner'
 version = '1.0.5'
 
+[package]
+authors = ['Anonymous']
+edition = '2018'
+homepage = 'https://substrate.dev'
+license = 'Unlicense'
+name = 'node-template-runtime'
+repository = 'https://github.com/paritytech/substrate/'
+version = '2.0.0-alpha.6'
+
+[package.metadata.docs.rs]
+targets = ['x86_64-unknown-linux-gnu']
+
 [features]
 default = ['std']
 std = [
modifiedruntime/src/lib.rsdiffbeforeafterboth
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -11,8 +11,8 @@
 use sp_std::prelude::*;
 use sp_core::OpaqueMetadata;
 use sp_runtime::{
-	ApplyExtrinsicResult, transaction_validity::TransactionValidity, generic, create_runtime_str,
-	impl_opaque_keys, MultiSignature,
+	ApplyExtrinsicResult, generic, create_runtime_str, impl_opaque_keys, MultiSignature,
+	transaction_validity::{TransactionValidity, TransactionSource},
 };
 use sp_runtime::traits::{
 	BlakeTwo256, Block as BlockT, IdentityLookup, Verify, ConvertInto, IdentifyAccount
@@ -318,8 +318,11 @@
 	}
 
 	impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
-		fn validate_transaction(tx: <Block as BlockT>::Extrinsic) -> TransactionValidity {
-			Executive::validate_transaction(tx)
+		fn validate_transaction(
+			source: TransactionSource,
+			tx: <Block as BlockT>::Extrinsic,
+		) -> TransactionValidity {
+			Executive::validate_transaction(source, tx)
 		}
 	}