Skip to content

Commit

Permalink
Merge pull request #671 from galacticcouncil/opengov_tweaks
Browse files Browse the repository at this point in the history
feat: Opengov tweaks
  • Loading branch information
vgantchev authored Sep 18, 2024
2 parents c7a0f1b + 8f148ca commit 0aa2de1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion 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 runtime/basilisk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "basilisk-runtime"
version = "120.0.0"
version = "121.0.0"
authors = ["GalacticCouncil"]
edition = "2021"
homepage = "https://github.com/galacticcouncil/Basilisk-node"
Expand Down
12 changes: 6 additions & 6 deletions runtime/basilisk/src/governance/tracks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const APP_RECIP: Curve = Curve::make_reciprocal(1, 7, percent(80), percent(50),
const SUP_LINEAR: Curve = Curve::make_linear(7, 7, percent(0), percent(50));
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(20), percent(1), percent(50));
const SUP_WHITELISTED_CALLER: Curve = Curve::make_linear(1, 7, percent(0), percent(1));

const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 8] = [
(
Expand All @@ -57,8 +57,8 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 8]
max_deciding: 10,
decision_deposit: 1_000_000 * UNITS,
prepare_period: 10 * MINUTES,
decision_period: 7 * DAYS,
confirm_period: 10 * MINUTES,
decision_period: DAYS,
confirm_period: 4 * HOURS,
min_enactment_period: 10 * MINUTES,
min_approval: APP_RECIP,
min_support: SUP_WHITELISTED_CALLER,
Expand All @@ -71,8 +71,8 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 8]
max_deciding: 10,
decision_deposit: 10_000_000 * UNITS,
prepare_period: 60 * MINUTES,
decision_period: 7 * DAYS,
confirm_period: 24 * HOURS,
decision_period: 3 * DAYS,
confirm_period: 12 * HOURS,
min_enactment_period: 10 * MINUTES,
min_approval: APP_LINEAR_FLAT,
min_support: SUP_FAST_RECIP,
Expand All @@ -85,7 +85,7 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 8]
max_deciding: 10,
decision_deposit: 50_000_000 * UNITS,
prepare_period: 60 * MINUTES,
decision_period: 7 * DAYS,
decision_period: 3 * DAYS,
confirm_period: 3 * HOURS,
min_enactment_period: 10 * MINUTES,
min_approval: APP_LINEAR_FLAT,
Expand Down
2 changes: 1 addition & 1 deletion runtime/basilisk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("basilisk"),
impl_name: create_runtime_str!("basilisk"),
authoring_version: 1,
spec_version: 120,
spec_version: 121,
impl_version: 0,
apis: apis::RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
15 changes: 13 additions & 2 deletions runtime/basilisk/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ impl Contains<RuntimeCall> for BaseFilter {
fn contains(call: &RuntimeCall) -> bool {
if matches!(
call,
RuntimeCall::System(_) | RuntimeCall::Timestamp(_) | RuntimeCall::ParachainSystem(_)
RuntimeCall::System(_)
| RuntimeCall::ConvictionVoting(_)
| RuntimeCall::Timestamp(_)
| RuntimeCall::ParachainSystem(_)
| RuntimeCall::Preimage(_)
| RuntimeCall::Referenda(_)
| RuntimeCall::TransactionPause(_)
| RuntimeCall::Whitelist(_)
) {
// always allow
// Note: this is done to avoid unnecessary check of paused storage.
Expand Down Expand Up @@ -308,7 +315,11 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
ProxyType::CancelProxy => matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })),
ProxyType::Governance => matches!(
c,
RuntimeCall::TechnicalCommittee(..) | RuntimeCall::Treasury(..) | RuntimeCall::Utility(..)
RuntimeCall::ConvictionVoting(..)
| RuntimeCall::Referenda(..)
| RuntimeCall::TechnicalCommittee(..)
| RuntimeCall::Treasury(..)
| RuntimeCall::Utility(..)
),
ProxyType::Exchange => matches!(c, RuntimeCall::XYK(..) | RuntimeCall::LBP(..) | RuntimeCall::NFT(..)),
// Transfer group doesn't include cross-chain transfers
Expand Down

0 comments on commit 0aa2de1

Please sign in to comment.