From c380b55860b9520a7c086b59551ef88943b89915 Mon Sep 17 00:00:00 2001 From: yooml Date: Thu, 11 Jul 2024 11:09:34 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20update=20MaxTurnout?= =?UTF-8?q?=20and=20whitelisted=5Fcaller=20track?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runtime/bifrost-kusama/src/governance/referenda.rs | 2 +- runtime/bifrost-kusama/src/governance/tracks.rs | 8 ++++---- runtime/bifrost-polkadot/src/governance/referenda.rs | 2 +- runtime/bifrost-polkadot/src/governance/tracks.rs | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/runtime/bifrost-kusama/src/governance/referenda.rs b/runtime/bifrost-kusama/src/governance/referenda.rs index 907a1b3f9..f566b2b7e 100644 --- a/runtime/bifrost-kusama/src/governance/referenda.rs +++ b/runtime/bifrost-kusama/src/governance/referenda.rs @@ -35,7 +35,7 @@ impl pallet_conviction_voting::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Polls = Referenda; - type MaxTurnout = frame_support::traits::TotalIssuanceOf; + type MaxTurnout = frame_support::traits::ActiveIssuanceOf; // Maximum number of concurrent votes an account may have type MaxVotes = ConstU32<512>; // Minimum period of vote locking diff --git a/runtime/bifrost-kusama/src/governance/tracks.rs b/runtime/bifrost-kusama/src/governance/tracks.rs index fac57bfc7..613fc32fc 100644 --- a/runtime/bifrost-kusama/src/governance/tracks.rs +++ b/runtime/bifrost-kusama/src/governance/tracks.rs @@ -62,10 +62,10 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 8] name: "whitelisted_caller", max_deciding: 100, decision_deposit: 5_000 * BNCS, - prepare_period: 15 * MINUTES, + prepare_period: 5 * MINUTES, decision_period: 14 * DAYS, - confirm_period: 10 * MINUTES, - min_enactment_period: 10 * MINUTES, + confirm_period: 5 * MINUTES, + min_enactment_period: 5 * MINUTES, min_approval: Curve::make_reciprocal( 16, 28 * 24, @@ -73,7 +73,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 8] percent(50), percent(100), ), - min_support: Curve::make_reciprocal(1, 28, percent(8), percent(2), percent(50)), + min_support: Curve::make_reciprocal(1, 1792, percent(3), percent(2), percent(50)), }, ), ( diff --git a/runtime/bifrost-polkadot/src/governance/referenda.rs b/runtime/bifrost-polkadot/src/governance/referenda.rs index 907a1b3f9..f566b2b7e 100644 --- a/runtime/bifrost-polkadot/src/governance/referenda.rs +++ b/runtime/bifrost-polkadot/src/governance/referenda.rs @@ -35,7 +35,7 @@ impl pallet_conviction_voting::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Polls = Referenda; - type MaxTurnout = frame_support::traits::TotalIssuanceOf; + type MaxTurnout = frame_support::traits::ActiveIssuanceOf; // Maximum number of concurrent votes an account may have type MaxVotes = ConstU32<512>; // Minimum period of vote locking diff --git a/runtime/bifrost-polkadot/src/governance/tracks.rs b/runtime/bifrost-polkadot/src/governance/tracks.rs index fac57bfc7..613fc32fc 100644 --- a/runtime/bifrost-polkadot/src/governance/tracks.rs +++ b/runtime/bifrost-polkadot/src/governance/tracks.rs @@ -62,10 +62,10 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 8] name: "whitelisted_caller", max_deciding: 100, decision_deposit: 5_000 * BNCS, - prepare_period: 15 * MINUTES, + prepare_period: 5 * MINUTES, decision_period: 14 * DAYS, - confirm_period: 10 * MINUTES, - min_enactment_period: 10 * MINUTES, + confirm_period: 5 * MINUTES, + min_enactment_period: 5 * MINUTES, min_approval: Curve::make_reciprocal( 16, 28 * 24, @@ -73,7 +73,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 8] percent(50), percent(100), ), - min_support: Curve::make_reciprocal(1, 28, percent(8), percent(2), percent(50)), + min_support: Curve::make_reciprocal(1, 1792, percent(3), percent(2), percent(50)), }, ), (