From 03c02548bcaeaa0afe739ab579dc54c1ed01e416 Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Mon, 23 Dec 2024 11:22:04 +0000 Subject: [PATCH 01/15] migrate pallet-mixnet to umbrella crate --- Cargo.lock | 6 +-- substrate/frame/mixnet/Cargo.toml | 24 +++--------- substrate/frame/mixnet/src/lib.rs | 65 ++++++++++++++----------------- substrate/frame/src/lib.rs | 17 ++++++-- 4 files changed, 49 insertions(+), 63 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6151ed33c5b6..9e3bd0cdd0d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14030,17 +14030,13 @@ name = "pallet-mixnet" version = "0.4.0" dependencies = [ "frame-benchmarking 28.0.0", - "frame-support 28.0.0", - "frame-system 28.0.0", "log", "parity-scale-codec", + "polkadot-sdk-frame 0.1.0", "scale-info", "serde", "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-io 30.0.0", "sp-mixnet 0.4.0", - "sp-runtime 31.0.1", ] [[package]] diff --git a/substrate/frame/mixnet/Cargo.toml b/substrate/frame/mixnet/Cargo.toml index bb5e84864566..b9e23f235cc2 100644 --- a/substrate/frame/mixnet/Cargo.toml +++ b/substrate/frame/mixnet/Cargo.toml @@ -17,42 +17,28 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } +scale-info = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } log = { workspace = true } -scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], workspace = true } sp-application-crypto = { workspace = true } -sp-arithmetic = { workspace = true } -sp-io = { workspace = true } sp-mixnet = { workspace = true } -sp-runtime = { workspace = true } +frame = { workspace = true, features = ["experimental", "runtime"] } [features] default = ["std"] std = [ "codec/std", - "frame-benchmarking?/std", - "frame-support/std", - "frame-system/std", + "frame/std", "log/std", "scale-info/std", "serde/std", "sp-application-crypto/std", - "sp-arithmetic/std", - "sp-io/std", "sp-mixnet/std", - "sp-runtime/std", ] runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", + "frame/runtime-benchmarks", ] try-runtime = [ - "frame-support/try-runtime", - "frame-system/try-runtime", - "sp-runtime/try-runtime", + "frame/try-runtime", ] diff --git a/substrate/frame/mixnet/src/lib.rs b/substrate/frame/mixnet/src/lib.rs index 6579ed678ae7..7881b0dd80e7 100644 --- a/substrate/frame/mixnet/src/lib.rs +++ b/substrate/frame/mixnet/src/lib.rs @@ -23,29 +23,25 @@ extern crate alloc; +pub use pallet::*; + use alloc::vec::Vec; -use codec::{Decode, Encode, MaxEncodedLen}; use core::cmp::Ordering; -use frame_support::{ - traits::{EstimateNextSessionRotation, Get, OneSessionHandler}, - BoundedVec, -}; -use frame_system::{ - offchain::{CreateInherent, SubmitTransaction}, - pallet_prelude::BlockNumberFor, -}; -pub use pallet::*; -use scale_info::TypeInfo; + use serde::{Deserialize, Serialize}; + +use frame::{ + deps::{ + sp_io::{self, MultiRemovalResults}, + sp_runtime, + }, + prelude::*, +}; use sp_application_crypto::RuntimeAppPublic; -use sp_arithmetic::traits::{CheckedSub, Saturating, UniqueSaturatedInto, Zero}; -use sp_io::MultiRemovalResults; use sp_mixnet::types::{ AuthorityId, AuthoritySignature, KxPublic, Mixnode, MixnodesErr, PeerId, SessionIndex, SessionPhase, SessionStatus, KX_PUBLIC_SIZE, }; -use sp_runtime::RuntimeDebug; - const LOG_TARGET: &str = "runtime::mixnet"; /// Index of an authority in the authority list for a session. @@ -168,12 +164,9 @@ fn twox>( // The pallet //////////////////////////////////////////////////////////////////////////////// -#[frame_support::pallet(dev_mode)] +#[frame::pallet(dev_mode)] pub mod pallet { use super::*; - use frame_support::pallet_prelude::*; - use frame_system::pallet_prelude::*; - #[pallet::pallet] pub struct Pallet(_); @@ -254,7 +247,7 @@ pub mod pallet { StorageDoubleMap<_, Identity, SessionIndex, Identity, AuthorityIndex, BoundedMixnodeFor>; #[pallet::genesis_config] - #[derive(frame_support::DefaultNoBound)] + #[derive(frame::prelude::DefaultNoBound)] pub struct GenesisConfig { /// The mixnode set for the very first session. pub mixnodes: BoundedVec, T::MaxAuthorities>, @@ -308,7 +301,7 @@ pub mod pallet { fn validate_unsigned(_source: TransactionSource, call: &Self::Call) -> TransactionValidity { let Self::Call::register { registration, signature } = call else { - return InvalidTransaction::Call.into() + return InvalidTransaction::Call.into(); }; // Check session index matches @@ -320,16 +313,16 @@ pub mod pallet { // Check authority index is valid if registration.authority_index >= T::MaxAuthorities::get() { - return InvalidTransaction::BadProof.into() + return InvalidTransaction::BadProof.into(); } let Some(authority_id) = NextAuthorityIds::::get(registration.authority_index) else { - return InvalidTransaction::BadProof.into() + return InvalidTransaction::BadProof.into(); }; // Check the authority hasn't registered a mixnode yet if Self::already_registered(registration.session_index, registration.authority_index) { - return InvalidTransaction::Stale.into() + return InvalidTransaction::Stale.into(); } // Check signature. Note that we don't use regular signed transactions for registration @@ -339,7 +332,7 @@ pub mod pallet { authority_id.verify(&encoded_registration, signature) }); if !signature_ok { - return InvalidTransaction::BadProof.into() + return InvalidTransaction::BadProof.into(); } ValidTransaction::with_tag_prefix("MixnetRegistration") @@ -368,12 +361,12 @@ impl Pallet { .saturating_sub(CurrentSessionStartBlock::::get()); let Some(block_in_phase) = block_in_phase.checked_sub(&T::NumCoverToCurrentBlocks::get()) else { - return SessionPhase::CoverToCurrent + return SessionPhase::CoverToCurrent; }; let Some(block_in_phase) = block_in_phase.checked_sub(&T::NumRequestsToCurrentBlocks::get()) else { - return SessionPhase::RequestsToCurrent + return SessionPhase::RequestsToCurrent; }; if block_in_phase < T::NumCoverToPrevBlocks::get() { SessionPhase::CoverToPrev @@ -411,7 +404,7 @@ impl Pallet { return Err(MixnodesErr::InsufficientRegistrations { num: 0, min: T::MinMixnodes::get(), - }) + }); }; Self::mixnodes(prev_session_index) } @@ -430,7 +423,7 @@ impl Pallet { // registering let block_in_session = block_number.saturating_sub(CurrentSessionStartBlock::::get()); if block_in_session < T::NumRegisterStartSlackBlocks::get() { - return false + return false; } let (Some(end_block), _weight) = @@ -438,7 +431,7 @@ impl Pallet { else { // Things aren't going to work terribly well in this case as all the authorities will // just pile in after the slack period... - return true + return true; }; let remaining_blocks = end_block @@ -447,7 +440,7 @@ impl Pallet { if remaining_blocks.is_zero() { // Into the slack time at the end of the session. Not necessarily too late; // registrations are accepted right up until the session ends. - return true + return true; } // Want uniform distribution over the remaining blocks, so pick this block with probability @@ -496,7 +489,7 @@ impl Pallet { "Session {session_index} registration attempted, \ but current session is {current_session_index}", ); - return false + return false; } let block_number = frame_system::Pallet::::block_number(); @@ -505,7 +498,7 @@ impl Pallet { target: LOG_TARGET, "Waiting for the session to progress further before registering", ); - return false + return false; } let Some((authority_index, authority_id)) = Self::next_local_authority() else { @@ -513,7 +506,7 @@ impl Pallet { target: LOG_TARGET, "Not an authority in the next session; cannot register a mixnode", ); - return false + return false; }; if Self::already_registered(session_index, authority_index) { @@ -521,14 +514,14 @@ impl Pallet { target: LOG_TARGET, "Already registered a mixnode for the next session", ); - return false + return false; } let registration = Registration { block_number, session_index, authority_index, mixnode: mixnode.into() }; let Some(signature) = authority_id.sign(®istration.encode()) else { log::debug!(target: LOG_TARGET, "Failed to sign registration"); - return false + return false; }; let call = Call::register { registration, signature }; let xt = T::create_inherent(call.into()); diff --git a/substrate/frame/src/lib.rs b/substrate/frame/src/lib.rs index 8031ddf96e6a..17fb49061d98 100644 --- a/substrate/frame/src/lib.rs +++ b/substrate/frame/src/lib.rs @@ -203,12 +203,18 @@ pub mod prelude { /// Dispatch types from `frame-support`, other fundamental traits #[doc(no_inline)] pub use frame_support::dispatch::{GetDispatchInfo, PostDispatchInfo}; - pub use frame_support::traits::{Contains, IsSubType, OnRuntimeUpgrade}; + pub use frame_support::traits::{ + Contains, EstimateNextSessionRotation, IsSubType, OnRuntimeUpgrade, OneSessionHandler, + }; /// Pallet prelude of `frame-system`. #[doc(no_inline)] pub use frame_system::pallet_prelude::*; + /// Transaction related helpers to submit transactions. + #[doc(no_inline)] + pub use frame_system::offchain::*; + /// All FRAME-relevant derive macros. #[doc(no_inline)] pub use super::derive::*; @@ -216,6 +222,9 @@ pub mod prelude { /// All hashing related things pub use super::hashing::*; + /// All arithmetic types and traits used for safe math. + pub use super::arithmetic::*; + /// Runtime traits #[doc(no_inline)] pub use sp_runtime::traits::{ @@ -223,9 +232,9 @@ pub mod prelude { Saturating, StaticLookup, TrailingZeroInput, }; - /// Other error/result types for runtime + /// Other runtime types and traits #[doc(no_inline)] - pub use sp_runtime::{DispatchErrorWithPostInfo, DispatchResultWithInfo, TokenError}; + pub use sp_runtime::{DispatchErrorWithPostInfo, DispatchResultWithInfo, TokenError, BoundToRuntimeAppPublic}; } #[cfg(any(feature = "try-runtime", test))] @@ -509,6 +518,8 @@ pub mod traits { } /// The arithmetic types used for safe math. +/// +/// This is already part of the [`prelude`]. pub mod arithmetic { pub use sp_arithmetic::{traits::*, *}; } From de7d2f1b20019fd7b9ef67a2c207ba6295b11a70 Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Mon, 23 Dec 2024 11:56:05 +0000 Subject: [PATCH 02/15] run taplo format --- substrate/frame/mixnet/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/frame/mixnet/Cargo.toml b/substrate/frame/mixnet/Cargo.toml index b9e23f235cc2..bfb9db7b2704 100644 --- a/substrate/frame/mixnet/Cargo.toml +++ b/substrate/frame/mixnet/Cargo.toml @@ -17,13 +17,13 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } -scale-info = { features = ["derive"], workspace = true } +frame = { workspace = true, features = ["experimental", "runtime"] } frame-benchmarking = { optional = true, workspace = true } log = { workspace = true } +scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], workspace = true } sp-application-crypto = { workspace = true } sp-mixnet = { workspace = true } -frame = { workspace = true, features = ["experimental", "runtime"] } [features] default = ["std"] From fedc90f9b1024d84d232179ee2bfa4356e996d5f Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Mon, 23 Dec 2024 12:11:59 +0000 Subject: [PATCH 03/15] run cargo fmt --- substrate/frame/mixnet/src/lib.rs | 10 +++++----- substrate/frame/src/lib.rs | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/substrate/frame/mixnet/src/lib.rs b/substrate/frame/mixnet/src/lib.rs index 7881b0dd80e7..426b2088c302 100644 --- a/substrate/frame/mixnet/src/lib.rs +++ b/substrate/frame/mixnet/src/lib.rs @@ -31,11 +31,11 @@ use core::cmp::Ordering; use serde::{Deserialize, Serialize}; use frame::{ - deps::{ - sp_io::{self, MultiRemovalResults}, - sp_runtime, - }, - prelude::*, + deps::{ + sp_io::{self, MultiRemovalResults}, + sp_runtime, + }, + prelude::*, }; use sp_application_crypto::RuntimeAppPublic; use sp_mixnet::types::{ diff --git a/substrate/frame/src/lib.rs b/substrate/frame/src/lib.rs index 17fb49061d98..b3e340cbcbff 100644 --- a/substrate/frame/src/lib.rs +++ b/substrate/frame/src/lib.rs @@ -234,7 +234,9 @@ pub mod prelude { /// Other runtime types and traits #[doc(no_inline)] - pub use sp_runtime::{DispatchErrorWithPostInfo, DispatchResultWithInfo, TokenError, BoundToRuntimeAppPublic}; + pub use sp_runtime::{ + BoundToRuntimeAppPublic, DispatchErrorWithPostInfo, DispatchResultWithInfo, TokenError, + }; } #[cfg(any(feature = "try-runtime", test))] From d7d411e84fb09226771ca276dc8250eb35181e03 Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Mon, 23 Dec 2024 13:42:42 +0000 Subject: [PATCH 04/15] add prdoc --- prdoc/pr_6986.prdoc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 prdoc/pr_6986.prdoc diff --git a/prdoc/pr_6986.prdoc b/prdoc/pr_6986.prdoc new file mode 100644 index 000000000000..5ead59738d5c --- /dev/null +++ b/prdoc/pr_6986.prdoc @@ -0,0 +1,16 @@ +# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 +# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json + +title: '[pallet-mixnet] Migrate to using frame umbrella crate' + +doc: + - audience: Runtime Dev + description: This PR migrates the pallet-mixnet to use the frame umbrella crate. This + is part of the ongoing effort to migrate all pallets to use the frame umbrella crate. + The effort is tracked [here](https://github.com/paritytech/polkadot-sdk/issues/6504). + +crates: + - name: pallet-mixnet + bump: none + - name: polkadot-sdk-frame + bump: none \ No newline at end of file From c27a6e3f03bcc2f1a0e91a5e8901c8c349978fdc Mon Sep 17 00:00:00 2001 From: Utkarsh Bhardwaj Date: Tue, 24 Dec 2024 21:39:30 +0000 Subject: [PATCH 05/15] NIT: optimise imports in pallet-mixnet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Dónal Murray --- substrate/frame/mixnet/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/mixnet/src/lib.rs b/substrate/frame/mixnet/src/lib.rs index 426b2088c302..bab83834cd58 100644 --- a/substrate/frame/mixnet/src/lib.rs +++ b/substrate/frame/mixnet/src/lib.rs @@ -247,7 +247,7 @@ pub mod pallet { StorageDoubleMap<_, Identity, SessionIndex, Identity, AuthorityIndex, BoundedMixnodeFor>; #[pallet::genesis_config] - #[derive(frame::prelude::DefaultNoBound)] + #[derive(DefaultNoBound)] pub struct GenesisConfig { /// The mixnode set for the very first session. pub mixnodes: BoundedVec, T::MaxAuthorities>, From 0266ff39e8f4f1a3cce367065c941e8a267a27e3 Mon Sep 17 00:00:00 2001 From: Utkarsh Bhardwaj Date: Tue, 24 Dec 2024 21:40:30 +0000 Subject: [PATCH 06/15] MINOR: remove extra spaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Dónal Murray --- substrate/frame/mixnet/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/substrate/frame/mixnet/src/lib.rs b/substrate/frame/mixnet/src/lib.rs index bab83834cd58..df95a3a4d766 100644 --- a/substrate/frame/mixnet/src/lib.rs +++ b/substrate/frame/mixnet/src/lib.rs @@ -27,7 +27,6 @@ pub use pallet::*; use alloc::vec::Vec; use core::cmp::Ordering; - use serde::{Deserialize, Serialize}; use frame::{ From 59a9402f6768eaccc21d361c53c67a45b74c3658 Mon Sep 17 00:00:00 2001 From: Utkarsh Bhardwaj Date: Tue, 24 Dec 2024 21:40:45 +0000 Subject: [PATCH 07/15] MINOR: remove extra spaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Dónal Murray --- substrate/frame/mixnet/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/substrate/frame/mixnet/src/lib.rs b/substrate/frame/mixnet/src/lib.rs index df95a3a4d766..25c96fd535a2 100644 --- a/substrate/frame/mixnet/src/lib.rs +++ b/substrate/frame/mixnet/src/lib.rs @@ -28,7 +28,6 @@ pub use pallet::*; use alloc::vec::Vec; use core::cmp::Ordering; use serde::{Deserialize, Serialize}; - use frame::{ deps::{ sp_io::{self, MultiRemovalResults}, From 1474e4333265fb3c5bce0bd796eeea43cf0b8c69 Mon Sep 17 00:00:00 2001 From: Utkarsh Bhardwaj Date: Tue, 24 Dec 2024 21:44:03 +0000 Subject: [PATCH 08/15] MINOR: remove extra spaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Dónal Murray --- substrate/frame/mixnet/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/substrate/frame/mixnet/src/lib.rs b/substrate/frame/mixnet/src/lib.rs index 25c96fd535a2..ab2046a8f6f9 100644 --- a/substrate/frame/mixnet/src/lib.rs +++ b/substrate/frame/mixnet/src/lib.rs @@ -40,6 +40,7 @@ use sp_mixnet::types::{ AuthorityId, AuthoritySignature, KxPublic, Mixnode, MixnodesErr, PeerId, SessionIndex, SessionPhase, SessionStatus, KX_PUBLIC_SIZE, }; + const LOG_TARGET: &str = "runtime::mixnet"; /// Index of an authority in the authority list for a session. From 268da64eb96085ead3e1c5bdb2403d9ce105fb78 Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Tue, 24 Dec 2024 22:01:59 +0000 Subject: [PATCH 09/15] cargo fmt --- substrate/frame/mixnet/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/mixnet/src/lib.rs b/substrate/frame/mixnet/src/lib.rs index ab2046a8f6f9..984981817676 100644 --- a/substrate/frame/mixnet/src/lib.rs +++ b/substrate/frame/mixnet/src/lib.rs @@ -27,7 +27,6 @@ pub use pallet::*; use alloc::vec::Vec; use core::cmp::Ordering; -use serde::{Deserialize, Serialize}; use frame::{ deps::{ sp_io::{self, MultiRemovalResults}, @@ -35,6 +34,7 @@ use frame::{ }, prelude::*, }; +use serde::{Deserialize, Serialize}; use sp_application_crypto::RuntimeAppPublic; use sp_mixnet::types::{ AuthorityId, AuthoritySignature, KxPublic, Mixnode, MixnodesErr, PeerId, SessionIndex, From 5a0638fd34789ec2fee45a336b4c8f5d520dc982 Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Tue, 24 Dec 2024 22:21:13 +0000 Subject: [PATCH 10/15] remove runtime benchmark feature as pallet-mixnet has no benchmarking --- substrate/frame/mixnet/Cargo.toml | 3 --- umbrella/Cargo.toml | 1 - 2 files changed, 4 deletions(-) diff --git a/substrate/frame/mixnet/Cargo.toml b/substrate/frame/mixnet/Cargo.toml index bfb9db7b2704..c0f4fdd4d72f 100644 --- a/substrate/frame/mixnet/Cargo.toml +++ b/substrate/frame/mixnet/Cargo.toml @@ -36,9 +36,6 @@ std = [ "sp-application-crypto/std", "sp-mixnet/std", ] -runtime-benchmarks = [ - "frame/runtime-benchmarks", -] try-runtime = [ "frame/try-runtime", ] diff --git a/umbrella/Cargo.toml b/umbrella/Cargo.toml index f36d39d63f6a..d2a47ade7f87 100644 --- a/umbrella/Cargo.toml +++ b/umbrella/Cargo.toml @@ -290,7 +290,6 @@ runtime-benchmarks = [ "pallet-membership?/runtime-benchmarks", "pallet-message-queue?/runtime-benchmarks", "pallet-migrations?/runtime-benchmarks", - "pallet-mixnet?/runtime-benchmarks", "pallet-mmr?/runtime-benchmarks", "pallet-multisig?/runtime-benchmarks", "pallet-nft-fractionalization?/runtime-benchmarks", From d329f1ae856e7e571ae80a7af905cb42a7758fa9 Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Thu, 26 Dec 2024 02:34:34 +0000 Subject: [PATCH 11/15] remove frame-benchmarking from pallet-mixnet dependencies --- Cargo.lock | 1 - substrate/frame/mixnet/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9e3bd0cdd0d6..3c55a14256c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14029,7 +14029,6 @@ dependencies = [ name = "pallet-mixnet" version = "0.4.0" dependencies = [ - "frame-benchmarking 28.0.0", "log", "parity-scale-codec", "polkadot-sdk-frame 0.1.0", diff --git a/substrate/frame/mixnet/Cargo.toml b/substrate/frame/mixnet/Cargo.toml index c0f4fdd4d72f..0ae3b3938c60 100644 --- a/substrate/frame/mixnet/Cargo.toml +++ b/substrate/frame/mixnet/Cargo.toml @@ -18,7 +18,6 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } frame = { workspace = true, features = ["experimental", "runtime"] } -frame-benchmarking = { optional = true, workspace = true } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], workspace = true } From 3cca75059c4ae65e8456523b1b879d483351fa7c Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Thu, 26 Dec 2024 02:52:12 +0000 Subject: [PATCH 12/15] update prdoc to satisfy semver requirements --- prdoc/pr_6986.prdoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prdoc/pr_6986.prdoc b/prdoc/pr_6986.prdoc index 5ead59738d5c..2741dcac0f28 100644 --- a/prdoc/pr_6986.prdoc +++ b/prdoc/pr_6986.prdoc @@ -11,6 +11,8 @@ doc: crates: - name: pallet-mixnet - bump: none + bump: minor - name: polkadot-sdk-frame + bump: none + - name: polkadot-sdk bump: none \ No newline at end of file From 845d61822813831a6fd0a9c900bd7524fdcd8c25 Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Fri, 27 Dec 2024 14:02:05 +0000 Subject: [PATCH 13/15] add runtime-benchmarks feature to pallet-mixnet --- substrate/frame/mixnet/Cargo.toml | 3 +++ umbrella/Cargo.toml | 1 + 2 files changed, 4 insertions(+) diff --git a/substrate/frame/mixnet/Cargo.toml b/substrate/frame/mixnet/Cargo.toml index 0ae3b3938c60..122287cd6e5a 100644 --- a/substrate/frame/mixnet/Cargo.toml +++ b/substrate/frame/mixnet/Cargo.toml @@ -35,6 +35,9 @@ std = [ "sp-application-crypto/std", "sp-mixnet/std", ] +runtime-benchmarks = [ + "frame/runtime-benchmarks", +] try-runtime = [ "frame/try-runtime", ] diff --git a/umbrella/Cargo.toml b/umbrella/Cargo.toml index d2a47ade7f87..f36d39d63f6a 100644 --- a/umbrella/Cargo.toml +++ b/umbrella/Cargo.toml @@ -290,6 +290,7 @@ runtime-benchmarks = [ "pallet-membership?/runtime-benchmarks", "pallet-message-queue?/runtime-benchmarks", "pallet-migrations?/runtime-benchmarks", + "pallet-mixnet?/runtime-benchmarks", "pallet-mmr?/runtime-benchmarks", "pallet-multisig?/runtime-benchmarks", "pallet-nft-fractionalization?/runtime-benchmarks", From e3edd3d1fb1390fafa2371a5b0a112b4cb943b01 Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Tue, 31 Dec 2024 15:06:18 +0000 Subject: [PATCH 14/15] remove runtime-benchmarks feature from pallet-mixnet --- substrate/frame/mixnet/Cargo.toml | 3 --- umbrella/Cargo.toml | 1 - 2 files changed, 4 deletions(-) diff --git a/substrate/frame/mixnet/Cargo.toml b/substrate/frame/mixnet/Cargo.toml index 122287cd6e5a..0ae3b3938c60 100644 --- a/substrate/frame/mixnet/Cargo.toml +++ b/substrate/frame/mixnet/Cargo.toml @@ -35,9 +35,6 @@ std = [ "sp-application-crypto/std", "sp-mixnet/std", ] -runtime-benchmarks = [ - "frame/runtime-benchmarks", -] try-runtime = [ "frame/try-runtime", ] diff --git a/umbrella/Cargo.toml b/umbrella/Cargo.toml index f36d39d63f6a..d2a47ade7f87 100644 --- a/umbrella/Cargo.toml +++ b/umbrella/Cargo.toml @@ -290,7 +290,6 @@ runtime-benchmarks = [ "pallet-membership?/runtime-benchmarks", "pallet-message-queue?/runtime-benchmarks", "pallet-migrations?/runtime-benchmarks", - "pallet-mixnet?/runtime-benchmarks", "pallet-mmr?/runtime-benchmarks", "pallet-multisig?/runtime-benchmarks", "pallet-nft-fractionalization?/runtime-benchmarks", From e786607fcbfabea260e0ce085e60d8a0bcd48e03 Mon Sep 17 00:00:00 2001 From: UtkarshBhardwaj007 Date: Thu, 2 Jan 2025 16:54:26 +0000 Subject: [PATCH 15/15] change polkadot-sdk-frame bump from none to minor --- prdoc/pr_6986.prdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prdoc/pr_6986.prdoc b/prdoc/pr_6986.prdoc index 2741dcac0f28..8deb6b04bd1c 100644 --- a/prdoc/pr_6986.prdoc +++ b/prdoc/pr_6986.prdoc @@ -13,6 +13,6 @@ crates: - name: pallet-mixnet bump: minor - name: polkadot-sdk-frame - bump: none + bump: minor - name: polkadot-sdk bump: none \ No newline at end of file