From ae865b7b9e79b7140ec041d971226a6c045d084c Mon Sep 17 00:00:00 2001 From: "Demi M. Obenour" Date: Mon, 11 May 2020 21:06:34 -0400 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=98transaction=5Fversion=E2=80=99?= =?UTF-8?q?=20to=20the=20signed=20transaction?= 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. --- runtime/kusama/src/lib.rs | 6 ++++-- runtime/polkadot/src/lib.rs | 6 ++++-- runtime/test-runtime/src/lib.rs | 6 ++++-- runtime/westend/src/lib.rs | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 5a58e7fcf372..6c2027aa868c 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -587,7 +587,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), @@ -837,7 +838,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/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 3940b145c9c8..22dabb56aeeb 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -594,7 +594,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), @@ -752,7 +753,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/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 350531ebaef3..3de486587713 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/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/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index a2068660e6a1..30741ebd7534 100644 --- a/runtime/westend/src/lib.rs +++ b/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,