diff --git a/CHANGELOG.md b/CHANGELOG.md index a88685657..a5b14caa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [C] Changes is `Cere` Runtime - [D] Changes is `Cere Dev` Runtime +## [5.3.1] + +### Changed + +- [C,D] `WhitelistOrigin` is set to the Technical Committee Collective Body ## [5.3.0] diff --git a/Cargo.lock b/Cargo.lock index 746efb529..47fd23467 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -920,7 +920,7 @@ dependencies = [ [[package]] name = "cere-cli" -version = "5.3.0" +version = "5.3.1" dependencies = [ "cere-client", "cere-service", @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "cere-client" -version = "5.3.0" +version = "5.3.1" dependencies = [ "cere-dev-runtime", "cere-runtime", @@ -969,7 +969,7 @@ dependencies = [ [[package]] name = "cere-dev-runtime" -version = "5.3.0" +version = "5.3.1" dependencies = [ "cere-runtime-common", "ddc-primitives", @@ -1060,7 +1060,7 @@ dependencies = [ [[package]] name = "cere-rpc" -version = "5.3.0" +version = "5.3.1" dependencies = [ "jsonrpsee", "node-primitives", @@ -1089,7 +1089,7 @@ dependencies = [ [[package]] name = "cere-runtime" -version = "5.3.0" +version = "5.3.1" dependencies = [ "cere-runtime-common", "ddc-primitives", @@ -1180,7 +1180,7 @@ dependencies = [ [[package]] name = "cere-runtime-common" -version = "5.3.0" +version = "5.3.1" dependencies = [ "frame-support", "frame-system", @@ -1199,7 +1199,7 @@ dependencies = [ [[package]] name = "cere-service" -version = "5.3.0" +version = "5.3.1" dependencies = [ "cere-client", "cere-dev-runtime", @@ -1846,7 +1846,7 @@ dependencies = [ [[package]] name = "ddc-primitives" -version = "5.3.0" +version = "5.3.1" dependencies = [ "frame-support", "frame-system", @@ -5048,7 +5048,7 @@ dependencies = [ [[package]] name = "pallet-chainbridge" -version = "5.3.0" +version = "5.3.1" dependencies = [ "frame-support", "frame-system", @@ -5169,7 +5169,7 @@ dependencies = [ [[package]] name = "pallet-ddc-clusters" -version = "5.3.0" +version = "5.3.1" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5196,7 +5196,7 @@ dependencies = [ [[package]] name = "pallet-ddc-customers" -version = "5.3.0" +version = "5.3.1" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5219,7 +5219,7 @@ dependencies = [ [[package]] name = "pallet-ddc-nodes" -version = "5.3.0" +version = "5.3.1" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5240,7 +5240,7 @@ dependencies = [ [[package]] name = "pallet-ddc-payouts" -version = "5.3.0" +version = "5.3.1" dependencies = [ "byte-unit", "chrono", @@ -5264,7 +5264,7 @@ dependencies = [ [[package]] name = "pallet-ddc-staking" -version = "5.3.0" +version = "5.3.1" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -5360,7 +5360,7 @@ dependencies = [ [[package]] name = "pallet-erc20" -version = "5.3.0" +version = "5.3.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5379,7 +5379,7 @@ dependencies = [ [[package]] name = "pallet-erc721" -version = "5.3.0" +version = "5.3.1" dependencies = [ "frame-benchmarking", "frame-support", diff --git a/Cargo.toml b/Cargo.toml index 4bfe6aa5d..f8d43f828 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "5.3.0" +version = "5.3.1" authors = ["Cerebellum-Network"] edition = "2021" homepage = "https://cere.network/" diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index 05f71ff88..4050b00cf 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -212,6 +212,14 @@ pub fn cere_dev_genesis( ddc_clusters: Default::default(), ddc_nodes: Default::default(), ddc_payouts: Default::default(), + tech_comm: cere_dev::TechCommConfig { + members: endowed_accounts + .iter() + .take((endowed_accounts.len() + 1) / 2) + .cloned() + .collect(), + phantom: Default::default(), + }, } } diff --git a/runtime/cere-dev/src/governance/mod.rs b/runtime/cere-dev/src/governance/mod.rs index 75b25fcc8..838ded0bc 100644 --- a/runtime/cere-dev/src/governance/mod.rs +++ b/runtime/cere-dev/src/governance/mod.rs @@ -44,8 +44,11 @@ impl pallet_whitelist::Config for Runtime { type WeightInfo = pallet_whitelist::weights::SubstrateWeight; type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; - type WhitelistOrigin = EnsureRoot; - type DispatchWhitelistedOrigin = EitherOf, WhitelistedCaller>; + type WhitelistOrigin = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureMembers, + >; + type DispatchWhitelistedOrigin = EitherOf, WhitelistedCaller>; type Preimages = Preimage; } diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index 37843e8d1..566cc5bfa 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -140,7 +140,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 53003, + spec_version: 53100, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 17, @@ -1180,6 +1180,26 @@ impl pallet_ddc_payouts::Config for Runtime { type VoteScoreToU64 = IdentityConvert; // used for UseNominatorsAndValidatorsMap } +parameter_types! { + pub const TechnicalMotionDuration: BlockNumber = 5 * DAYS; + pub const TechnicalMaxProposals: u32 = 100; + pub const TechnicalMaxMembers: u32 = 100; +} + +type TechCommCollective = pallet_collective::Instance3; +impl pallet_collective::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = TechnicalMotionDuration; + type MaxProposals = TechnicalMaxProposals; + type MaxMembers = TechnicalMaxMembers; + type SetMembersOrigin = EnsureRoot; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type WeightInfo = pallet_collective::weights::SubstrateWeight; + type MaxProposalWeight = MaxCollectivesProposalWeight; +} + construct_runtime!( pub struct Runtime { @@ -1231,6 +1251,7 @@ construct_runtime!( Origins: pallet_custom_origins::{Origin}, Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event}, // End OpenGov. + TechComm: pallet_collective::, } ); @@ -1403,6 +1424,7 @@ mod benches { [pallet_conviction_voting, ConvictionVoting] [pallet_referenda, Referenda] [pallet_whitelist, Whitelist] + [pallet_collective, TechComm] ); } diff --git a/runtime/cere/src/governance/mod.rs b/runtime/cere/src/governance/mod.rs index 1e2c835e6..b67945012 100644 --- a/runtime/cere/src/governance/mod.rs +++ b/runtime/cere/src/governance/mod.rs @@ -44,8 +44,11 @@ impl pallet_whitelist::Config for Runtime { type WeightInfo = pallet_whitelist::weights::SubstrateWeight; type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; - type WhitelistOrigin = EnsureRoot; - type DispatchWhitelistedOrigin = EitherOf, WhitelistedCaller>; + type WhitelistOrigin = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureMembers, + >; + type DispatchWhitelistedOrigin = EitherOf, WhitelistedCaller>; type Preimages = Preimage; } diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index d4e6450d6..fa6fea197 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -134,7 +134,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 53003, + spec_version: 53100, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 17, @@ -1182,6 +1182,26 @@ impl pallet_ddc_staking::Config for Runtime { type NodeCreator = pallet_ddc_nodes::Pallet; } +parameter_types! { + pub const TechnicalMotionDuration: BlockNumber = 5 * DAYS; + pub const TechnicalMaxProposals: u32 = 100; + pub const TechnicalMaxMembers: u32 = 100; +} + +type TechCommCollective = pallet_collective::Instance3; +impl pallet_collective::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = TechnicalMotionDuration; + type MaxProposals = TechnicalMaxProposals; + type MaxMembers = TechnicalMaxMembers; + type SetMembersOrigin = EnsureRoot; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type WeightInfo = pallet_collective::weights::SubstrateWeight; + type MaxProposalWeight = MaxCollectivesProposalWeight; +} + construct_runtime!( pub struct Runtime { @@ -1233,6 +1253,7 @@ construct_runtime!( Origins: pallet_custom_origins::{Origin}, Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event}, // End OpenGov. + TechComm: pallet_collective::, } ); @@ -1405,6 +1426,7 @@ mod benches { [pallet_conviction_voting, ConvictionVoting] [pallet_referenda, Referenda] [pallet_whitelist, Whitelist] + [pallet_collective, TechComm] ); }