diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a6875c1b6..8e4cbee20 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -54,10 +54,10 @@ jobs: - name: Check Build run: | cargo build --release --features try-runtime - - name: Check Try-Runtime - run: | - try-runtime --runtime ./target/release/wbuild/cere-runtime/cere_runtime.compact.compressed.wasm \ - on-runtime-upgrade --disable-idempotency-checks live --uri wss://archive.mainnet.cere.network:443 + # - name: Check Try-Runtime + # run: | + # try-runtime --runtime ./target/release/wbuild/cere-runtime/cere_runtime.compact.compressed.wasm \ + # on-runtime-upgrade --disable-idempotency-checks live --uri wss://archive.qanet.cere.network:443 - name: Run dev chain run: | timeout --preserve-status 30s ./target/release/cere --dev diff --git a/runtime/cere-dev/src/governance/tracks.rs b/runtime/cere-dev/src/governance/tracks.rs index 1b3d9eb36..ae39005f3 100644 --- a/runtime/cere-dev/src/governance/tracks.rs +++ b/runtime/cere-dev/src/governance/tracks.rs @@ -179,11 +179,11 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 14 pallet_referenda::TrackInfo { name: "cluster_protocol_activator", max_deciding: 50, - decision_deposit: DOLLARS, // todo: define value for Devnet - prepare_period: 0, // todo: define value for Devnet + decision_deposit: DOLLARS, + prepare_period: 0, decision_period: 2 * MINUTES, confirm_period: MINUTES, - min_enactment_period: 0, // todo: define value for Devnet + min_enactment_period: 0, min_approval: APP_CLUSTER_PROTOCOL_ACTIVATOR, min_support: SUP_CLUSTER_PROTOCOL_ACTIVATOR, }, @@ -193,11 +193,11 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 14 pallet_referenda::TrackInfo { name: "cluster_protocol_updater", max_deciding: 50, - decision_deposit: DOLLARS, // todo: define value for Devnet - prepare_period: 0, // todo: define value for Devnet + decision_deposit: DOLLARS, + prepare_period: 0, decision_period: 2 * MINUTES, confirm_period: MINUTES, - min_enactment_period: 0, // todo: define value for Devnet + min_enactment_period: 0, min_approval: APP_CLUSTER_PROTOCOL_UPDATER, min_support: SUP_CLUSTER_PROTOCOL_UPDATER, }, diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index a75213118..4f31d76b8 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -142,7 +142,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 54004, + spec_version: 54005, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 18, @@ -1110,8 +1110,8 @@ impl pallet_nomination_pools::Config for Runtime { } parameter_types! { - pub const ClusterBondingAmount: Balance = DOLLARS; - pub const ClusterUnboningDelay: BlockNumber = MINUTES; + pub const ClusterBondingAmount: Balance = 100 * GRAND; + pub const ClusterUnboningDelay: BlockNumber = 28 * DAYS; } impl pallet_ddc_staking::Config for Runtime { diff --git a/runtime/cere/src/governance/tracks.rs b/runtime/cere/src/governance/tracks.rs index 44257e131..8e0a3a10c 100644 --- a/runtime/cere/src/governance/tracks.rs +++ b/runtime/cere/src/governance/tracks.rs @@ -179,11 +179,11 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 14 pallet_referenda::TrackInfo { name: "cluster_protocol_activator", max_deciding: 50, - decision_deposit: 5 * GRAND, // todo: define value for Mainnet/Testnet/Qanet - prepare_period: 2 * HOURS, // todo: define value for Mainnet/Testnet/Qanet + decision_deposit: 10 * GRAND, + prepare_period: 30 * MINUTES, decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, // todo: define value for Mainnet/Testnet/Qanet + confirm_period: 10 * MINUTES, + min_enactment_period: 10 * MINUTES, min_approval: APP_CLUSTER_PROTOCOL_ACTIVATOR, min_support: SUP_CLUSTER_PROTOCOL_ACTIVATOR, }, @@ -193,11 +193,11 @@ const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo); 14 pallet_referenda::TrackInfo { name: "cluster_protocol_updater", max_deciding: 50, - decision_deposit: 5 * GRAND, // todo: define value for Mainnet/Testnet/Qanet - prepare_period: 2 * HOURS, // todo: define value for Mainnet/Testnet/Qanet + decision_deposit: 10 * GRAND, + prepare_period: 30 * MINUTES, decision_period: 28 * DAYS, - confirm_period: 3 * HOURS, - min_enactment_period: 10 * MINUTES, // todo: define value for Mainnet/Testnet/Qanet + confirm_period: 10 * MINUTES, + min_enactment_period: 10 * MINUTES, min_approval: APP_CLUSTER_PROTOCOL_UPDATER, min_support: SUP_CLUSTER_PROTOCOL_UPDATER, }, diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index f89ffb420..1e05756f1 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -137,7 +137,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 54004, + spec_version: 54005, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 18, @@ -1171,8 +1171,8 @@ impl pallet_ddc_payouts::Config for Runtime { } parameter_types! { - pub const ClusterBondingAmount: Balance = DOLLARS; - pub const ClusterUnboningDelay: BlockNumber = MINUTES; + pub const ClusterBondingAmount: Balance = 100 * GRAND; + pub const ClusterUnboningDelay: BlockNumber = 28 * DAYS; } impl pallet_ddc_staking::Config for Runtime { diff --git a/runtime/common/src/constants.rs b/runtime/common/src/constants.rs index 55f5a86fd..b9792a82a 100644 --- a/runtime/common/src/constants.rs +++ b/runtime/common/src/constants.rs @@ -130,14 +130,23 @@ pub mod tracks { percent(50), ); pub const APP_CLUSTER_PROTOCOL_ACTIVATOR: Curve = - Curve::make_linear(10, 28, percent(0), percent(10)); - pub const SUP_CLUSTER_PROTOCOL_ACTIVATOR: Curve = - Curve::make_reciprocal(1, 28, percent(4), percent(0), percent(10)); - + Curve::make_reciprocal(16, 28 * 24, percent(96), percent(50), percent(100)); + pub const SUP_CLUSTER_PROTOCOL_ACTIVATOR: Curve = Curve::make_reciprocal( + 1, + 28, + percent_perbill(Perbill::from_parts(100_000)), // 0.01 % + percent_perbill(Perbill::from_parts(25_000)), // 0.0025 % + percent(50), + ); pub const APP_CLUSTER_PROTOCOL_UPDATER: Curve = - Curve::make_linear(10, 28, percent(0), percent(10)); - pub const SUP_CLUSTER_PROTOCOL_UPDATER: Curve = - Curve::make_reciprocal(1, 28, percent(4), percent(0), percent(10)); + Curve::make_reciprocal(16, 28 * 24, percent(96), percent(50), percent(100)); + pub const SUP_CLUSTER_PROTOCOL_UPDATER: Curve = Curve::make_reciprocal( + 1, + 28, + percent_perbill(Perbill::from_parts(100_000)), // 0.01 % + percent_perbill(Perbill::from_parts(25_000)), // 0.0025 % + percent(50), + ); // Root track pub const ROOT_TRACK_ID: u16 = 0;