Skip to content

Commit

Permalink
v5.26.0 prep (#1097)
Browse files Browse the repository at this point in the history
* v5.26.0 release prep

* removed line
  • Loading branch information
PierreOssun authored Dec 5, 2023
1 parent 34522c0 commit 1cff317
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 45 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.25.0"
version = "5.26.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.25.0"
version = "5.26.0"
build = "build.rs"
authors.workspace = true
edition.workspace = true
Expand Down
35 changes: 2 additions & 33 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: 72,
spec_version: 73,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -1057,41 +1057,10 @@ pub type Executive = frame_executive::Executive<
Migrations,
>;

// Used to cleanup BaseFee storage - remove once cleanup is done.
parameter_types! {
pub const BaseFeeStr: &'static str = "BaseFee";
}

/// Simple `OnRuntimeUpgrade` logic to prepare Astar runtime for `DynamicEvmBaseFee` pallet.
pub use frame_support::traits::{OnRuntimeUpgrade, StorageVersion};
pub struct DynamicEvmBaseFeeMigration;
impl OnRuntimeUpgrade for DynamicEvmBaseFeeMigration {
fn on_runtime_upgrade() -> Weight {
// Safety check to ensure we don't execute this migration twice
if pallet_dynamic_evm_base_fee::BaseFeePerGas::<Runtime>::exists() {
return <Runtime as frame_system::Config>::DbWeight::get().reads(1);
}

// Set the init value to what was set before on the old `BaseFee` pallet.
pallet_dynamic_evm_base_fee::BaseFeePerGas::<Runtime>::put(U256::from(1_000_000_000_u128));

// Astar's multiplier should be set to lowest value to keep native transaction price as close as possible to the legacy.
pallet_transaction_payment::NextFeeMultiplier::<Runtime>::put(MinimumMultiplier::get());

// Set init storage version for the pallet
StorageVersion::new(1).put::<pallet_dynamic_evm_base_fee::Pallet<Runtime>>();

<Runtime as frame_system::Config>::DbWeight::get().reads_writes(1, 3)
}
}

/// All migrations that will run on the next runtime upgrade.
///
/// Once done, migrations should be removed from the tuple.
pub type Migrations = (
frame_support::migrations::RemovePallet<BaseFeeStr, RocksDbWeight>,
DynamicEvmBaseFeeMigration,
);
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.25.0"
version = "5.26.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.25.0"
version = "5.26.0"
build = "build.rs"
authors.workspace = true
edition.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion runtime/shibuya/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("shibuya"),
impl_name: create_runtime_str!("shibuya"),
authoring_version: 1,
spec_version: 115,
spec_version: 116,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
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.25.0"
version = "5.26.0"
build = "build.rs"
authors.workspace = true
edition.workspace = true
Expand Down
3 changes: 2 additions & 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: 112,
spec_version: 113,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -1087,6 +1087,7 @@ impl OnRuntimeUpgrade for HybridInflationModelMigration {
/// 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: 113
pub type Migrations = HybridInflationModelMigration;

type EventRecord = frame_system::EventRecord<
Expand Down

0 comments on commit 1cff317

Please sign in to comment.