Skip to content

Commit

Permalink
v5.28.0 release prep (#1113)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard authored Dec 20, 2023
1 parent 9536303 commit b487f00
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 52 deletions.
10 changes: 5 additions & 5 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 bin/collator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "astar-collator"
version = "5.27.0"
version = "5.28.0"
description = "Astar collator implementation in Rust."
build = "build.rs"
default-run = "astar-collator"
Expand Down
2 changes: 1 addition & 1 deletion runtime/astar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "astar-runtime"
version = "5.27.0"
version = "5.28.0"
build = "build.rs"
authors.workspace = true
edition.workspace = true
Expand Down
42 changes: 2 additions & 40 deletions runtime/astar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("astar"),
impl_name: create_runtime_str!("astar"),
authoring_version: 1,
spec_version: 74,
spec_version: 75,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -1058,45 +1058,7 @@ pub type Executive = frame_executive::Executive<
Migrations,
>;

pub use frame_support::traits::{OnRuntimeUpgrade, StorageVersion};
pub struct HybridInflationModelMigration;
impl OnRuntimeUpgrade for HybridInflationModelMigration {
fn on_runtime_upgrade() -> Weight {
let mut reward_config = pallet_block_rewards_hybrid::RewardDistributionConfig {
// 4.78%
treasury_percent: Perbill::from_rational(4_783_623u32, 100_000_000u32),
// 23.04%
base_staker_percent: Perbill::from_rational(23_041_451u32, 100_000_000u32),
// 17.27%
dapps_percent: Perbill::from_rational(17_272_878u32, 100_000_000u32),
// 3.06%
collators_percent: Perbill::from_rational(3_061_518u32, 100_000_000u32),
// 51.84%
adjustable_percent: Perbill::from_rational(51_840_530u32, 100_000_000u32),
// 60.00%
ideal_dapps_staking_tvl: Perbill::from_percent(60),
};

// This HAS to be tested prior to update - we need to ensure that config is consistent
#[cfg(feature = "try-runtime")]
assert!(reward_config.is_consistent());

// This should never execute but we need to have code in place that ensures config is consistent
if !reward_config.is_consistent() {
reward_config = Default::default();
}

pallet_block_rewards_hybrid::RewardDistributionConfigStorage::<Runtime>::put(reward_config);

<Runtime as frame_system::pallet::Config>::DbWeight::get().writes(1)
}
}

/// All migrations that will run on the next runtime upgrade.
///
/// Once done, migrations should be removed from the tuple.
/// `HybridInflationModelMigration` to be applied on spec_version: 74
pub type Migrations = HybridInflationModelMigration;
pub type Migrations = ();

type EventRecord = frame_system::EventRecord<
<Runtime as frame_system::Config>::RuntimeEvent,
Expand Down
2 changes: 1 addition & 1 deletion runtime/local/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "local-runtime"
version = "5.27.0"
version = "5.28.0"
build = "build.rs"
authors.workspace = true
edition.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion runtime/shibuya/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shibuya-runtime"
version = "5.27.0"
version = "5.28.0"
build = "build.rs"
authors.workspace = true
edition.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion runtime/shibuya/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("shibuya"),
impl_name: create_runtime_str!("shibuya"),
authoring_version: 1,
spec_version: 117,
spec_version: 118,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -1384,6 +1384,7 @@ parameter_types! {
///
/// Once done, migrations should be removed from the tuple.
pub type Migrations = (
// The following 4 migrations should be done as part of shibuya-118 upgrade.
pallet_inflation::PalletInflationInitConfig<Runtime, InitInflationParams>,
pallet_dapp_staking_v3::DAppStakingV3InitConfig<Runtime, InitDappStakingv3Params>,
frame_support::migrations::RemovePallet<
Expand Down
2 changes: 1 addition & 1 deletion runtime/shiden/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shiden-runtime"
version = "5.27.0"
version = "5.28.0"
build = "build.rs"
authors.workspace = true
edition.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion runtime/shiden/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("shiden"),
impl_name: create_runtime_str!("shiden"),
authoring_version: 1,
spec_version: 114,
spec_version: 115,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down

0 comments on commit b487f00

Please sign in to comment.