difftreelog
feat(collator-selection) initial post-pallet-transmigration commit + minor refactoring
in: master
14 files changed
Cargo.lockdiffbeforeafterboth5780[[package]]5780[[package]]5781name = "pallet-collator-selection"5781name = "pallet-collator-selection"5782version = "3.0.0"5782version = "3.0.0"5783source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.30#7b1fc0ed107fe42bb7e6a5dfefb586f4c3ae4328"5784dependencies = [5783dependencies = [5785 "frame-benchmarking",5784 "frame-benchmarking",5786 "frame-support",5785 "frame-support",5787 "frame-system",5786 "frame-system",5788 "log",5787 "log",5788 "pallet-aura",5789 "pallet-authorship",5789 "pallet-authorship",5790 "pallet-balances",5790 "pallet-session",5791 "pallet-session",5792 "pallet-timestamp",5791 "parity-scale-codec 3.2.1",5793 "parity-scale-codec 3.2.1",5792 "rand 0.8.5",5794 "rand 0.8.5",5793 "scale-info",5795 "scale-info",5794 "serde",5796 "serde",5797 "sp-consensus-aura",5798 "sp-core",5799 "sp-io",5795 "sp-runtime",5800 "sp-runtime",5796 "sp-staking",5801 "sp-staking",5797 "sp-std",5802 "sp-std",5803 "sp-tracing",5798]5804]579958055800[[package]]5806[[package]]node/cli/src/chain_spec.rsdiffbeforeafterboth24use serde_json::map::Map;24use serde_json::map::Map;252526use up_common::types::opaque::*;26use up_common::types::opaque::*;27use up_common::constants::CANDIDACY_BOND;27use up_common::constants::GENESIS_CANDIDACY_BOND;282829#[cfg(feature = "unique-runtime")]29#[cfg(feature = "unique-runtime")]30pub use unique_runtime as default_runtime;30pub use unique_runtime as default_runtime;192 .cloned()192 .cloned()193 .map(|(acc, _)| acc)193 .map(|(acc, _)| acc)194 .collect(),194 .collect(),195 candidacy_bond: CANDIDACY_BOND,195 candidacy_bond: GENESIS_CANDIDACY_BOND,196 ..Default::default()196 ..Default::default()197 },197 },198 session: SessionConfig {198 session: SessionConfig {pallets/collator-selection/CHANGELOG.mddiffbeforeafterbothno changes
pallets/collator-selection/Cargo.tomldiffbeforeafterbothno changes
pallets/collator-selection/src/benchmarking.rsdiffbeforeafterbothno changes
pallets/collator-selection/src/lib.rsdiffbeforeafterbothno changes
pallets/collator-selection/src/mock.rsdiffbeforeafterbothno changes
pallets/collator-selection/src/tests.rsdiffbeforeafterbothno changes
pallets/collator-selection/src/weights.rsdiffbeforeafterbothno changes
primitives/common/src/constants.rsdiffbeforeafterboth44/// Minimum balance required to create or keep an account open.44/// Minimum balance required to create or keep an account open.45pub const EXISTENTIAL_DEPOSIT: u128 = 0;45pub const EXISTENTIAL_DEPOSIT: u128 = 0;46/// Amount of Balance reserved for candidate registration.46/// Amount of Balance reserved for candidate registration.47pub const CANDIDACY_BOND: u128 = EXISTENTIAL_DEPOSIT;47pub const GENESIS_CANDIDACY_BOND: u128 = EXISTENTIAL_DEPOSIT;484849// Targeting 0.1 UNQ per transfer49// Targeting 0.1 UNQ per transfer50pub const WEIGHT_TO_FEE_COEFF: u32 = /*<weight2fee>*/207_163_598/*</weight2fee>*/;50pub const WEIGHT_TO_FEE_COEFF: u32 = /*<weight2fee>*/207_163_598/*</weight2fee>*/;runtime/common/mod.rsdiffbeforeafterboth188 RuntimeAppPublic,188 RuntimeAppPublic,189 };189 };190 use pallet_session::SessionManager;190 use pallet_session::SessionManager;191 use up_common::constants::CANDIDACY_BOND;191 use up_common::constants::GENESIS_CANDIDACY_BOND;192 use crate::config::pallets::collator_selection::MaxInvulnerables;192 use crate::config::pallets::collator_selection::MaxInvulnerables;193193194 let mut weight = <Runtime as frame_system::Config>::DbWeight::get().reads(1);194 let mut weight = <Runtime as frame_system::Config>::DbWeight::get().reads(1);239239240 <pallet_collator_selection::Invulnerables<Runtime>>::put(bounded_invulnerables);240 <pallet_collator_selection::Invulnerables<Runtime>>::put(bounded_invulnerables);241 <pallet_collator_selection::DesiredCandidates<Runtime>>::put(0);241 <pallet_collator_selection::DesiredCandidates<Runtime>>::put(0);242 <pallet_collator_selection::CandidacyBond<Runtime>>::put(CANDIDACY_BOND);242 <pallet_collator_selection::CandidacyBond<Runtime>>::put(GENESIS_CANDIDACY_BOND);243243244 let keys = invulnerables244 let keys = invulnerables245 .into_iter()245 .into_iter()runtime/opal/Cargo.tomldiffbeforeafterboth29 'pallet-evm-migration/runtime-benchmarks',29 'pallet-evm-migration/runtime-benchmarks',30 'pallet-evm-coder-substrate/runtime-benchmarks',30 'pallet-evm-coder-substrate/runtime-benchmarks',31 'pallet-balances/runtime-benchmarks',31 'pallet-balances/runtime-benchmarks',32 "pallet-collator-selection/runtime-benchmarks",33 'pallet-timestamp/runtime-benchmarks',32 'pallet-timestamp/runtime-benchmarks',34 'pallet-common/runtime-benchmarks',33 'pallet-common/runtime-benchmarks',35 'pallet-structure/runtime-benchmarks',34 'pallet-structure/runtime-benchmarks',69 'pallet-xcm/try-runtime',68 'pallet-xcm/try-runtime',70 'cumulus-pallet-xcm/try-runtime',69 'cumulus-pallet-xcm/try-runtime',71 'cumulus-pallet-dmp-queue/try-runtime',70 'cumulus-pallet-dmp-queue/try-runtime',71 "pallet-authorship/try-runtime",72 "pallet-collator-selection/try-runtime",73 "pallet-session/try-runtime",72 'pallet-inflation/try-runtime',74 'pallet-inflation/try-runtime',73 'pallet-unique/try-runtime',75 'pallet-unique/try-runtime',74 'pallet-unique-scheduler/try-runtime',76 'pallet-unique-scheduler/try-runtime',244git = "https://github.com/paritytech/substrate"246git = "https://github.com/paritytech/substrate"245branch = "polkadot-v0.9.30"247branch = "polkadot-v0.9.30"246247[dependencies.pallet-collator-selection]248default-features = false249git = 'https://github.com/paritytech/cumulus'250branch = 'polkadot-v0.9.30'251248252[dependencies.pallet-authorship]249[dependencies.pallet-authorship]253default-features = false250default-features = false480pallet-inflation = { path = '../../pallets/inflation', default-features = false }477pallet-inflation = { path = '../../pallets/inflation', default-features = false }481pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }478pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }482up-data-structs = { path = '../../primitives/data-structs', default-features = false }479up-data-structs = { path = '../../primitives/data-structs', default-features = false }480pallet-collator-selection = { default-features = false, path = "../../pallets/collator-selection" }483pallet-configuration = { default-features = false, path = "../../pallets/configuration" }481pallet-configuration = { default-features = false, path = "../../pallets/configuration" }484pallet-common = { default-features = false, path = "../../pallets/common" }482pallet-common = { default-features = false, path = "../../pallets/common" }485pallet-structure = { default-features = false, path = "../../pallets/structure" }483pallet-structure = { default-features = false, path = "../../pallets/structure" }runtime/quartz/Cargo.tomldiffbeforeafterboth29 'pallet-evm-migration/runtime-benchmarks',29 'pallet-evm-migration/runtime-benchmarks',30 'pallet-evm-coder-substrate/runtime-benchmarks',30 'pallet-evm-coder-substrate/runtime-benchmarks',31 'pallet-balances/runtime-benchmarks',31 'pallet-balances/runtime-benchmarks',32 "pallet-collator-selection/runtime-benchmarks",33 'pallet-timestamp/runtime-benchmarks',32 'pallet-timestamp/runtime-benchmarks',34 'pallet-common/runtime-benchmarks',33 'pallet-common/runtime-benchmarks',35 'pallet-structure/runtime-benchmarks',34 'pallet-structure/runtime-benchmarks',68 'pallet-xcm/try-runtime',67 'pallet-xcm/try-runtime',69 'cumulus-pallet-xcm/try-runtime',68 'cumulus-pallet-xcm/try-runtime',70 'cumulus-pallet-dmp-queue/try-runtime',69 'cumulus-pallet-dmp-queue/try-runtime',70 "pallet-authorship/try-runtime",71 "pallet-collator-selection/try-runtime",72 "pallet-session/try-runtime",71 'pallet-inflation/try-runtime',73 'pallet-inflation/try-runtime',72 'pallet-unique/try-runtime',74 'pallet-unique/try-runtime',73 'pallet-unique-scheduler/try-runtime',75 'pallet-unique-scheduler/try-runtime',241git = "https://github.com/paritytech/substrate"243git = "https://github.com/paritytech/substrate"242branch = "polkadot-v0.9.30"244branch = "polkadot-v0.9.30"243244[dependencies.pallet-collator-selection]245default-features = false246git = 'https://github.com/paritytech/cumulus'247branch = 'polkadot-v0.9.30'248245249[dependencies.pallet-authorship]246[dependencies.pallet-authorship]250default-features = false247default-features = false484pallet-inflation = { path = '../../pallets/inflation', default-features = false }481pallet-inflation = { path = '../../pallets/inflation', default-features = false }485pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }482pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }486up-data-structs = { path = '../../primitives/data-structs', default-features = false }483up-data-structs = { path = '../../primitives/data-structs', default-features = false }484pallet-collator-selection = { default-features = false, path = "../../pallets/collator-selection" }487pallet-configuration = { default-features = false, path = "../../pallets/configuration" }485pallet-configuration = { default-features = false, path = "../../pallets/configuration" }488pallet-common = { default-features = false, path = "../../pallets/common" }486pallet-common = { default-features = false, path = "../../pallets/common" }489pallet-structure = { default-features = false, path = "../../pallets/structure" }487pallet-structure = { default-features = false, path = "../../pallets/structure" }runtime/unique/Cargo.tomldiffbeforeafterboth29 'pallet-evm-migration/runtime-benchmarks',29 'pallet-evm-migration/runtime-benchmarks',30 'pallet-evm-coder-substrate/runtime-benchmarks',30 'pallet-evm-coder-substrate/runtime-benchmarks',31 'pallet-balances/runtime-benchmarks',31 'pallet-balances/runtime-benchmarks',32 "pallet-collator-selection/runtime-benchmarks",33 'pallet-timestamp/runtime-benchmarks',32 'pallet-timestamp/runtime-benchmarks',34 'pallet-common/runtime-benchmarks',33 'pallet-common/runtime-benchmarks',35 'pallet-structure/runtime-benchmarks',34 'pallet-structure/runtime-benchmarks',69 'pallet-xcm/try-runtime',68 'pallet-xcm/try-runtime',70 'cumulus-pallet-xcm/try-runtime',69 'cumulus-pallet-xcm/try-runtime',71 'cumulus-pallet-dmp-queue/try-runtime',70 'cumulus-pallet-dmp-queue/try-runtime',71 "pallet-authorship/try-runtime",72 "pallet-collator-selection/try-runtime",73 "pallet-session/try-runtime",72 'pallet-inflation/try-runtime',74 'pallet-inflation/try-runtime',73 'pallet-unique/try-runtime',75 'pallet-unique/try-runtime',74 'pallet-unique-scheduler/try-runtime',76 'pallet-unique-scheduler/try-runtime',242git = "https://github.com/paritytech/substrate"244git = "https://github.com/paritytech/substrate"243branch = "polkadot-v0.9.30"245branch = "polkadot-v0.9.30"244245[dependencies.pallet-collator-selection]246default-features = false247git = 'https://github.com/paritytech/cumulus'248branch = 'polkadot-v0.9.30'249246250[dependencies.pallet-authorship]247[dependencies.pallet-authorship]251default-features = false248default-features = false477pallet-inflation = { path = '../../pallets/inflation', default-features = false }474pallet-inflation = { path = '../../pallets/inflation', default-features = false }478pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }475pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }479up-data-structs = { path = '../../primitives/data-structs', default-features = false }476up-data-structs = { path = '../../primitives/data-structs', default-features = false }477pallet-collator-selection = { default-features = false, path = "../../pallets/collator-selection" }480pallet-configuration = { default-features = false, path = "../../pallets/configuration" }478pallet-configuration = { default-features = false, path = "../../pallets/configuration" }481pallet-common = { default-features = false, path = "../../pallets/common" }479pallet-common = { default-features = false, path = "../../pallets/common" }482pallet-structure = { default-features = false, path = "../../pallets/structure" }480pallet-structure = { default-features = false, path = "../../pallets/structure" }