From 650f9044a172ae060c725fa1cfa46b28da36d3b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89lo=C3=AFs?= <c@elo.tf>
Date: Sat, 16 Jul 2022 01:24:02 +0200
Subject: [PATCH] =?UTF-8?q?feat(governance):=C2=A0replace=20smiths=20colle?=
 =?UTF-8?q?ctive=20by=20technical=20committee=20(!92)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* feat(governance):  replace smiths collective by technical committee
---
 end2end-tests/cucumber-genesis/default.json |   3 +-
 end2end-tests/cucumber-genesis/wot.json     |   3 +-
 node/src/chain_spec/gdev.rs                 |  16 +++++++--
 node/src/chain_spec/gen_genesis_data.rs     |  15 ++++++++
 resources/gdev.json                         |   3 +-
 resources/metadata.scale                    | Bin 119706 -> 119720 bytes
 runtime/common/src/pallets_config.rs        |  38 ++++++--------------
 runtime/g1/src/lib.rs                       |   4 +--
 runtime/g1/src/parameters.rs                |   4 +--
 runtime/gdev/src/lib.rs                     |  10 +++---
 runtime/gdev/src/parameters.rs              |   4 +--
 runtime/gtest/src/lib.rs                    |   4 +--
 runtime/gtest/src/parameters.rs             |   4 +--
 xtask/src/gen_calls_doc.rs                  |   2 +-
 14 files changed, 61 insertions(+), 49 deletions(-)

diff --git a/end2end-tests/cucumber-genesis/default.json b/end2end-tests/cucumber-genesis/default.json
index 32abeaa56..7eb7b1392 100644
--- a/end2end-tests/cucumber-genesis/default.json
+++ b/end2end-tests/cucumber-genesis/default.json
@@ -53,5 +53,6 @@
       "certs": ["Alice", "Bob"]
     }
   },
-  "sudo_key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
+  "sudo_key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
+  "technical_committee": ["Alice", "Bob", "Charlie"]
 }
diff --git a/end2end-tests/cucumber-genesis/wot.json b/end2end-tests/cucumber-genesis/wot.json
index 205481324..f4048b0b1 100644
--- a/end2end-tests/cucumber-genesis/wot.json
+++ b/end2end-tests/cucumber-genesis/wot.json
@@ -58,5 +58,6 @@
       "certs": ["Alice", "Bob"]
     }
   },
-  "sudo_key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
+  "sudo_key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
+  "technical_committee": ["Alice", "Bob", "Charlie"]
 }
diff --git a/node/src/chain_spec/gdev.rs b/node/src/chain_spec/gdev.rs
index 93290c01a..780cfb188 100644
--- a/node/src/chain_spec/gdev.rs
+++ b/node/src/chain_spec/gdev.rs
@@ -22,7 +22,7 @@ use gdev_runtime::{
     opaque::SessionKeys, AccountConfig, AccountId, AuthorityMembersConfig, BabeConfig,
     BalancesConfig, CertConfig, GenesisConfig, IdentityConfig, ImOnlineId, MembershipConfig,
     ParametersConfig, SessionConfig, SmithsCertConfig, SmithsMembershipConfig, SudoConfig,
-    SystemConfig, UniversalDividendConfig, WASM_BINARY,
+    SystemConfig, TechnicalCommitteeConfig, UniversalDividendConfig, WASM_BINARY,
 };
 use sc_service::ChainType;
 use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
@@ -355,6 +355,13 @@ fn gen_genesis_for_local_chain(
             // Assign network admin rights.
             key: Some(root_key),
         },
+        technical_committee: TechnicalCommitteeConfig {
+            members: initial_smiths
+                .iter()
+                .map(|x| x.0.clone())
+                .collect::<Vec<_>>(),
+            ..Default::default()
+        },
         identity: IdentityConfig {
             identities: initial_identities
                 .iter()
@@ -391,7 +398,6 @@ fn gen_genesis_for_local_chain(
             apply_cert_period_at_genesis: false,
             certs_by_receiver: clique_wot(initial_smiths_len, smith_cert_validity_period),
         },
-        smiths_collective: Default::default(),
         universal_dividend: UniversalDividendConfig {
             first_reeval: 100,
             first_ud,
@@ -439,6 +445,7 @@ fn genesis_data_to_gdev_genesis_conf(
         smiths_certs_by_receiver,
         smiths_memberships,
         sudo_key,
+        technical_committee_members,
     } = genesis_data;
 
     gdev_runtime::GenesisConfig {
@@ -466,6 +473,10 @@ fn genesis_data_to_gdev_genesis_conf(
                 .collect::<Vec<_>>(),
         },
         sudo: SudoConfig { key: sudo_key },
+        technical_committee: TechnicalCommitteeConfig {
+            members: technical_committee_members,
+            ..Default::default()
+        },
         identity: IdentityConfig {
             identities: identities
                 .into_iter()
@@ -496,7 +507,6 @@ fn genesis_data_to_gdev_genesis_conf(
         smiths_membership: SmithsMembershipConfig {
             memberships: smiths_memberships,
         },
-        smiths_collective: Default::default(),
         universal_dividend: UniversalDividendConfig {
             first_reeval: first_ud_reeval,
             first_ud,
diff --git a/node/src/chain_spec/gen_genesis_data.rs b/node/src/chain_spec/gen_genesis_data.rs
index dd552e9be..5b46cc55f 100644
--- a/node/src/chain_spec/gen_genesis_data.rs
+++ b/node/src/chain_spec/gen_genesis_data.rs
@@ -38,6 +38,7 @@ pub struct GenesisData<Parameters: DeserializeOwned, SessionKeys: Decode> {
     pub smiths_certs_by_receiver: BTreeMap<u32, BTreeMap<u32, u32>>,
     pub smiths_memberships: BTreeMap<u32, MembershipData>,
     pub sudo_key: Option<AccountId>,
+    pub technical_committee_members: Vec<AccountId>,
 }
 
 #[derive(Default)]
@@ -58,6 +59,7 @@ struct GenesisConfig<Parameters> {
     #[serde(rename = "smiths")]
     smith_identities: BTreeMap<String, SmithData>,
     sudo_key: Option<AccountId>,
+    technical_committee: Vec<String>,
     #[serde(default)]
     wallets: BTreeMap<AccountId, u64>,
 }
@@ -134,6 +136,7 @@ where
         parameters,
         identities,
         smith_identities,
+        technical_committee,
         wallets,
     } = genesis_config;
 
@@ -145,6 +148,7 @@ where
     let mut idty_index_of = BTreeMap::new();
     let mut initial_monetary_mass = 0;
     let mut memberships = BTreeMap::new();
+    let mut technical_committee_members = Vec::with_capacity(technical_committee.len());
     //let mut total_dust = 0;
 
     // SIMPLE WALLETS //
@@ -162,6 +166,16 @@ where
         );
     }
 
+    // Technical Comittee //
+
+    for idty_name in technical_committee {
+        if let Some(identity) = identities.get(&idty_name) {
+            technical_committee_members.push(identity.pubkey.clone());
+        } else {
+            return Err(format!("Identity '{}' not exist", idty_name));
+        }
+    }
+
     // IDENTITIES //
 
     for (idty_name, identity) in &identities {
@@ -320,6 +334,7 @@ where
         smiths_certs_by_receiver,
         smiths_memberships,
         sudo_key,
+        technical_committee_members,
     };
 
     Ok(f(genesis_data))
diff --git a/resources/gdev.json b/resources/gdev.json
index 45aa222ba..02be64086 100644
--- a/resources/gdev.json
+++ b/resources/gdev.json
@@ -183,5 +183,6 @@
       "certs": ["Elois","tuxmain","HugoTrentesaux"]
     }
   },
-  "sudo_key": "5Co5AWcBiz4HaAEpu8BxLdghnCob89rFGU5yQ65WP3t2jsyB"
+  "sudo_key": "5Co5AWcBiz4HaAEpu8BxLdghnCob89rFGU5yQ65WP3t2jsyB",
+  "technical_committee": ["Elois", "cgeek", "tuxmain", "HugoTrentesaux"]
 }
diff --git a/resources/metadata.scale b/resources/metadata.scale
index 745d186e552bbd0323d9e2e78cf80fd620892fe9..bfcf355fbb83ffe14485443a7ec787fd343d01f1 100644
GIT binary patch
delta 1732
zcmbQWoPEV|_6>q;Vjdx>$r*W>$%#46`MJ57B_*k;EDSd$zhie|6rU`>Cd&MPamjQ(
zdq&C0j%;#_FD56j88Uxh{4+U`U3l_xHZ#UAll$4-CabVZF#mvyYE7<T7h?P~xu4y8
zvk}KE+07G8-5DA0Y`$qWkD2`r0|P4q!-MHO_KYf%->aH)Jz<myP4Uc2Nv)WCP|bdF
zzS=#;CzJiuyTPQ{WC4v<_9qMstSk&KCU00RF?ox|HO4oayEP9mvcF+qU}a+XF#Ul$
zqs-<B2DVI$U#9naGs<s%Ym^AG&)>v>k?{wT^dAiA$>mn(8SiX%x0dE$e6l&&*^Egj
z1tUZ@uXGh-V|=sufcJh*#y682LZunsY@QRko?8-Y=p`~S-klr}8zYBdP^ykXP-$LC
zW^Sq-12}XUGbbk`cCh3!F>VFvnCy|H#L~&cxOe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cQI-)zMS5-i?NBZb-Lhg#tfE5CdL=rYj-nxGBUoMetZw3I^)Ob@Aoh+W9emL
zd^7#dLB`DKO#2usn7%Skui3}w0n<GdqI)6};}?)_Z^r5W4=@_R^v+~r`~lMY(DW~}
zDS8S`WyBDXPzfl?FUT)W%qeDMU}Tv-cQa!xC<0`*Fs3ptoZhsBaS!KQCdNMujGQcH
e+YcOKe8$3dhl7iO<<0bUXBfq|A3o0blp6r?5_X^f

diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs
index 20dc90e79..148ee661d 100644
--- a/runtime/common/src/pallets_config.rs
+++ b/runtime/common/src/pallets_config.rs
@@ -262,17 +262,17 @@ macro_rules! pallets_config {
 
 		#[cfg(feature = "runtime-benchmarks")]
 		parameter_types! {
-			pub const WorstCaseOrigin: pallet_collective::RawOrigin<AccountId, SmithsInstance> =
-				pallet_collective::RawOrigin::<AccountId, SmithsInstance>::Members(2, 3);
+			pub const WorstCaseOrigin: pallet_collective::RawOrigin<AccountId, TechnicalCommitteeInstance> =
+				pallet_collective::RawOrigin::<AccountId, TechnicalCommitteeInstance>::Members(2, 3);
 		}
 
 		impl pallet_upgrade_origin::Config for Runtime {
 			type Event = Event;
 			type Call = Call;
-			type UpgradableOrigin = pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, SmithsInstance>;
+			type UpgradableOrigin = pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, TechnicalCommitteeInstance>;
 			type WeightInfo = common_runtime::weights::pallet_upgrade_origin::WeightInfo<Runtime>;
 			#[cfg(feature = "runtime-benchmarks")]
-			type WorstCaseOriginType = pallet_collective::RawOrigin<AccountId, SmithsInstance>;
+			type WorstCaseOriginType = pallet_collective::RawOrigin<AccountId, TechnicalCommitteeInstance>;
 			#[cfg(feature = "runtime-benchmarks")]
 			type WorstCaseOrigin = WorstCaseOrigin;
 		}
@@ -499,8 +499,8 @@ macro_rules! pallets_config {
             type ValidityPeriod = SmithValidityPeriod;
         }
 
-        pub struct SmithMembersDefaultVote;
-        impl pallet_collective::DefaultVote for SmithMembersDefaultVote {
+        pub struct TechnicalCommitteeDefaultVote;
+        impl pallet_collective::DefaultVote for TechnicalCommitteeDefaultVote {
             fn default_vote(
                 _prime_vote: Option<bool>,
                 _yes_votes: u32,
@@ -510,34 +510,18 @@ macro_rules! pallets_config {
                 false
             }
         }
-        pub struct SmithMembersStorage;
-        impl sp_runtime::traits::IsMember<AccountId> for SmithMembersStorage {
-            fn is_member(account_id: &AccountId) -> bool {
-                use sp_runtime::traits::Convert as _;
-                if let Some(idty_index) = common_runtime::providers::IdentityIndexOf::<Runtime>::convert(account_id.clone()) {
-                    pallet_membership::Pallet::<Runtime, Instance2>::is_member(&idty_index)
-                } else {
-                    false
-                }
-            }
-        }
-        impl pallet_collective::MembersStorage<AccountId> for SmithMembersStorage {
-            fn members_count() -> u32 {
-                pallet_membership::Membership::<Runtime, Instance2>::count()
-            }
-        }
         parameter_types! {
-            pub const SmithsMotionDuration: BlockNumber = 7 * DAYS;
+            pub const TechnicalCommitteeMotionDuration: BlockNumber = 7 * DAYS;
         }
         impl pallet_collective::Config<Instance2> for Runtime {
             type Origin = Origin;
             type Proposal = Call;
             type Event = Event;
-            type MotionDuration = SmithsMotionDuration;
+            type MotionDuration = TechnicalCommitteeMotionDuration;
             type MaxProposals = frame_support::pallet_prelude::ConstU32<20>;
-            type MaxMembers = frame_support::pallet_prelude::ConstU32<1_000>;
-            type MembersStorage = SmithMembersStorage;
-            type DefaultVote = SmithMembersDefaultVote;
+            type MaxMembers = frame_support::pallet_prelude::ConstU32<100>;
+            type MembersStorage = pallet_collective::InternalMembersStorage<Runtime, Instance2>;
+            type DefaultVote = TechnicalCommitteeDefaultVote;
             type WeightInfo = pallet_collective::weights::SubstrateWeight<Runtime>;
         }
     };
diff --git a/runtime/g1/src/lib.rs b/runtime/g1/src/lib.rs
index 4255e3e6d..da2ddd643 100644
--- a/runtime/g1/src/lib.rs
+++ b/runtime/g1/src/lib.rs
@@ -124,7 +124,7 @@ pub type Executive = frame_executive::Executive<
     AllPalletsWithSystem,
 >;
 
-pub type SmithsInstance = Instance2;
+pub type TechnicalCommitteeInstance = Instance2;
 
 pub struct BaseCallFilter;
 impl Contains<Call> for BaseCallFilter {
@@ -230,6 +230,7 @@ construct_runtime!(
         Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 20,
         UpgradeOrigin: pallet_upgrade_origin::{Pallet, Call, Event} = 21,
         Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 22,
+        TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 23,
 
         // Universal dividend
         UniversalDividend: pallet_universal_dividend::{Pallet, Call, Config<T>, Storage, Event<T>} = 30,
@@ -244,7 +245,6 @@ construct_runtime!(
         SmithsSubWot: pallet_duniter_wot::<Instance2>::{Pallet} = 50,
         SmithsMembership: pallet_membership::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>} = 52,
         SmithsCert: pallet_certification::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>} = 53,
-        SmithsCollective: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 54,
 
         // Utilities
         AtomicSwap: pallet_atomic_swap::{Pallet, Call, Storage, Event<T>} = 60,
diff --git a/runtime/g1/src/parameters.rs b/runtime/g1/src/parameters.rs
index 24a32ac67..88b6cb704 100644
--- a/runtime/g1/src/parameters.rs
+++ b/runtime/g1/src/parameters.rs
@@ -155,6 +155,6 @@ parameter_types! {
 
 // Treasury
 pub type TreasuryApproveOrigin =
-    pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, SmithsInstance>;
+    pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, TechnicalCommitteeInstance>;
 pub type TreasuryRejectOrigin =
-    pallet_collective::EnsureProportionMoreThan<_1, _3, AccountId, SmithsInstance>;
+    pallet_collective::EnsureProportionMoreThan<_1, _3, AccountId, TechnicalCommitteeInstance>;
diff --git a/runtime/gdev/src/lib.rs b/runtime/gdev/src/lib.rs
index 8476ea5e7..84cc9fbd0 100644
--- a/runtime/gdev/src/lib.rs
+++ b/runtime/gdev/src/lib.rs
@@ -129,7 +129,7 @@ pub type Executive = frame_executive::Executive<
     AllPalletsWithSystem,
 >;
 
-pub type SmithsInstance = Instance2;
+pub type TechnicalCommitteeInstance = Instance2;
 
 pub struct BaseCallFilter;
 #[cfg(not(feature = "runtime-benchmarks"))]
@@ -181,7 +181,7 @@ pub enum ProxyType {
     AlmostAny = 0,
     TransferOnly = 1,
     CancelProxy = 2,
-    SmithsCollectivePropose = 3,
+    TechnicalCommitteePropose = 3,
 }
 impl Default for ProxyType {
     fn default() -> Self {
@@ -207,10 +207,10 @@ impl frame_support::traits::InstanceFilter<Call> for ProxyType {
                     Call::Proxy(pallet_proxy::Call::reject_announcement { .. })
                 )
             }
-            ProxyType::SmithsCollectivePropose => {
+            ProxyType::TechnicalCommitteePropose => {
                 matches!(
                     c,
-                    Call::SmithsCollective(pallet_collective::Call::propose { .. })
+                    Call::TechnicalCommittee(pallet_collective::Call::propose { .. })
                 )
             }
         }
@@ -300,6 +300,7 @@ construct_runtime!(
         Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 20,
         UpgradeOrigin: pallet_upgrade_origin::{Pallet, Call, Event} = 21,
         Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 22,
+        TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 23,
 
         // Universal dividend
         UniversalDividend: pallet_universal_dividend::{Pallet, Call, Config<T>, Storage, Event<T>} = 30,
@@ -314,7 +315,6 @@ construct_runtime!(
         SmithsSubWot: pallet_duniter_wot::<Instance2>::{Pallet} = 50,
         SmithsMembership: pallet_membership::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>} = 52,
         SmithsCert: pallet_certification::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>} = 53,
-        SmithsCollective: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 54,
 
         // Utilities
         AtomicSwap: pallet_atomic_swap::{Pallet, Call, Storage, Event<T>} = 60,
diff --git a/runtime/gdev/src/parameters.rs b/runtime/gdev/src/parameters.rs
index a9fe4dbbc..d7687e76f 100644
--- a/runtime/gdev/src/parameters.rs
+++ b/runtime/gdev/src/parameters.rs
@@ -105,6 +105,6 @@ parameter_types! {
 
 // Treasury
 pub type TreasuryApproveOrigin =
-    pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, SmithsInstance>;
+    pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, TechnicalCommitteeInstance>;
 pub type TreasuryRejectOrigin =
-    pallet_collective::EnsureProportionMoreThan<_1, _3, AccountId, SmithsInstance>;
+    pallet_collective::EnsureProportionMoreThan<_1, _3, AccountId, TechnicalCommitteeInstance>;
diff --git a/runtime/gtest/src/lib.rs b/runtime/gtest/src/lib.rs
index 4baa62935..dfe46aac7 100644
--- a/runtime/gtest/src/lib.rs
+++ b/runtime/gtest/src/lib.rs
@@ -125,7 +125,7 @@ pub type Executive = frame_executive::Executive<
     AllPalletsWithSystem,
 >;
 
-pub type SmithsInstance = Instance2;
+pub type TechnicalCommitteeInstance = Instance2;
 
 pub struct BaseCallFilter;
 impl Contains<Call> for BaseCallFilter {
@@ -231,6 +231,7 @@ construct_runtime!(
         Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 20,
         UpgradeOrigin: pallet_upgrade_origin::{Pallet, Call, Event} = 21,
         Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 22,
+        TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 23,
 
         // Universal dividend
         UniversalDividend: pallet_universal_dividend::{Pallet, Call, Config<T>, Storage, Event<T>} = 30,
@@ -245,7 +246,6 @@ construct_runtime!(
         SmithsSubWot: pallet_duniter_wot::<Instance2>::{Pallet} = 50,
         SmithsMembership: pallet_membership::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>} = 52,
         SmithsCert: pallet_certification::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>} = 53,
-        SmithsCollective: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 54,
 
         // Utilities
         AtomicSwap: pallet_atomic_swap::{Pallet, Call, Storage, Event<T>} = 60,
diff --git a/runtime/gtest/src/parameters.rs b/runtime/gtest/src/parameters.rs
index 745786181..fbf009642 100644
--- a/runtime/gtest/src/parameters.rs
+++ b/runtime/gtest/src/parameters.rs
@@ -155,6 +155,6 @@ parameter_types! {
 
 // Treasury
 pub type TreasuryApproveOrigin =
-    pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, SmithsInstance>;
+    pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, TechnicalCommitteeInstance>;
 pub type TreasuryRejectOrigin =
-    pallet_collective::EnsureProportionMoreThan<_1, _3, AccountId, SmithsInstance>;
+    pallet_collective::EnsureProportionMoreThan<_1, _3, AccountId, TechnicalCommitteeInstance>;
diff --git a/xtask/src/gen_calls_doc.rs b/xtask/src/gen_calls_doc.rs
index 5dc50f0cc..5b14ad445 100644
--- a/xtask/src/gen_calls_doc.rs
+++ b/xtask/src/gen_calls_doc.rs
@@ -64,7 +64,7 @@ impl CallCategory {
             ("SmithsCert", "force_add_cert" | "del_cert" | "remove_all_certs_received_by") => {
                 Self::Root
             }
-            ("SmithsCollective", "set_members" | "disapprove_proposal") => Self::Root,
+            ("TechnicalCommittee", "set_members" | "disapprove_proposal") => Self::Root,
             ("Utility", "dispatch_as") => Self::Root,
             ("Treasury", "approve_proposal" | "reject_proposal") => Self::OtherOrigin,
             _ => Self::User,
-- 
GitLab