diff --git a/bridges/bin/millau/runtime/src/lib.rs b/bridges/bin/millau/runtime/src/lib.rs index de85b859b770..10edf4de346a 100644 --- a/bridges/bin/millau/runtime/src/lib.rs +++ b/bridges/bin/millau/runtime/src/lib.rs @@ -532,6 +532,7 @@ pub type SignedBlock = generic::SignedBlock; pub type BlockId = generic::BlockId; /// The `SignedExtension` to the basic transaction logic. pub type SignedExtra = ( + frame_system::CheckNonZeroSender, frame_system::CheckSpecVersion, frame_system::CheckTxVersion, frame_system::CheckGenesis, diff --git a/bridges/bin/rialto-parachain/runtime/src/lib.rs b/bridges/bin/rialto-parachain/runtime/src/lib.rs index 5b71674b7fe9..e4ac28d2ad7b 100644 --- a/bridges/bin/rialto-parachain/runtime/src/lib.rs +++ b/bridges/bin/rialto-parachain/runtime/src/lib.rs @@ -86,6 +86,7 @@ pub type SignedBlock = generic::SignedBlock; pub type BlockId = generic::BlockId; /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( + frame_system::CheckNonZeroSender, frame_system::CheckSpecVersion, frame_system::CheckGenesis, frame_system::CheckEra, diff --git a/bridges/bin/rialto/runtime/src/lib.rs b/bridges/bin/rialto/runtime/src/lib.rs index b3ceff503583..4c1901f5a3d7 100644 --- a/bridges/bin/rialto/runtime/src/lib.rs +++ b/bridges/bin/rialto/runtime/src/lib.rs @@ -549,6 +549,7 @@ pub type SignedBlock = generic::SignedBlock; pub type BlockId = generic::BlockId; /// The `SignedExtension` to the basic transaction logic. pub type SignedExtra = ( + frame_system::CheckNonZeroSender, frame_system::CheckSpecVersion, frame_system::CheckTxVersion, frame_system::CheckGenesis, diff --git a/bridges/primitives/polkadot-core/src/lib.rs b/bridges/primitives/polkadot-core/src/lib.rs index 38e43d312b5d..68fd879590a9 100644 --- a/bridges/primitives/polkadot-core/src/lib.rs +++ b/bridges/primitives/polkadot-core/src/lib.rs @@ -248,11 +248,12 @@ pub type UncheckedExtrinsic = pub type Address = MultiAddress; /// A type of the data encoded as part of the transaction. -pub type SignedExtra = ((), (), (), sp_runtime::generic::Era, Compact, (), Compact); +pub type SignedExtra = + ((), (), (), (), sp_runtime::generic::Era, Compact, (), Compact); /// Parameters which are part of the payload used to produce transaction signature, /// but don't end up in the transaction itself (i.e. inherent part of the runtime). -pub type AdditionalSigned = (u32, u32, Hash, Hash, (), (), ()); +pub type AdditionalSigned = ((), u32, u32, Hash, Hash, (), (), ()); /// A simplified version of signed extensions meant for producing signed transactions /// and signed payload in the client code. @@ -287,6 +288,7 @@ impl SignedExtensions { ) -> Self { Self { encode_payload: ( + (), // non-zero sender (), // spec version (), // tx version (), // genesis @@ -296,6 +298,7 @@ impl SignedExtensions { tip.into(), // transaction payment / tip (compact encoding) ), additional_signed: ( + (), version.spec_version, version.transaction_version, genesis_hash, @@ -312,12 +315,12 @@ impl SignedExtensions { impl SignedExtensions { /// Return signer nonce, used to craft transaction. pub fn nonce(&self) -> Nonce { - self.encode_payload.4.into() + self.encode_payload.5.into() } /// Return transaction tip. pub fn tip(&self) -> Balance { - self.encode_payload.6.into() + self.encode_payload.7.into() } } diff --git a/node/test/polkadot-simnet/common/src/lib.rs b/node/test/polkadot-simnet/common/src/lib.rs index 47047ec202ce..668417e10b99 100644 --- a/node/test/polkadot-simnet/common/src/lib.rs +++ b/node/test/polkadot-simnet/common/src/lib.rs @@ -78,6 +78,7 @@ impl ChainInfo for PolkadotChainInfo { fn signed_extras(from: ::AccountId) -> Self::SignedExtras { ( + system::CheckNonZeroSender::::new(), system::CheckSpecVersion::::new(), system::CheckTxVersion::::new(), system::CheckGenesis::::new(), diff --git a/node/test/service/src/lib.rs b/node/test/service/src/lib.rs index 777b84520d47..aa6b6681ba64 100644 --- a/node/test/service/src/lib.rs +++ b/node/test/service/src/lib.rs @@ -341,6 +341,7 @@ pub fn construct_extrinsic( BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; let tip = 0; let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), @@ -353,6 +354,7 @@ pub fn construct_extrinsic( function.clone(), extra.clone(), ( + (), VERSION.spec_version, VERSION.transaction_version, genesis_block, diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index b55e64a0f3cd..82dff747d014 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -853,6 +853,7 @@ where .saturating_sub(1); let tip = 0; let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), @@ -1583,6 +1584,7 @@ pub type SignedBlock = generic::SignedBlock; pub type BlockId = generic::BlockId; /// The `SignedExtension` to the basic transaction logic. pub type SignedExtra = ( + frame_system::CheckNonZeroSender, frame_system::CheckSpecVersion, frame_system::CheckTxVersion, frame_system::CheckGenesis, diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index c434f3d5f01d..a9a37977d780 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -883,6 +883,7 @@ where .saturating_sub(1); let tip = 0; let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), @@ -1533,6 +1534,7 @@ pub type SignedBlock = generic::SignedBlock; pub type BlockId = generic::BlockId; /// The `SignedExtension` to the basic transaction logic. pub type SignedExtra = ( + frame_system::CheckNonZeroSender, frame_system::CheckSpecVersion, frame_system::CheckTxVersion, frame_system::CheckGenesis, diff --git a/runtime/rococo/src/bridge_messages.rs b/runtime/rococo/src/bridge_messages.rs index 31568f5c51bc..d800910d403d 100644 --- a/runtime/rococo/src/bridge_messages.rs +++ b/runtime/rococo/src/bridge_messages.rs @@ -436,6 +436,7 @@ mod tests { // file if you're unsure who to ping) let signed_extra: crate::SignedExtra = ( + frame_system::CheckNonZeroSender::new(), frame_system::CheckSpecVersion::new(), frame_system::CheckTxVersion::new(), frame_system::CheckGenesis::new(), diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index e6d02769e050..7c375b353f50 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -141,6 +141,7 @@ pub type SignedBlock = generic::SignedBlock; pub type BlockId = generic::BlockId; /// The `SignedExtension` to the basic transaction logic. pub type SignedExtra = ( + frame_system::CheckNonZeroSender, frame_system::CheckSpecVersion, frame_system::CheckTxVersion, frame_system::CheckGenesis, @@ -354,6 +355,7 @@ where .saturating_sub(1); let tip = 0; let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 0df0c11c4f19..f1b6b0b96a78 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -386,6 +386,7 @@ where let current_block = System::block_number().saturated_into::().saturating_sub(1); let tip = 0; let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), @@ -700,6 +701,7 @@ pub type SignedBlock = generic::SignedBlock; pub type BlockId = generic::BlockId; /// The `SignedExtension` to the basic transaction logic. pub type SignedExtra = ( + frame_system::CheckNonZeroSender, frame_system::CheckSpecVersion, frame_system::CheckTxVersion, frame_system::CheckGenesis, diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 24d31ca9a745..3c2a2b3cc216 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -557,6 +557,7 @@ where .saturating_sub(1); let tip = 0; let extra: SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), @@ -1153,6 +1154,7 @@ pub type SignedBlock = generic::SignedBlock; pub type BlockId = generic::BlockId; /// The `SignedExtension` to the basic transaction logic. pub type SignedExtra = ( + frame_system::CheckNonZeroSender, frame_system::CheckSpecVersion, frame_system::CheckTxVersion, frame_system::CheckGenesis, diff --git a/utils/staking-miner/src/main.rs b/utils/staking-miner/src/main.rs index 95319f9e24a4..f05897b426b0 100644 --- a/utils/staking-miner/src/main.rs +++ b/utils/staking-miner/src/main.rs @@ -115,6 +115,7 @@ fn signed_ext_builder_polkadot( ) -> polkadot_runtime_exports::SignedExtra { use polkadot_runtime_exports::Runtime; ( + frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), @@ -133,6 +134,7 @@ fn signed_ext_builder_kusama( ) -> kusama_runtime_exports::SignedExtra { use kusama_runtime_exports::Runtime; ( + frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(), @@ -150,6 +152,7 @@ fn signed_ext_builder_westend( ) -> westend_runtime_exports::SignedExtra { use westend_runtime_exports::Runtime; ( + frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), frame_system::CheckTxVersion::::new(), frame_system::CheckGenesis::::new(),