Skip to content

Commit

Permalink
Merge pull request #985 from galacticcouncil/opengov_tweaks
Browse files Browse the repository at this point in the history
chore: OpenGov Tweaks
  • Loading branch information
vgantchev authored Jan 14, 2025
2 parents 02adadc + 4a652bf commit 20896e0
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "runtime-integration-tests"
version = "1.29.0"
version = "1.30.0"
description = "Integration tests"
authors = ["GalacticCouncil"]
edition = "2021"
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/src/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn begin_referendum() -> ReferendumIndex {
));

assert_eq!(pallet_referenda::DecidingCount::<hydradx_runtime::Runtime>::get(0), 0);
fast_forward_to(now + 8 * DAYS);
fast_forward_to(now + 5 * DAYS);
assert_eq!(pallet_referenda::DecidingCount::<hydradx_runtime::Runtime>::get(0), 1);

referendum_index
Expand Down Expand Up @@ -588,7 +588,7 @@ fn staking_should_claim_and_unreserve_rewards_when_unstaked() {
));
let alice_balance_after_claim = Currencies::free_balance(HDX, &AccountId32::from(ALICE));
assert!(alice_balance_after_claim > alice_balance);
assert_eq!(alice_balance_after_claim, 999900127998361620);
assert_eq!(alice_balance_after_claim, 999900066816353554);

let stake_position_id = pallet_staking::Pallet::<hydradx_runtime::Runtime>::get_user_position_id(
&sp_runtime::AccountId32::from(ALICE),
Expand Down
2 changes: 1 addition & 1 deletion runtime/hydradx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hydradx-runtime"
version = "280.0.0"
version = "281.0.0"
authors = ["GalacticCouncil"]
edition = "2021"
license = "Apache 2.0"
Expand Down
21 changes: 11 additions & 10 deletions runtime/hydradx/src/governance/tracks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const APP_LINEAR: Curve = Curve::make_linear(7, 7, percent(50), percent(100));
const APP_LINEAR_FLAT: Curve = Curve::make_linear(4, 7, percent(50), percent(100));
const APP_RECIP: Curve = Curve::make_reciprocal(1, 7, percent(80), percent(50), percent(100));
const SUP_LINEAR: Curve = Curve::make_linear(7, 7, percent(0), percent(50));
const SUP_LINEAR_FROM_25: Curve = Curve::make_linear(7, 7, percent(0), percent(25));
const SUP_RECIP: Curve = Curve::make_reciprocal(5, 7, percent(1), percent(0), percent(50));
const SUP_FAST_RECIP: Curve = Curve::make_reciprocal(3, 7, percent(1), percent(0), percent(50));
const SUP_WHITELISTED_CALLER: Curve = Curve::make_reciprocal(1, 28, percent(3), percent(2), percent(50));
Expand All @@ -51,11 +52,11 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 9]
pallet_referenda::TrackInfo {
name: "root",
max_deciding: 1,
decision_deposit: 5_000_000 * UNITS,
decision_deposit: 1_000_000 * UNITS,
prepare_period: HOURS,
decision_period: 7 * DAYS,
confirm_period: 24 * HOURS,
min_enactment_period: 4 * HOURS,
confirm_period: 12 * HOURS,
min_enactment_period: 10 * MINUTES,
min_approval: APP_RECIP,
min_support: SUP_LINEAR,
},
Expand All @@ -79,7 +80,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 9]
pallet_referenda::TrackInfo {
name: "referendum_canceller",
max_deciding: 3,
decision_deposit: 500_000 * UNITS,
decision_deposit: 250_000 * UNITS,
prepare_period: 60 * MINUTES,
decision_period: 3 * DAYS,
confirm_period: 60 * MINUTES,
Expand All @@ -93,10 +94,10 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 9]
pallet_referenda::TrackInfo {
name: "referendum_killer",
max_deciding: 3,
decision_deposit: 2_500_000 * UNITS,
decision_deposit: 750_000 * UNITS,
prepare_period: 60 * MINUTES,
decision_period: 3 * DAYS,
confirm_period: 3 * HOURS,
confirm_period: HOURS,
min_enactment_period: 10 * MINUTES,
min_approval: APP_LINEAR_FLAT,
min_support: SUP_FAST_RECIP,
Expand All @@ -107,7 +108,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 9]
pallet_referenda::TrackInfo {
name: "general_admin",
max_deciding: 3,
decision_deposit: 500_000 * UNITS,
decision_deposit: 250_000 * UNITS,
prepare_period: 60 * MINUTES,
decision_period: 7 * DAYS,
confirm_period: 3 * HOURS,
Expand All @@ -121,13 +122,13 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 9]
pallet_referenda::TrackInfo {
name: "treasurer",
max_deciding: 3,
decision_deposit: 1_250_000 * UNITS,
decision_deposit: 750_000 * UNITS,
prepare_period: 60 * MINUTES,
decision_period: 7 * DAYS,
confirm_period: 12 * HOURS,
min_enactment_period: 10 * MINUTES,
min_approval: APP_RECIP,
min_support: SUP_LINEAR,
min_support: SUP_LINEAR_FROM_25,
},
),
(
Expand Down Expand Up @@ -163,7 +164,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 9]
pallet_referenda::TrackInfo {
name: "omnipool_admin",
max_deciding: 3,
decision_deposit: 500_000 * UNITS,
decision_deposit: 250_000 * UNITS,
prepare_period: 60 * MINUTES,
decision_period: 7 * DAYS,
confirm_period: 3 * HOURS,
Expand Down
2 changes: 1 addition & 1 deletion runtime/hydradx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("hydradx"),
impl_name: create_runtime_str!("hydradx"),
authoring_version: 1,
spec_version: 280,
spec_version: 281,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down

0 comments on commit 20896e0

Please sign in to comment.