From 56e25a0febd903d56aec7add6e56eeff8e8655c4 Mon Sep 17 00:00:00 2001 From: lolmcshizz <97540577+lolmcshizz@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:40:57 +0000 Subject: [PATCH 1/6] change support curve for treasurer --- runtime/hydradx/src/governance/tracks.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/hydradx/src/governance/tracks.rs b/runtime/hydradx/src/governance/tracks.rs index 560807637..0582af59d 100644 --- a/runtime/hydradx/src/governance/tracks.rs +++ b/runtime/hydradx/src/governance/tracks.rs @@ -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)); @@ -127,7 +128,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 9] confirm_period: 12 * HOURS, min_enactment_period: 10 * MINUTES, min_approval: APP_RECIP, - min_support: SUP_LINEAR, + min_support: SUP_LINEAR_FROM_25, }, ), ( From 83925124385ac9ad88fe2dd4c9c67001f2ceb217 Mon Sep 17 00:00:00 2001 From: lolmcshizz <97540577+lolmcshizz@users.noreply.github.com> Date: Thu, 9 Jan 2025 15:35:13 +0000 Subject: [PATCH 2/6] DD, confirm & enactment changes --- runtime/hydradx/src/governance/tracks.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/runtime/hydradx/src/governance/tracks.rs b/runtime/hydradx/src/governance/tracks.rs index 0582af59d..31f1baa00 100644 --- a/runtime/hydradx/src/governance/tracks.rs +++ b/runtime/hydradx/src/governance/tracks.rs @@ -52,11 +52,11 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 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, }, @@ -80,7 +80,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 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, @@ -94,10 +94,10 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 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: 1 * HOURS, min_enactment_period: 10 * MINUTES, min_approval: APP_LINEAR_FLAT, min_support: SUP_FAST_RECIP, @@ -108,7 +108,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 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, @@ -122,7 +122,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 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, @@ -164,7 +164,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 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, From 4da9b6bc41c063789503737d7023311dae85672d Mon Sep 17 00:00:00 2001 From: vgantchev Date: Thu, 9 Jan 2025 17:13:07 +0100 Subject: [PATCH 3/6] bump runtime version --- Cargo.lock | 2 +- runtime/hydradx/Cargo.toml | 2 +- runtime/hydradx/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d8627bb70..6045141cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4918,7 +4918,7 @@ dependencies = [ [[package]] name = "hydradx-runtime" -version = "278.0.0" +version = "279.0.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", diff --git a/runtime/hydradx/Cargo.toml b/runtime/hydradx/Cargo.toml index 91b0ade81..1cf48216f 100644 --- a/runtime/hydradx/Cargo.toml +++ b/runtime/hydradx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hydradx-runtime" -version = "278.0.0" +version = "279.0.0" authors = ["GalacticCouncil"] edition = "2021" license = "Apache 2.0" diff --git a/runtime/hydradx/src/lib.rs b/runtime/hydradx/src/lib.rs index 3ec6418bd..81aefda7f 100644 --- a/runtime/hydradx/src/lib.rs +++ b/runtime/hydradx/src/lib.rs @@ -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: 278, + spec_version: 279, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, From 8cbf78e5c8148ec5a88ff228313f13528daa0e28 Mon Sep 17 00:00:00 2001 From: vgantchev Date: Mon, 13 Jan 2025 18:57:59 +0100 Subject: [PATCH 4/6] fix tests --- integration-tests/src/staking.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/src/staking.rs b/integration-tests/src/staking.rs index 55c661b81..b911d6fb3 100644 --- a/integration-tests/src/staking.rs +++ b/integration-tests/src/staking.rs @@ -71,7 +71,7 @@ fn begin_referendum() -> ReferendumIndex { )); assert_eq!(pallet_referenda::DecidingCount::::get(0), 0); - fast_forward_to(now + 8 * DAYS); + fast_forward_to(now + 5 * DAYS); assert_eq!(pallet_referenda::DecidingCount::::get(0), 1); referendum_index From 9feb2407c1135dc9b9b2e20cdab6fc12812c73de Mon Sep 17 00:00:00 2001 From: vgantchev Date: Mon, 13 Jan 2025 21:21:22 +0100 Subject: [PATCH 5/6] fix test --- Cargo.lock | 2 +- integration-tests/Cargo.toml | 2 +- integration-tests/src/staking.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 257cc2e01..6727e57a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12281,7 +12281,7 @@ dependencies = [ [[package]] name = "runtime-integration-tests" -version = "1.29.0" +version = "1.30.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index 6616b8ae9..aae8efa65 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "runtime-integration-tests" -version = "1.29.0" +version = "1.30.0" description = "Integration tests" authors = ["GalacticCouncil"] edition = "2021" diff --git a/integration-tests/src/staking.rs b/integration-tests/src/staking.rs index b911d6fb3..5478c7579 100644 --- a/integration-tests/src/staking.rs +++ b/integration-tests/src/staking.rs @@ -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::::get_user_position_id( &sp_runtime::AccountId32::from(ALICE), From 4a652bf58b81c57806deb5c497d34af94d078f19 Mon Sep 17 00:00:00 2001 From: vgantchev Date: Tue, 14 Jan 2025 14:50:11 +0100 Subject: [PATCH 6/6] clippy --- runtime/hydradx/src/governance/tracks.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/hydradx/src/governance/tracks.rs b/runtime/hydradx/src/governance/tracks.rs index 31f1baa00..dc7eda242 100644 --- a/runtime/hydradx/src/governance/tracks.rs +++ b/runtime/hydradx/src/governance/tracks.rs @@ -97,7 +97,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 9] decision_deposit: 750_000 * UNITS, prepare_period: 60 * MINUTES, decision_period: 3 * DAYS, - confirm_period: 1 * HOURS, + confirm_period: HOURS, min_enactment_period: 10 * MINUTES, min_approval: APP_LINEAR_FLAT, min_support: SUP_FAST_RECIP,