From c45b14d1f3289fef8ca1001f23f2ac5374e38272 Mon Sep 17 00:00:00 2001 From: Demi Obenour Date: Thu, 14 May 2020 22:58:25 +0000 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=98transaction=5Fversion=E2=80=99?= =?UTF-8?q?=20to=20the=20signed=20transaction=20(#1092)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows hardware wallets to know which transactions they can safely sign. --- polkadot/runtime/kusama/src/lib.rs | 6 ++++-- polkadot/runtime/polkadot/src/lib.rs | 6 ++++-- polkadot/runtime/test-runtime/src/lib.rs | 6 ++++-- polkadot/runtime/westend/src/lib.rs | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/polkadot/runtime/kusama/src/lib.rs b/polkadot/runtime/kusama/src/lib.rs index 654fb943b4..fde6877af0 100644 --- a/polkadot/runtime/kusama/src/lib.rs +++ b/polkadot/runtime/kusama/src/lib.rs @@ -595,7 +595,8 @@ impl system::offchain::CreateSignedTransaction for Runtime let tip = 0; let extra: SignedExtra = ( RestrictFunctionality, - system::CheckVersion::::new(), + system::CheckSpecVersion::::new(), + system::CheckTxVersion::::new(), system::CheckGenesis::::new(), system::CheckEra::::from(generic::Era::mortal(period, current_block)), system::CheckNonce::::from(nonce), @@ -845,7 +846,8 @@ pub type BlockId = generic::BlockId; /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( RestrictFunctionality, - system::CheckVersion, + system::CheckSpecVersion, + system::CheckTxVersion, system::CheckGenesis, system::CheckEra, system::CheckNonce, diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index 663d77a051..b9c4ba994c 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -602,7 +602,8 @@ impl system::offchain::CreateSignedTransaction for Runtime let tip = 0; let extra: SignedExtra = ( OnlyStakingAndClaims, - system::CheckVersion::::new(), + system::CheckSpecVersion::::new(), + system::CheckTxVersion::::new(), system::CheckGenesis::::new(), system::CheckEra::::from(generic::Era::mortal(period, current_block)), system::CheckNonce::::from(nonce), @@ -760,7 +761,8 @@ pub type BlockId = generic::BlockId; pub type SignedExtra = ( // RELEASE: remove this for release build. OnlyStakingAndClaims, - system::CheckVersion, + system::CheckSpecVersion, + system::CheckTxVersion, system::CheckGenesis, system::CheckEra, system::CheckNonce, diff --git a/polkadot/runtime/test-runtime/src/lib.rs b/polkadot/runtime/test-runtime/src/lib.rs index 350531ebae..3de4865877 100644 --- a/polkadot/runtime/test-runtime/src/lib.rs +++ b/polkadot/runtime/test-runtime/src/lib.rs @@ -394,7 +394,8 @@ impl system::offchain::CreateSignedTransaction for Runtime let tip = 0; let extra: SignedExtra = ( RestrictFunctionality, - system::CheckVersion::::new(), + system::CheckSpecVersion::::new(), + system::CheckTxVersion::::new(), system::CheckGenesis::::new(), system::CheckEra::::from(generic::Era::mortal(period, current_block)), system::CheckNonce::::from(nonce), @@ -531,7 +532,8 @@ pub type BlockId = generic::BlockId; /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( RestrictFunctionality, - system::CheckVersion, + system::CheckSpecVersion, + system::CheckTxVersion, system::CheckGenesis, system::CheckEra, system::CheckNonce, diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index a2068660e6..30741ebd75 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -454,7 +454,8 @@ impl system::offchain::CreateSignedTransaction for Runtime let tip = 0; let extra: SignedExtra = ( RestrictFunctionality, - system::CheckVersion::::new(), + system::CheckSpecVersion::::new(), + system::CheckTxVersion::::new(), system::CheckGenesis::::new(), system::CheckEra::::from(generic::Era::mortal(period, current_block)), system::CheckNonce::::from(nonce), @@ -645,7 +646,8 @@ pub type BlockId = generic::BlockId; /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( RestrictFunctionality, - system::CheckVersion, + system::CheckSpecVersion, + system::CheckTxVersion, system::CheckGenesis, system::CheckEra, system::CheckNonce,