diff --git a/.github/workflows/srtool.yml b/.github/workflows/srtool.yml index a58fb1717..e9a4a4af1 100644 --- a/.github/workflows/srtool.yml +++ b/.github/workflows/srtool.yml @@ -102,19 +102,19 @@ jobs: fields: repo,message,commit,author,eventName,ref,workflow if: always() - postrelease: - needs: srtool - runs-on: ${{ needs.start-runner.outputs.label }} - if: startsWith(github.ref, 'refs/tags/') - steps: - - name: Get GIT Tag - id: git_tag - run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} - - name: Discord notification - env: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - DISCORD_USERNAME: parallel-release-bot - DISCORD_AVATAR: https://avatars.githubusercontent.com/u/79623569 - uses: Ilshidur/action-discord@master - with: - args: "Parallel ${{ steps.git_tag.outputs.tag }} has just been released! Go check it out: https://github.com/${{ github.repository }}/releases/tag/${{ steps.git_tag.outputs.tag }}" + # postrelease: + # needs: srtool + # runs-on: ${{ needs.start-runner.outputs.label }} + # if: startsWith(github.ref, 'refs/tags/') + # steps: + # - name: Get GIT Tag + # id: git_tag + # run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} + # - name: Discord notification + # env: + # DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + # DISCORD_USERNAME: parallel-release-bot + # DISCORD_AVATAR: https://avatars.githubusercontent.com/u/79623569 + # uses: Ilshidur/action-discord@master + # with: + # args: "Parallel ${{ steps.git_tag.outputs.tag }} has just been released! Go check it out: https://github.com/${{ github.repository }}/releases/tag/${{ steps.git_tag.outputs.tag }}" diff --git a/node/parallel/src/chain_spec/heiko.rs b/node/parallel/src/chain_spec/heiko.rs index 49cb3423c..16fb2b586 100644 --- a/node/parallel/src/chain_spec/heiko.rs +++ b/node/parallel/src/chain_spec/heiko.rs @@ -15,11 +15,11 @@ use heiko_runtime::SudoConfig; use heiko_runtime::{ opaque::SessionKeys, BalancesConfig, BaseFeeConfig, BridgeMembershipConfig, - CollatorSelectionConfig, CrowdloansAutomatorsMembershipConfig, DemocracyConfig, EVMConfig, - GeneralCouncilConfig, GeneralCouncilMembershipConfig, GenesisConfig, - LiquidStakingAgentsMembershipConfig, LiquidStakingConfig, OracleMembershipConfig, - ParachainInfoConfig, ParallelPrecompilesType, PolkadotXcmConfig, SessionConfig, SystemConfig, - TechnicalCommitteeMembershipConfig, VestingConfig, WASM_BINARY, + CollatorSelectionConfig, CrowdloansAutomatorsMembershipConfig, EVMConfig, GeneralCouncilConfig, + GeneralCouncilMembershipConfig, GenesisConfig, LiquidStakingAgentsMembershipConfig, + LiquidStakingConfig, OracleMembershipConfig, ParachainInfoConfig, ParallelPrecompilesType, + PolkadotXcmConfig, SessionConfig, SystemConfig, TechnicalCommitteeMembershipConfig, + VestingConfig, WASM_BINARY, }; use primitives::*; use sc_service::ChainType; @@ -183,7 +183,7 @@ fn heiko_genesis( exchange_rate: Rate::saturating_from_rational(100_u32, 100_u32), // 1 reserve_factor: Ratio::from_rational(1u32, 10_000u32), // 0.01% }, - democracy: DemocracyConfig::default(), + // democracy: DemocracyConfig::default(), general_council: GeneralCouncilConfig::default(), general_council_membership: GeneralCouncilMembershipConfig { members: council.try_into().unwrap(), diff --git a/node/parallel/src/chain_spec/kerria.rs b/node/parallel/src/chain_spec/kerria.rs index 954045b9f..1f930e7c8 100644 --- a/node/parallel/src/chain_spec/kerria.rs +++ b/node/parallel/src/chain_spec/kerria.rs @@ -14,11 +14,11 @@ use kerria_runtime::{ opaque::SessionKeys, BalancesConfig, BaseFeeConfig, BridgeMembershipConfig, - CollatorSelectionConfig, CrowdloansAutomatorsMembershipConfig, DemocracyConfig, EVMConfig, - GeneralCouncilConfig, GeneralCouncilMembershipConfig, GenesisConfig, - LiquidStakingAgentsMembershipConfig, LiquidStakingConfig, OracleMembershipConfig, - ParachainInfoConfig, ParallelPrecompilesType, PolkadotXcmConfig, SessionConfig, SudoConfig, - SystemConfig, TechnicalCommitteeMembershipConfig, VestingConfig, WASM_BINARY, + CollatorSelectionConfig, CrowdloansAutomatorsMembershipConfig, EVMConfig, GeneralCouncilConfig, + GeneralCouncilMembershipConfig, GenesisConfig, LiquidStakingAgentsMembershipConfig, + LiquidStakingConfig, OracleMembershipConfig, ParachainInfoConfig, ParallelPrecompilesType, + PolkadotXcmConfig, SessionConfig, SudoConfig, SystemConfig, TechnicalCommitteeMembershipConfig, + VestingConfig, WASM_BINARY, }; use primitives::{network::NetworkType, *}; use sc_service::ChainType; @@ -203,7 +203,7 @@ fn kerria_genesis( exchange_rate: Rate::saturating_from_rational(100u32, 100u32), // 1 reserve_factor: Ratio::from_rational(5u32, 10_000u32), // 0.05% }, - democracy: DemocracyConfig::default(), + // democracy: DemocracyConfig::default(), general_council: GeneralCouncilConfig::default(), general_council_membership: GeneralCouncilMembershipConfig { members: council.try_into().unwrap(), diff --git a/node/parallel/src/chain_spec/parallel.rs b/node/parallel/src/chain_spec/parallel.rs index 316d018ec..8401a71f1 100644 --- a/node/parallel/src/chain_spec/parallel.rs +++ b/node/parallel/src/chain_spec/parallel.rs @@ -15,11 +15,11 @@ use parallel_runtime::SudoConfig; use parallel_runtime::{ opaque::SessionKeys, BalancesConfig, BaseFeeConfig, BridgeMembershipConfig, - CollatorSelectionConfig, CrowdloansAutomatorsMembershipConfig, DemocracyConfig, EVMConfig, - GeneralCouncilConfig, GeneralCouncilMembershipConfig, GenesisConfig, - LiquidStakingAgentsMembershipConfig, LiquidStakingConfig, OracleMembershipConfig, - ParachainInfoConfig, ParallelPrecompilesType, PolkadotXcmConfig, SessionConfig, SystemConfig, - TechnicalCommitteeMembershipConfig, VestingConfig, WASM_BINARY, + CollatorSelectionConfig, CrowdloansAutomatorsMembershipConfig, EVMConfig, GeneralCouncilConfig, + GeneralCouncilMembershipConfig, GenesisConfig, LiquidStakingAgentsMembershipConfig, + LiquidStakingConfig, OracleMembershipConfig, ParachainInfoConfig, ParallelPrecompilesType, + PolkadotXcmConfig, SessionConfig, SystemConfig, TechnicalCommitteeMembershipConfig, + VestingConfig, WASM_BINARY, }; use primitives::{network::NetworkType, *}; use sc_service::ChainType; @@ -179,7 +179,7 @@ fn parallel_genesis( exchange_rate: Rate::saturating_from_rational(100_u32, 100_u32), // 1 reserve_factor: Ratio::from_rational(5u32, 10_000u32), //0.05% }, - democracy: DemocracyConfig::default(), + // democracy: DemocracyConfig::default(), general_council: GeneralCouncilConfig::default(), general_council_membership: GeneralCouncilMembershipConfig { members: council.try_into().unwrap(), diff --git a/node/parallel/src/chain_spec/vanilla.rs b/node/parallel/src/chain_spec/vanilla.rs index d98704fb0..4936f8121 100644 --- a/node/parallel/src/chain_spec/vanilla.rs +++ b/node/parallel/src/chain_spec/vanilla.rs @@ -21,11 +21,11 @@ use sp_runtime::{traits::Zero, FixedPointNumber}; use std::{collections::BTreeMap, str::FromStr}; use vanilla_runtime::{ opaque::SessionKeys, BalancesConfig, BaseFeeConfig, BridgeMembershipConfig, - CollatorSelectionConfig, CrowdloansAutomatorsMembershipConfig, DemocracyConfig, EVMConfig, - GeneralCouncilConfig, GeneralCouncilMembershipConfig, GenesisConfig, - LiquidStakingAgentsMembershipConfig, LiquidStakingConfig, OracleMembershipConfig, - ParachainInfoConfig, ParallelPrecompilesType, PolkadotXcmConfig, SessionConfig, SudoConfig, - SystemConfig, TechnicalCommitteeMembershipConfig, VestingConfig, WASM_BINARY, + CollatorSelectionConfig, CrowdloansAutomatorsMembershipConfig, EVMConfig, GeneralCouncilConfig, + GeneralCouncilMembershipConfig, GenesisConfig, LiquidStakingAgentsMembershipConfig, + LiquidStakingConfig, OracleMembershipConfig, ParachainInfoConfig, ParallelPrecompilesType, + PolkadotXcmConfig, SessionConfig, SudoConfig, SystemConfig, TechnicalCommitteeMembershipConfig, + VestingConfig, WASM_BINARY, }; use crate::chain_spec::{ @@ -257,7 +257,7 @@ fn vanilla_genesis( exchange_rate: Rate::saturating_from_rational(100u32, 100u32), // 1 reserve_factor: Ratio::from_rational(1u32, 10_000u32), // 0.01% }, - democracy: DemocracyConfig::default(), + // democracy: DemocracyConfig::default(), general_council: GeneralCouncilConfig::default(), general_council_membership: GeneralCouncilMembershipConfig { members: council.try_into().unwrap(), diff --git a/runtime/heiko/src/lib.rs b/runtime/heiko/src/lib.rs index cac160094..56d46a01e 100644 --- a/runtime/heiko/src/lib.rs +++ b/runtime/heiko/src/lib.rs @@ -181,7 +181,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("heiko"), impl_name: create_runtime_str!("heiko"), authoring_version: 1, - spec_version: 209, + spec_version: 312, impl_version: 33, apis: RUNTIME_API_VERSIONS, transaction_version: 17, @@ -262,7 +262,7 @@ impl Contains for WhiteListFilter { RuntimeCall::Assets(pallet_assets::Call::force_transfer { .. }) | // Governance RuntimeCall::Sudo(_) | - RuntimeCall::Democracy(_) | + // RuntimeCall::Democracy(_) | RuntimeCall::GeneralCouncil(_) | RuntimeCall::TechnicalCommittee(_) | RuntimeCall::Treasury(_) | @@ -994,8 +994,8 @@ impl InstanceFilter for ProxyType { ProxyType::Governance => { matches!( c, - RuntimeCall::Democracy(..) - | RuntimeCall::Preimage(..) + // RuntimeCall::Democracy(..) | + RuntimeCall::Preimage(..) | RuntimeCall::GeneralCouncil(..) | RuntimeCall::TechnicalCommittee(..) | RuntimeCall::Treasury(..) @@ -1490,71 +1490,71 @@ type EnsureRootOrMoreThanHalfGeneralCouncil = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionMoreThan, >; -type EnsureRootOrAllTechnicalCommittee = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, ->; - -parameter_types! { - pub const LaunchPeriod: BlockNumber = 1 * DAYS; - pub const VotingPeriod: BlockNumber = 5 * DAYS; - pub const FastTrackVotingPeriod: BlockNumber = 3 * HOURS; - pub const InstantAllowed: bool = true; - pub const MinimumDeposit: Balance = 20_000 * DOLLARS; - pub const EnactmentPeriod: BlockNumber = 1 * DAYS; - pub const CooloffPeriod: BlockNumber = 7 * DAYS; - // One cent: $10,000 / MB - pub const MaxVotes: u32 = 100; - pub const MaxProposals: u32 = 100; -} - -impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = EnactmentPeriod; - type LaunchPeriod = LaunchPeriod; - type VotingPeriod = VotingPeriod; - type MinimumDeposit = MinimumDeposit; - /// A straight majority of the council can decide what their next motion is. - type ExternalOrigin = - pallet_collective::EnsureProportionAtLeast; - /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = - pallet_collective::EnsureProportionMoreThan; - /// A unanimous council can have the next scheduled referendum be a straight default-carries - /// (NTB) vote. - type ExternalDefaultOrigin = - pallet_collective::EnsureProportionAtLeast; - /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote - /// be tabled immediately and with a shorter voting/enactment period. - type FastTrackOrigin = - pallet_collective::EnsureProportionAtLeast; - type InstantOrigin = - pallet_collective::EnsureProportionAtLeast; - type InstantAllowed = InstantAllowed; - type FastTrackVotingPeriod = FastTrackVotingPeriod; - // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = - pallet_collective::EnsureProportionAtLeast; - // To cancel a proposal before it has been passed, the technical committee must be unanimous or - // Root must agree. - type CancelProposalOrigin = EnsureRootOrAllTechnicalCommittee; - type BlacklistOrigin = EnsureRoot; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cool-off period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = CooloffPeriod; - type Slash = Treasury; - type Scheduler = Scheduler; - type PalletsOrigin = OriginCaller; - type MaxVotes = MaxVotes; - type WeightInfo = weights::pallet_democracy::WeightInfo; - type MaxProposals = MaxProposals; - type VoteLockingPeriod = EnactmentPeriod; - type Preimages = Preimage; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; -} +// type EnsureRootOrAllTechnicalCommittee = EitherOfDiverse< +// EnsureRoot, +// pallet_collective::EnsureProportionAtLeast, +// >; + +// parameter_types! { +// pub const LaunchPeriod: BlockNumber = 1 * DAYS; +// pub const VotingPeriod: BlockNumber = 5 * DAYS; +// pub const FastTrackVotingPeriod: BlockNumber = 3 * HOURS; +// pub const InstantAllowed: bool = true; +// pub const MinimumDeposit: Balance = 20_000 * DOLLARS; +// pub const EnactmentPeriod: BlockNumber = 1 * DAYS; +// pub const CooloffPeriod: BlockNumber = 7 * DAYS; +// // One cent: $10,000 / MB +// pub const MaxVotes: u32 = 100; +// pub const MaxProposals: u32 = 100; +// } + +// impl pallet_democracy::Config for Runtime { +// type RuntimeEvent = RuntimeEvent; +// type Currency = Balances; +// type EnactmentPeriod = EnactmentPeriod; +// type LaunchPeriod = LaunchPeriod; +// type VotingPeriod = VotingPeriod; +// type MinimumDeposit = MinimumDeposit; +// /// A straight majority of the council can decide what their next motion is. +// type ExternalOrigin = +// pallet_collective::EnsureProportionAtLeast; +// /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. +// type ExternalMajorityOrigin = +// pallet_collective::EnsureProportionMoreThan; +// /// A unanimous council can have the next scheduled referendum be a straight default-carries +// /// (NTB) vote. +// type ExternalDefaultOrigin = +// pallet_collective::EnsureProportionAtLeast; +// /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote +// /// be tabled immediately and with a shorter voting/enactment period. +// type FastTrackOrigin = +// pallet_collective::EnsureProportionAtLeast; +// type InstantOrigin = +// pallet_collective::EnsureProportionAtLeast; +// type InstantAllowed = InstantAllowed; +// type FastTrackVotingPeriod = FastTrackVotingPeriod; +// // To cancel a proposal which has been passed, 2/3 of the council must agree to it. +// type CancellationOrigin = +// pallet_collective::EnsureProportionAtLeast; +// // To cancel a proposal before it has been passed, the technical committee must be unanimous or +// // Root must agree. +// type CancelProposalOrigin = EnsureRootOrAllTechnicalCommittee; +// type BlacklistOrigin = EnsureRoot; +// // Any single technical committee member may veto a coming council proposal, however they can +// // only do it once and it lasts only for the cool-off period. +// type VetoOrigin = pallet_collective::EnsureMember; +// type CooloffPeriod = CooloffPeriod; +// type Slash = Treasury; +// type Scheduler = Scheduler; +// type PalletsOrigin = OriginCaller; +// type MaxVotes = MaxVotes; +// type WeightInfo = weights::pallet_democracy::WeightInfo; +// type MaxProposals = MaxProposals; +// type VoteLockingPeriod = EnactmentPeriod; +// type Preimages = Preimage; +// type MaxDeposits = ConstU32<100>; +// type MaxBlacklisted = ConstU32<100>; +// } parameter_types! { pub const GeneralCouncilMotionDuration: BlockNumber = 3 * DAYS; @@ -1979,7 +1979,7 @@ construct_runtime!( // Governance Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event} = 10, - Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event} = 11, + // Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event} = 11, GeneralCouncil: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 12, TechnicalCommittee: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 13, Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 14, @@ -2499,7 +2499,7 @@ impl_runtime_apis! { list_benchmark!(list, extra, pallet_utility, Utility); list_benchmark!(list, extra, cumulus_pallet_xcmp_queue, XcmpQueue); list_benchmark!(list, extra, pallet_identity, Identity); - list_benchmark!(list, extra, pallet_democracy, Democracy); + // list_benchmark!(list, extra, pallet_democracy, Democracy); list_benchmark!(list, extra, pallet_collective, TechnicalCommittee); list_benchmark!(list, extra, pallet_preimage, Preimage); list_benchmark!(list, extra, pallet_scheduler, Scheduler); @@ -2558,7 +2558,7 @@ impl_runtime_apis! { add_benchmark!(params, batches, pallet_utility, Utility); add_benchmark!(params, batches, cumulus_pallet_xcmp_queue, XcmpQueue); add_benchmark!(params, batches, pallet_identity, Identity); - add_benchmark!(params, batches, pallet_democracy, Democracy); + // add_benchmark!(params, batches, pallet_democracy, Democracy); add_benchmark!(params, batches, pallet_collective, TechnicalCommittee); add_benchmark!(params, batches, pallet_preimage, Preimage); add_benchmark!(params, batches, pallet_scheduler, Scheduler); diff --git a/runtime/kerria/src/lib.rs b/runtime/kerria/src/lib.rs index 3f5e5419b..6491e3a07 100644 --- a/runtime/kerria/src/lib.rs +++ b/runtime/kerria/src/lib.rs @@ -180,7 +180,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("kerria"), impl_name: create_runtime_str!("kerria"), authoring_version: 1, - spec_version: 311, + spec_version: 312, impl_version: 33, apis: RUNTIME_API_VERSIONS, transaction_version: 17, @@ -261,7 +261,7 @@ impl Contains for WhiteListFilter { RuntimeCall::Assets(pallet_assets::Call::force_transfer { .. }) | // Governance RuntimeCall::Sudo(_) | - RuntimeCall::Democracy(_) | + // RuntimeCall::Democracy(_) | RuntimeCall::GeneralCouncil(_) | RuntimeCall::TechnicalCommittee(_) | RuntimeCall::Treasury(_) | @@ -974,8 +974,8 @@ impl InstanceFilter for ProxyType { ProxyType::Governance => { matches!( c, - RuntimeCall::Democracy(..) - | RuntimeCall::Preimage(..) + // RuntimeCall::Democracy(..) | + RuntimeCall::Preimage(..) | RuntimeCall::GeneralCouncil(..) | RuntimeCall::TechnicalCommittee(..) | RuntimeCall::Treasury(..) @@ -1479,71 +1479,71 @@ type EnsureRootOrMoreThanHalfGeneralCouncil = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionMoreThan, >; -type EnsureRootOrAllTechnicalCommittee = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, ->; - -parameter_types! { - pub const LaunchPeriod: BlockNumber = 1; - pub const VotingPeriod: BlockNumber = 1 * MINUTES; - pub const FastTrackVotingPeriod: BlockNumber = 1 * MINUTES; - pub const InstantAllowed: bool = true; - pub const MinimumDeposit: Balance = 100 * DOLLARS; - pub const EnactmentPeriod: BlockNumber = 1; - pub const CooloffPeriod: BlockNumber = 1 * MINUTES; - // One cent: $10,000 / MB - pub const MaxVotes: u32 = 100; - pub const MaxProposals: u32 = 100; -} - -impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = EnactmentPeriod; - type LaunchPeriod = LaunchPeriod; - type VotingPeriod = VotingPeriod; - type MinimumDeposit = MinimumDeposit; - /// A straight majority of the council can decide what their next motion is. - type ExternalOrigin = - pallet_collective::EnsureProportionAtLeast; - /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = - pallet_collective::EnsureProportionMoreThan; - /// A unanimous council can have the next scheduled referendum be a straight default-carries - /// (NTB) vote. - type ExternalDefaultOrigin = - pallet_collective::EnsureProportionAtLeast; - /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote - /// be tabled immediately and with a shorter voting/enactment period. - type FastTrackOrigin = - pallet_collective::EnsureProportionAtLeast; - type InstantOrigin = - pallet_collective::EnsureProportionAtLeast; - type InstantAllowed = InstantAllowed; - type FastTrackVotingPeriod = FastTrackVotingPeriod; - // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = - pallet_collective::EnsureProportionAtLeast; - // To cancel a proposal before it has been passed, the technical committee must be unanimous or - // Root must agree. - type CancelProposalOrigin = EnsureRootOrAllTechnicalCommittee; - type BlacklistOrigin = EnsureRoot; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cool-off period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = CooloffPeriod; - type Slash = Treasury; - type Scheduler = Scheduler; - type PalletsOrigin = OriginCaller; - type MaxVotes = MaxVotes; - type WeightInfo = pallet_democracy::weights::SubstrateWeight; - type MaxProposals = MaxProposals; - type VoteLockingPeriod = EnactmentPeriod; - type Preimages = Preimage; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; -} +// type EnsureRootOrAllTechnicalCommittee = EitherOfDiverse< +// EnsureRoot, +// pallet_collective::EnsureProportionAtLeast, +// >; + +// parameter_types! { +// pub const LaunchPeriod: BlockNumber = 1; +// pub const VotingPeriod: BlockNumber = 1 * MINUTES; +// pub const FastTrackVotingPeriod: BlockNumber = 1 * MINUTES; +// pub const InstantAllowed: bool = true; +// pub const MinimumDeposit: Balance = 100 * DOLLARS; +// pub const EnactmentPeriod: BlockNumber = 1; +// pub const CooloffPeriod: BlockNumber = 1 * MINUTES; +// // One cent: $10,000 / MB +// pub const MaxVotes: u32 = 100; +// pub const MaxProposals: u32 = 100; +// } + +// impl pallet_democracy::Config for Runtime { +// type RuntimeEvent = RuntimeEvent; +// type Currency = Balances; +// type EnactmentPeriod = EnactmentPeriod; +// type LaunchPeriod = LaunchPeriod; +// type VotingPeriod = VotingPeriod; +// type MinimumDeposit = MinimumDeposit; +// /// A straight majority of the council can decide what their next motion is. +// type ExternalOrigin = +// pallet_collective::EnsureProportionAtLeast; +// /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. +// type ExternalMajorityOrigin = +// pallet_collective::EnsureProportionMoreThan; +// /// A unanimous council can have the next scheduled referendum be a straight default-carries +// /// (NTB) vote. +// type ExternalDefaultOrigin = +// pallet_collective::EnsureProportionAtLeast; +// /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote +// /// be tabled immediately and with a shorter voting/enactment period. +// type FastTrackOrigin = +// pallet_collective::EnsureProportionAtLeast; +// type InstantOrigin = +// pallet_collective::EnsureProportionAtLeast; +// type InstantAllowed = InstantAllowed; +// type FastTrackVotingPeriod = FastTrackVotingPeriod; +// // To cancel a proposal which has been passed, 2/3 of the council must agree to it. +// type CancellationOrigin = +// pallet_collective::EnsureProportionAtLeast; +// // To cancel a proposal before it has been passed, the technical committee must be unanimous or +// // Root must agree. +// type CancelProposalOrigin = EnsureRootOrAllTechnicalCommittee; +// type BlacklistOrigin = EnsureRoot; +// // Any single technical committee member may veto a coming council proposal, however they can +// // only do it once and it lasts only for the cool-off period. +// type VetoOrigin = pallet_collective::EnsureMember; +// type CooloffPeriod = CooloffPeriod; +// type Slash = Treasury; +// type Scheduler = Scheduler; +// type PalletsOrigin = OriginCaller; +// type MaxVotes = MaxVotes; +// type WeightInfo = pallet_democracy::weights::SubstrateWeight; +// type MaxProposals = MaxProposals; +// type VoteLockingPeriod = EnactmentPeriod; +// type Preimages = Preimage; +// type MaxDeposits = ConstU32<100>; +// type MaxBlacklisted = ConstU32<100>; +// } parameter_types! { pub const GeneralCouncilMotionDuration: BlockNumber = 2 * MINUTES; @@ -1967,7 +1967,7 @@ construct_runtime!( // Governance Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event} = 10, - Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event} = 11, + // Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event} = 11, GeneralCouncil: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 12, TechnicalCommittee: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 13, Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 14, diff --git a/runtime/parallel/src/lib.rs b/runtime/parallel/src/lib.rs index 1d4d7f188..e44a3b57c 100644 --- a/runtime/parallel/src/lib.rs +++ b/runtime/parallel/src/lib.rs @@ -185,7 +185,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("parallel"), impl_name: create_runtime_str!("parallel"), authoring_version: 1, - spec_version: 311, + spec_version: 312, impl_version: 33, apis: RUNTIME_API_VERSIONS, transaction_version: 17, @@ -266,7 +266,7 @@ impl Contains for WhiteListFilter { RuntimeCall::Assets(pallet_assets::Call::force_transfer { .. }) | // Governance RuntimeCall::Sudo(_) | - RuntimeCall::Democracy(_) | + // RuntimeCall::Democracy(_) | RuntimeCall::GeneralCouncil(_) | RuntimeCall::TechnicalCommittee(_) | RuntimeCall::Treasury(_) | @@ -997,8 +997,8 @@ impl InstanceFilter for ProxyType { ProxyType::Governance => { matches!( c, - RuntimeCall::Democracy(..) - | RuntimeCall::Preimage(..) + // RuntimeCall::Democracy(..) | + RuntimeCall::Preimage(..) | RuntimeCall::GeneralCouncil(..) | RuntimeCall::TechnicalCommittee(..) | RuntimeCall::Treasury(..) @@ -1490,71 +1490,71 @@ type EnsureRootOrMoreThanHalfGeneralCouncil = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionMoreThan, >; -type EnsureRootOrAllTechnicalCommittee = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, ->; +// type EnsureRootOrAllTechnicalCommittee = EitherOfDiverse< +// EnsureRoot, +// pallet_collective::EnsureProportionAtLeast, +// >; + +// parameter_types! { +// pub const LaunchPeriod: BlockNumber = 1 * DAYS; +// pub const VotingPeriod: BlockNumber = 5 * DAYS; +// pub const FastTrackVotingPeriod: BlockNumber = 3 * HOURS; +// pub const InstantAllowed: bool = true; +// pub const MinimumDeposit: Balance = 100_000 * DOLLARS; +// pub const EnactmentPeriod: BlockNumber = 1 * DAYS; +// pub const CooloffPeriod: BlockNumber = 7 * DAYS; +// // One cent: $10,000 / MB +// pub const MaxVotes: u32 = 100; +// pub const MaxProposals: u32 = 100; +// } -parameter_types! { - pub const LaunchPeriod: BlockNumber = 1 * DAYS; - pub const VotingPeriod: BlockNumber = 5 * DAYS; - pub const FastTrackVotingPeriod: BlockNumber = 3 * HOURS; - pub const InstantAllowed: bool = true; - pub const MinimumDeposit: Balance = 100_000 * DOLLARS; - pub const EnactmentPeriod: BlockNumber = 1 * DAYS; - pub const CooloffPeriod: BlockNumber = 7 * DAYS; - // One cent: $10,000 / MB - pub const MaxVotes: u32 = 100; - pub const MaxProposals: u32 = 100; -} - -impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = EnactmentPeriod; - type LaunchPeriod = LaunchPeriod; - type VotingPeriod = VotingPeriod; - type MinimumDeposit = MinimumDeposit; - /// A straight majority of the council can decide what their next motion is. - type ExternalOrigin = - pallet_collective::EnsureProportionAtLeast; - /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = - pallet_collective::EnsureProportionMoreThan; - /// A unanimous council can have the next scheduled referendum be a straight default-carries - /// (NTB) vote. - type ExternalDefaultOrigin = - pallet_collective::EnsureProportionAtLeast; - /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote - /// be tabled immediately and with a shorter voting/enactment period. - type FastTrackOrigin = - pallet_collective::EnsureProportionAtLeast; - type InstantOrigin = - pallet_collective::EnsureProportionAtLeast; - type InstantAllowed = InstantAllowed; - type FastTrackVotingPeriod = FastTrackVotingPeriod; - // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = - pallet_collective::EnsureProportionAtLeast; - // To cancel a proposal before it has been passed, the technical committee must be unanimous or - // Root must agree. - type CancelProposalOrigin = EnsureRootOrAllTechnicalCommittee; - type BlacklistOrigin = EnsureRoot; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cool-off period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = CooloffPeriod; - type Slash = Treasury; - type Scheduler = Scheduler; - type PalletsOrigin = OriginCaller; - type MaxVotes = MaxVotes; - type WeightInfo = weights::pallet_democracy::WeightInfo; - type MaxProposals = MaxProposals; - type VoteLockingPeriod = EnactmentPeriod; - type Preimages = Preimage; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; -} +// impl pallet_democracy::Config for Runtime { +// type RuntimeEvent = RuntimeEvent; +// type Currency = Balances; +// type EnactmentPeriod = EnactmentPeriod; +// type LaunchPeriod = LaunchPeriod; +// type VotingPeriod = VotingPeriod; +// type MinimumDeposit = MinimumDeposit; +// /// A straight majority of the council can decide what their next motion is. +// type ExternalOrigin = +// pallet_collective::EnsureProportionAtLeast; +// /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. +// type ExternalMajorityOrigin = +// pallet_collective::EnsureProportionMoreThan; +// /// A unanimous council can have the next scheduled referendum be a straight default-carries +// /// (NTB) vote. +// type ExternalDefaultOrigin = +// pallet_collective::EnsureProportionAtLeast; +// /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote +// /// be tabled immediately and with a shorter voting/enactment period. +// type FastTrackOrigin = +// pallet_collective::EnsureProportionAtLeast; +// type InstantOrigin = +// pallet_collective::EnsureProportionAtLeast; +// type InstantAllowed = InstantAllowed; +// type FastTrackVotingPeriod = FastTrackVotingPeriod; +// // To cancel a proposal which has been passed, 2/3 of the council must agree to it. +// type CancellationOrigin = +// pallet_collective::EnsureProportionAtLeast; +// // To cancel a proposal before it has been passed, the technical committee must be unanimous or +// // Root must agree. +// type CancelProposalOrigin = EnsureRootOrAllTechnicalCommittee; +// type BlacklistOrigin = EnsureRoot; +// // Any single technical committee member may veto a coming council proposal, however they can +// // only do it once and it lasts only for the cool-off period. +// type VetoOrigin = pallet_collective::EnsureMember; +// type CooloffPeriod = CooloffPeriod; +// type Slash = Treasury; +// type Scheduler = Scheduler; +// type PalletsOrigin = OriginCaller; +// type MaxVotes = MaxVotes; +// type WeightInfo = weights::pallet_democracy::WeightInfo; +// type MaxProposals = MaxProposals; +// type VoteLockingPeriod = EnactmentPeriod; +// type Preimages = Preimage; +// type MaxDeposits = ConstU32<100>; +// type MaxBlacklisted = ConstU32<100>; +// } parameter_types! { pub const GeneralCouncilMotionDuration: BlockNumber = 3 * DAYS; @@ -1982,7 +1982,7 @@ construct_runtime!( // Governance Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event} = 10, - Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event} = 11, + // Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event} = 11, GeneralCouncil: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 12, TechnicalCommittee: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 13, Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 14, @@ -2518,7 +2518,7 @@ impl_runtime_apis! { list_benchmark!(list, extra, pallet_utility, Utility); list_benchmark!(list, extra, cumulus_pallet_xcmp_queue, XcmpQueue); list_benchmark!(list, extra, pallet_identity, Identity); - list_benchmark!(list, extra, pallet_democracy, Democracy); + // list_benchmark!(list, extra, pallet_democracy, Democracy); list_benchmark!(list, extra, pallet_collective, TechnicalCommittee); list_benchmark!(list, extra, pallet_preimage, Preimage); list_benchmark!(list, extra, pallet_scheduler, Scheduler); @@ -2577,7 +2577,7 @@ impl_runtime_apis! { add_benchmark!(params, batches, pallet_utility, Utility); add_benchmark!(params, batches, cumulus_pallet_xcmp_queue, XcmpQueue); add_benchmark!(params, batches, pallet_identity, Identity); - add_benchmark!(params, batches, pallet_democracy, Democracy); + // add_benchmark!(params, batches, pallet_democracy, Democracy); add_benchmark!(params, batches, pallet_collective, TechnicalCommittee); add_benchmark!(params, batches, pallet_preimage, Preimage); add_benchmark!(params, batches, pallet_scheduler, Scheduler); diff --git a/runtime/vanilla/src/lib.rs b/runtime/vanilla/src/lib.rs index 45b0d48df..9fa56db77 100644 --- a/runtime/vanilla/src/lib.rs +++ b/runtime/vanilla/src/lib.rs @@ -180,7 +180,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("vanilla"), impl_name: create_runtime_str!("vanilla"), authoring_version: 1, - spec_version: 311, + spec_version: 312, impl_version: 33, apis: RUNTIME_API_VERSIONS, transaction_version: 17, @@ -261,7 +261,7 @@ impl Contains for WhiteListFilter { RuntimeCall::Assets(pallet_assets::Call::force_transfer { .. }) | // Governance RuntimeCall::Sudo(_) | - RuntimeCall::Democracy(_) | + // RuntimeCall::Democracy(_) | RuntimeCall::GeneralCouncil(_) | RuntimeCall::TechnicalCommittee(_) | RuntimeCall::Treasury(_) | @@ -979,8 +979,8 @@ impl InstanceFilter for ProxyType { ProxyType::Governance => { matches!( c, - RuntimeCall::Democracy(..) - | RuntimeCall::Preimage(..) + // RuntimeCall::Democracy(..) | + RuntimeCall::Preimage(..) | RuntimeCall::GeneralCouncil(..) | RuntimeCall::TechnicalCommittee(..) | RuntimeCall::Treasury(..) @@ -1509,71 +1509,71 @@ type EnsureRootOrMoreThanHalfGeneralCouncil = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionMoreThan, >; -type EnsureRootOrAllTechnicalCommittee = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, ->; - -parameter_types! { - pub const LaunchPeriod: BlockNumber = 1; - pub const VotingPeriod: BlockNumber = 1 * MINUTES; - pub const FastTrackVotingPeriod: BlockNumber = 1 * MINUTES; - pub const InstantAllowed: bool = true; - pub const MinimumDeposit: Balance = 100 * DOLLARS; - pub const EnactmentPeriod: BlockNumber = 1; - pub const CooloffPeriod: BlockNumber = 1 * MINUTES; - // One cent: $10,000 / MB - pub const MaxVotes: u32 = 100; - pub const MaxProposals: u32 = 100; -} - -impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = EnactmentPeriod; - type LaunchPeriod = LaunchPeriod; - type VotingPeriod = VotingPeriod; - type MinimumDeposit = MinimumDeposit; - /// A straight majority of the council can decide what their next motion is. - type ExternalOrigin = - pallet_collective::EnsureProportionAtLeast; - /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = - pallet_collective::EnsureProportionMoreThan; - /// A unanimous council can have the next scheduled referendum be a straight default-carries - /// (NTB) vote. - type ExternalDefaultOrigin = - pallet_collective::EnsureProportionAtLeast; - /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote - /// be tabled immediately and with a shorter voting/enactment period. - type FastTrackOrigin = - pallet_collective::EnsureProportionAtLeast; - type InstantOrigin = - pallet_collective::EnsureProportionAtLeast; - type InstantAllowed = InstantAllowed; - type FastTrackVotingPeriod = FastTrackVotingPeriod; - // To cancel a proposal which has been passed, 2/3 of the council must agree to it. - type CancellationOrigin = - pallet_collective::EnsureProportionAtLeast; - // To cancel a proposal before it has been passed, the technical committee must be unanimous or - // Root must agree. - type CancelProposalOrigin = EnsureRootOrAllTechnicalCommittee; - type BlacklistOrigin = EnsureRoot; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cool-off period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = CooloffPeriod; - type Slash = Treasury; - type Scheduler = Scheduler; - type PalletsOrigin = OriginCaller; - type MaxVotes = MaxVotes; - type WeightInfo = pallet_democracy::weights::SubstrateWeight; - type MaxProposals = MaxProposals; - type VoteLockingPeriod = EnactmentPeriod; - type Preimages = Preimage; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; -} +// type EnsureRootOrAllTechnicalCommittee = EitherOfDiverse< +// EnsureRoot, +// pallet_collective::EnsureProportionAtLeast, +// >; + +// parameter_types! { +// pub const LaunchPeriod: BlockNumber = 1; +// pub const VotingPeriod: BlockNumber = 1 * MINUTES; +// pub const FastTrackVotingPeriod: BlockNumber = 1 * MINUTES; +// pub const InstantAllowed: bool = true; +// pub const MinimumDeposit: Balance = 100 * DOLLARS; +// pub const EnactmentPeriod: BlockNumber = 1; +// pub const CooloffPeriod: BlockNumber = 1 * MINUTES; +// // One cent: $10,000 / MB +// pub const MaxVotes: u32 = 100; +// pub const MaxProposals: u32 = 100; +// } + +// impl pallet_democracy::Config for Runtime { +// type RuntimeEvent = RuntimeEvent; +// type Currency = Balances; +// type EnactmentPeriod = EnactmentPeriod; +// type LaunchPeriod = LaunchPeriod; +// type VotingPeriod = VotingPeriod; +// type MinimumDeposit = MinimumDeposit; +// /// A straight majority of the council can decide what their next motion is. +// type ExternalOrigin = +// pallet_collective::EnsureProportionAtLeast; +// /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. +// type ExternalMajorityOrigin = +// pallet_collective::EnsureProportionMoreThan; +// /// A unanimous council can have the next scheduled referendum be a straight default-carries +// /// (NTB) vote. +// type ExternalDefaultOrigin = +// pallet_collective::EnsureProportionAtLeast; +// /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote +// /// be tabled immediately and with a shorter voting/enactment period. +// type FastTrackOrigin = +// pallet_collective::EnsureProportionAtLeast; +// type InstantOrigin = +// pallet_collective::EnsureProportionAtLeast; +// type InstantAllowed = InstantAllowed; +// type FastTrackVotingPeriod = FastTrackVotingPeriod; +// // To cancel a proposal which has been passed, 2/3 of the council must agree to it. +// type CancellationOrigin = +// pallet_collective::EnsureProportionAtLeast; +// // To cancel a proposal before it has been passed, the technical committee must be unanimous or +// // Root must agree. +// type CancelProposalOrigin = EnsureRootOrAllTechnicalCommittee; +// type BlacklistOrigin = EnsureRoot; +// // Any single technical committee member may veto a coming council proposal, however they can +// // only do it once and it lasts only for the cool-off period. +// type VetoOrigin = pallet_collective::EnsureMember; +// type CooloffPeriod = CooloffPeriod; +// type Slash = Treasury; +// type Scheduler = Scheduler; +// type PalletsOrigin = OriginCaller; +// type MaxVotes = MaxVotes; +// type WeightInfo = pallet_democracy::weights::SubstrateWeight; +// type MaxProposals = MaxProposals; +// type VoteLockingPeriod = EnactmentPeriod; +// type Preimages = Preimage; +// type MaxDeposits = ConstU32<100>; +// type MaxBlacklisted = ConstU32<100>; +// } parameter_types! { pub const GeneralCouncilMotionDuration: BlockNumber = 2 * MINUTES; @@ -1995,7 +1995,7 @@ construct_runtime!( // Governance Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event} = 10, - Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event} = 11, + // Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event} = 11, GeneralCouncil: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 12, TechnicalCommittee: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 13, Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 14,