Skip to content

Commit

Permalink
Merge remote-tracking branch 'polkadot-fellows/main' into bko-bump-to…
Browse files Browse the repository at this point in the history
…-1.6
  • Loading branch information
bkontur committed Feb 23, 2024
2 parents ff86df6 + 6930a5b commit 5f39fc8
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Add [Encointer](https://encointer.org) system parachain runtime, completing [RFC22](https://github.com/polkadot-fellows/RFCs/blob/main/text/
0022-adopt-encointer-runtime.md) ([polkadot-fellows/runtimes#80](https://github.com/polkadot-fellows/runtimes/pull/80))
- Feature for enabling debug prints in the Polkadot and Kusama runtime ([polkadot-fellows/runtimes#85](https://github.com/polkadot-fellows/runtimes/pull/85))
- Added new "Wish for Change" track ([polkadot-fellows/runtimes#184](https://github.com/polkadot-fellows/runtimes/pull/184))

### Changed

Expand Down
3 changes: 3 additions & 0 deletions relay/kusama/src/governance/origins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ pub mod pallet_custom_origins {
Fellowship8Dan,
/// Origin commanded by rank 9 of the Polkadot Fellowship and with a success of 9.
Fellowship9Dan,
/// Origin for signaling that the network wishes for some change.
WishForChange,
}

macro_rules! decl_unit_ensures {
Expand Down Expand Up @@ -128,6 +130,7 @@ pub mod pallet_custom_origins {
ReferendumCanceller,
ReferendumKiller,
WhitelistedCaller,
WishForChange,
FellowshipInitiates: u16 = 0,
Fellows: u16 = 3,
FellowshipExperts: u16 = 5,
Expand Down
17 changes: 16 additions & 1 deletion relay/kusama/src/governance/tracks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const APP_WHITELISTED_CALLER: Curve =
const SUP_WHITELISTED_CALLER: Curve =
Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50));

const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 15] = [
const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 16] = [
(
0,
pallet_referenda::TrackInfo {
Expand Down Expand Up @@ -94,6 +94,20 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 15
min_support: SUP_WHITELISTED_CALLER,
},
),
(
2,
pallet_referenda::TrackInfo {
name: "wish_for_change",
max_deciding: 10,
decision_deposit: 20 * GRAND,
prepare_period: 2 * HOURS,
decision_period: 14 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 10 * MINUTES,
min_approval: APP_ROOT,
min_support: SUP_ROOT,
},
),
(
10,
pallet_referenda::TrackInfo {
Expand Down Expand Up @@ -294,6 +308,7 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
} else if let Ok(custom_origin) = origins::Origin::try_from(id.clone()) {
match custom_origin {
origins::Origin::WhitelistedCaller => Ok(1),
origins::Origin::WishForChange => Ok(2),
// General admin
origins::Origin::StakingAdmin => Ok(10),
origins::Origin::Treasurer => Ok(11),
Expand Down
3 changes: 3 additions & 0 deletions relay/polkadot/src/governance/origins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ pub mod pallet_custom_origins {
BigSpender,
/// Origin able to dispatch a whitelisted call.
WhitelistedCaller,
/// Origin for signaling that the network wishes for some change.
WishForChange,
}

macro_rules! decl_unit_ensures {
Expand Down Expand Up @@ -103,6 +105,7 @@ pub mod pallet_custom_origins {
ReferendumCanceller,
ReferendumKiller,
WhitelistedCaller,
WishForChange,
);

macro_rules! decl_ensure {
Expand Down
17 changes: 16 additions & 1 deletion relay/polkadot/src/governance/tracks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const APP_WHITELISTED_CALLER: Curve =
const SUP_WHITELISTED_CALLER: Curve =
Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50));

const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 15] = [
const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 16] = [
(
0,
pallet_referenda::TrackInfo {
Expand Down Expand Up @@ -94,6 +94,20 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 15
min_support: SUP_WHITELISTED_CALLER,
},
),
(
2,
pallet_referenda::TrackInfo {
name: "wish_for_change",
max_deciding: 10,
decision_deposit: 20 * GRAND,
prepare_period: 2 * HOURS,
decision_period: 28 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 10 * MINUTES,
min_approval: APP_ROOT,
min_support: SUP_ROOT,
},
),
(
10,
pallet_referenda::TrackInfo {
Expand Down Expand Up @@ -294,6 +308,7 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
} else if let Ok(custom_origin) = origins::Origin::try_from(id.clone()) {
match custom_origin {
origins::Origin::WhitelistedCaller => Ok(1),
origins::Origin::WishForChange => Ok(2),
// General admin
origins::Origin::StakingAdmin => Ok(10),
origins::Origin::Treasurer => Ok(11),
Expand Down

0 comments on commit 5f39fc8

Please sign in to comment.