From e12ca11e31424c136b6a61ec887872d16a6cec83 Mon Sep 17 00:00:00 2001 From: Chralt98 Date: Wed, 23 Aug 2023 17:04:30 +0200 Subject: [PATCH] activate court and GD on battery station --- docs/changelog_for_devs.md | 4 ---- runtime/battery-station/src/lib.rs | 7 ------- runtime/common/src/lib.rs | 1 - runtime/zeitgeist/src/lib.rs | 10 ++++++---- zrml/prediction-markets/src/lib.rs | 2 +- zrml/prediction-markets/src/migrations.rs | 4 ++-- 6 files changed, 9 insertions(+), 19 deletions(-) diff --git a/docs/changelog_for_devs.md b/docs/changelog_for_devs.md index 98d072c2a..953ffe489 100644 --- a/docs/changelog_for_devs.md +++ b/docs/changelog_for_devs.md @@ -111,7 +111,6 @@ All things about Global Disputes Fix ⚠️ : - Use pallet-asset-tx-payment for allowing to pay transaction fees in foreign currencies ([#1022]). This requires each transaction to specify the fee payment token with `asset_id` (`None` is ZTG). - > > > > > > > chralt98-court-overhaul ## v0.3.9 @@ -123,9 +122,6 @@ All things about Global Disputes Fix ⚠️ : - ⚠️ Add `outsider` field to `MarketBonds` struct. In particular, the `Market` struct's layout has changed ([#903]). - - # v0.3.9 - - Adjust `deposit` function used to calculate storage fees for the following pallets: identity, multisig, preimage, proxy. The cost of adding an identity reduced from a minimum of 125 ZTG to a minimum of 1.5243 ZTG ([#1011]) diff --git a/runtime/battery-station/src/lib.rs b/runtime/battery-station/src/lib.rs index 69a491292..b1a839c6b 100644 --- a/runtime/battery-station/src/lib.rs +++ b/runtime/battery-station/src/lib.rs @@ -186,17 +186,10 @@ impl Contains for IsCallable { edit_market { scoring_rule: ScoringRule::RikiddoSigmoidFeeMarketEma, .. } => false, - // Disable Court dispute resolution mechanism - create_market { dispute_mechanism: MarketDisputeMechanism::Court, .. } => false, - create_cpmm_market_and_deploy_assets { - dispute_mechanism: MarketDisputeMechanism::Court, - .. - } => false, create_cpmm_market_and_deploy_assets { dispute_mechanism: MarketDisputeMechanism::SimpleDisputes, .. } => false, - edit_market { dispute_mechanism: MarketDisputeMechanism::Court, .. } => false, edit_market { dispute_mechanism: MarketDisputeMechanism::SimpleDisputes, .. diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index c4309afe9..8397cca8f 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -61,7 +61,6 @@ macro_rules! decl_common_types { // IMPORTANT that AddDisputeBond comes before MoveDataToSimpleDisputes!!! zrml_prediction_markets::migrations::AddDisputeBond, zrml_prediction_markets::migrations::MoveDataToSimpleDisputes, - // TODO check when to execute this migration and what happens for main-net, since global-disputes was only present on battery station zrml_global_disputes::migrations::ModifyGlobalDisputesStructures, ); diff --git a/runtime/zeitgeist/src/lib.rs b/runtime/zeitgeist/src/lib.rs index 7019514e7..0fb5144a6 100644 --- a/runtime/zeitgeist/src/lib.rs +++ b/runtime/zeitgeist/src/lib.rs @@ -162,19 +162,21 @@ impl Contains for IsCallable { }, // Membership is managed by the respective Membership instance RuntimeCall::Council(set_members { .. }) => false, + RuntimeCall::Court(_) => false, #[cfg(feature = "parachain")] RuntimeCall::DmpQueue(service_overweight { .. }) => false, + RuntimeCall::GlobalDisputes(_) => false, RuntimeCall::LiquidityMining(_) => false, RuntimeCall::PredictionMarkets(inner_call) => { match inner_call { // Disable Rikiddo markets create_market { scoring_rule: RikiddoSigmoidFeeMarketEma, .. } => false, edit_market { scoring_rule: RikiddoSigmoidFeeMarketEma, .. } => false, - // Disable SimpleDisputes dispute resolution mechanism - create_market { dispute_mechanism: SimpleDisputes, .. } => false, - edit_market { dispute_mechanism: SimpleDisputes, .. } => false, + // Disable Court & SimpleDisputes dispute resolution mechanism + create_market { dispute_mechanism: Court | SimpleDisputes, .. } => false, + edit_market { dispute_mechanism: Court | SimpleDisputes, .. } => false, create_cpmm_market_and_deploy_assets { - dispute_mechanism: SimpleDisputes, + dispute_mechanism: Court | SimpleDisputes, .. } => false, _ => true, diff --git a/zrml/prediction-markets/src/lib.rs b/zrml/prediction-markets/src/lib.rs index 28b190afa..63ca4512e 100644 --- a/zrml/prediction-markets/src/lib.rs +++ b/zrml/prediction-markets/src/lib.rs @@ -1986,7 +1986,7 @@ mod pallet { #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(PhantomData); - // TODO after storage migration of release-dispute-system branch is complete, delete this Disputes storage item + // TODO(#986) after storage migration of release-dispute-system branch is complete, delete this Disputes storage item /// For each market, this holds the dispute information for each dispute that's /// been issued. #[pallet::storage] diff --git a/zrml/prediction-markets/src/migrations.rs b/zrml/prediction-markets/src/migrations.rs index 0cf78699d..2134275b0 100644 --- a/zrml/prediction-markets/src/migrations.rs +++ b/zrml/prediction-markets/src/migrations.rs @@ -47,8 +47,8 @@ const MARKET_COMMONS: &[u8] = b"MarketCommons"; #[cfg(any(feature = "try-runtime", test))] const MARKETS: &[u8] = b"Markets"; -const MARKET_COMMONS_REQUIRED_STORAGE_VERSION: u16 = 5; -const MARKET_COMMONS_NEXT_STORAGE_VERSION: u16 = 6; +const MARKET_COMMONS_REQUIRED_STORAGE_VERSION: u16 = 6; +const MARKET_COMMONS_NEXT_STORAGE_VERSION: u16 = 7; #[derive(Clone, Decode, Encode, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub struct OldMarketBonds {