diff --git a/.github/note-template/runtime.md b/.github/note-template/runtime.md
index be07232d3..a4acff9ba 100644
--- a/.github/note-template/runtime.md
+++ b/.github/note-template/runtime.md
@@ -1,6 +1,6 @@
## {{ .Env.CHAIN | strings.Title }}
Upgrade Priority HIGH :red_circle:
-!!All nodes need to be updated to this(`v6.6.4`) version prior to the upcoming `v6.6.5` release because of the new asynchronous backing feature!!
+!!All nodes must be upgraded to a minimum of `v6.6.4` version because of the new asynchronous backing feature!!
#### Whitelist Hash
```
diff --git a/Cargo.lock b/Cargo.lock
index 18a5f4150..29945add7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1613,7 +1613,7 @@ dependencies = [
[[package]]
name = "crab-runtime"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"array-bytes 6.2.3",
"cumulus-pallet-aura-ext",
@@ -2622,7 +2622,7 @@ dependencies = [
[[package]]
name = "darwinia"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"array-bytes 6.2.3",
"async-trait",
@@ -2705,7 +2705,7 @@ dependencies = [
[[package]]
name = "darwinia-account-migration"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"array-bytes 6.2.3",
"darwinia-deposit",
@@ -2729,7 +2729,7 @@ dependencies = [
[[package]]
name = "darwinia-asset-limit"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"frame-support",
"frame-system",
@@ -2740,7 +2740,7 @@ dependencies = [
[[package]]
name = "darwinia-common-runtime"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"array-bytes 6.2.3",
"cumulus-primitives-core",
@@ -2771,7 +2771,7 @@ dependencies = [
[[package]]
name = "darwinia-deposit"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"darwinia-staking-traits",
"dc-inflation",
@@ -2791,7 +2791,7 @@ dependencies = [
[[package]]
name = "darwinia-ethtx-forwarder"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"array-bytes 6.2.3",
"ethereum",
@@ -2818,7 +2818,7 @@ dependencies = [
[[package]]
name = "darwinia-precompile-assets"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"fp-evm",
"frame-support",
@@ -2839,7 +2839,7 @@ dependencies = [
[[package]]
name = "darwinia-precompile-deposit"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"darwinia-deposit",
"fp-evm",
@@ -2859,7 +2859,7 @@ dependencies = [
[[package]]
name = "darwinia-precompile-staking"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"darwinia-deposit",
"darwinia-staking",
@@ -2881,7 +2881,7 @@ dependencies = [
[[package]]
name = "darwinia-precompile-state-storage"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"fp-evm",
"frame-support",
@@ -2900,7 +2900,7 @@ dependencies = [
[[package]]
name = "darwinia-runtime"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"array-bytes 6.2.3",
"cumulus-pallet-aura-ext",
@@ -3001,7 +3001,7 @@ dependencies = [
[[package]]
name = "darwinia-staking"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"darwinia-deposit",
"darwinia-ethtx-forwarder",
@@ -3031,7 +3031,7 @@ dependencies = [
[[package]]
name = "darwinia-staking-traits"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -3066,7 +3066,7 @@ dependencies = [
[[package]]
name = "dc-inflation"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"dc-types",
"primitive-types",
@@ -3076,7 +3076,7 @@ dependencies = [
[[package]]
name = "dc-primitives"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"dc-types",
"fp-account",
@@ -3086,7 +3086,7 @@ dependencies = [
[[package]]
name = "dc-types"
-version = "6.6.4"
+version = "6.6.5"
[[package]]
name = "der"
@@ -5744,7 +5744,7 @@ checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28"
[[package]]
name = "koi-runtime"
-version = "6.6.4"
+version = "6.6.5"
dependencies = [
"array-bytes 6.2.3",
"cumulus-pallet-aura-ext",
diff --git a/Cargo.toml b/Cargo.toml
index cd44627a3..2e2c69e89 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,7 +18,7 @@ edition = "2021"
homepage = "https://darwinia.network"
license = "GPL-3.0"
repository = "https://github.com/darwinia-network/darwinia"
-version = "6.6.4"
+version = "6.6.5"
[workspace.dependencies]
# crates.io
diff --git a/node/src/cli.rs b/node/src/cli.rs
index 4bdefc8a7..3fb32cdf5 100644
--- a/node/src/cli.rs
+++ b/node/src/cli.rs
@@ -24,7 +24,7 @@
///
/// The worker binaries associated to the node binary should ensure that they are using the same
/// version as the main node that started them.
-pub const NODE_VERSION: &str = "6.6.4";
+pub const NODE_VERSION: &str = "6.6.5";
/// Sub-commands supported by the collator.
#[derive(Debug, clap::Subcommand)]
diff --git a/pallet/account-migration/src/mock.rs b/pallet/account-migration/src/mock.rs
index 484137262..4e5861011 100644
--- a/pallet/account-migration/src/mock.rs
+++ b/pallet/account-migration/src/mock.rs
@@ -54,7 +54,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
spec_name: sp_runtime::create_runtime_str!("Darwinia2"),
impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"),
authoring_version: 0,
- spec_version: 6_6_4_0,
+ spec_version: 6_6_5_0,
impl_version: 0,
apis: sp_version::create_apis_vec!([]),
transaction_version: 0,
diff --git a/pallet/staking/src/lib.rs b/pallet/staking/src/lib.rs
index fbd6752ea..324ab364b 100644
--- a/pallet/staking/src/lib.rs
+++ b/pallet/staking/src/lib.rs
@@ -671,7 +671,11 @@ pub mod pallet {
};
reward(account_id(), actual_reward_to_ring);
- reward(>::get(), reward_to_kton);
+ reward(
+ [109, 111, 100, 108, 100, 97, 47, 116, 114, 115, 114, 121, 0, 0, 0, 0, 0, 0, 0, 0]
+ .into(),
+ reward_to_kton,
+ );
T::KtonStakerNotifier::notify(reward_to_kton);
}
diff --git a/pallet/staking/src/tests.rs b/pallet/staking/src/tests.rs
index c33784101..87c5df2d8 100644
--- a/pallet/staking/src/tests.rs
+++ b/pallet/staking/src/tests.rs
@@ -539,9 +539,6 @@ fn payout_should_work() {
vec![
// Pay to staking failed.
Event::Unpaid { who: account_id(), amount: 5000000000000000000000 },
- // Pay to distribution contract failed.
- // The contract address is the same as staking pallet account in unit test.
- Event::Unpaid { who: account_id(), amount: 5000000000000000000000 },
// Pay to collator failed.
Event::Unpaid { who: account_id_of(6), amount: 3749999998500000000000 },
// Pay to nominator failed.
diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs
index 36ea847ad..de6f08589 100644
--- a/runtime/crab/src/lib.rs
+++ b/runtime/crab/src/lib.rs
@@ -80,7 +80,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
spec_name: sp_runtime::create_runtime_str!("Crab2"),
impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"),
authoring_version: 0,
- spec_version: 6_6_4_0,
+ spec_version: 6_6_5_0,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
diff --git a/runtime/crab/src/migration.rs b/runtime/crab/src/migration.rs
index 11048fe16..e4e8edc6f 100644
--- a/runtime/crab/src/migration.rs
+++ b/runtime/crab/src/migration.rs
@@ -45,6 +45,16 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
}
fn migrate() -> frame_support::weights::Weight {
- frame_support::weights::Weight::zero()
- // ::DbWeight::get().reads_writes(0, 0)
+ const KTON_DAO_VAULT_ADDR: &str = "0xf1b4f3D438eE2B363C5ba1641A498709ff5780bA";
+
+ #[cfg(feature = "try-runtime")]
+ assert!(array_bytes::hex_n_into::<_, _, 20>(KTON_DAO_VAULT_ADDR).is_ok());
+
+ if let Ok(w) = array_bytes::hex_n_into::<_, _, 20>(KTON_DAO_VAULT_ADDR) {
+ >::put(w);
+ darwinia_staking::migration::migrate_staking_reward_distribution_contract::(w);
+ }
+
+ // frame_support::weights::Weight::zero()
+ ::DbWeight::get().reads_writes(10, 10)
}
diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs
index 4ac6678e8..e375a123b 100644
--- a/runtime/darwinia/src/lib.rs
+++ b/runtime/darwinia/src/lib.rs
@@ -80,7 +80,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
spec_name: sp_runtime::create_runtime_str!("Darwinia2"),
impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"),
authoring_version: 0,
- spec_version: 6_6_4_0,
+ spec_version: 6_6_5_0,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
diff --git a/runtime/darwinia/src/migration.rs b/runtime/darwinia/src/migration.rs
index bdfd8217f..01249412a 100644
--- a/runtime/darwinia/src/migration.rs
+++ b/runtime/darwinia/src/migration.rs
@@ -61,6 +61,16 @@ fn migrate() -> frame_support::weights::Weight {
}
.remove_storage_values();
+ const KTON_DAO_VAULT_ADDR: &str = "0xf1b4f3D438eE2B363C5ba1641A498709ff5780bA";
+
+ #[cfg(feature = "try-runtime")]
+ assert!(array_bytes::hex_n_into::<_, _, 20>(KTON_DAO_VAULT_ADDR).is_ok());
+
+ if let Ok(w) = array_bytes::hex_n_into::<_, _, 20>(KTON_DAO_VAULT_ADDR) {
+ >::put(w);
+ darwinia_staking::migration::migrate_staking_reward_distribution_contract::(w);
+ }
+
// frame_support::weights::Weight::zero()
- ::DbWeight::get().reads_writes(0, n)
+ ::DbWeight::get().reads_writes(10, n + 10)
}
diff --git a/runtime/koi/src/lib.rs b/runtime/koi/src/lib.rs
index 9060f90cc..7d24c18f6 100644
--- a/runtime/koi/src/lib.rs
+++ b/runtime/koi/src/lib.rs
@@ -80,7 +80,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
spec_name: sp_runtime::create_runtime_str!("Darwinia Koi"),
impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"),
authoring_version: 0,
- spec_version: 6_6_4_1,
+ spec_version: 6_6_5_0,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,