Skip to content

Commit 5d8f799

Browse files
authored
v6.6.5 prerelease (#1556)
* Release `v6.6.5` * Migrate * Add addresses * Set storage * Correct reward address * Fix * Fix test
1 parent e619d26 commit 5d8f799

File tree

12 files changed

+53
-32
lines changed

12 files changed

+53
-32
lines changed

.github/note-template/runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## {{ .Env.CHAIN | strings.Title }}
22
<h3 align="right">Upgrade Priority HIGH :red_circle:</h3>
3-
<h4 align="center">!!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!!</h4>
3+
<h4 align="center">!!All nodes must be upgraded to a minimum of `v6.6.4` version because of the new asynchronous backing feature!!</h4>
44

55
#### Whitelist Hash
66
```

Cargo.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ edition = "2021"
1818
homepage = "https://darwinia.network"
1919
license = "GPL-3.0"
2020
repository = "https://github.com/darwinia-network/darwinia"
21-
version = "6.6.4"
21+
version = "6.6.5"
2222

2323
[workspace.dependencies]
2424
# crates.io

node/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
///
2525
/// The worker binaries associated to the node binary should ensure that they are using the same
2626
/// version as the main node that started them.
27-
pub const NODE_VERSION: &str = "6.6.4";
27+
pub const NODE_VERSION: &str = "6.6.5";
2828

2929
/// Sub-commands supported by the collator.
3030
#[derive(Debug, clap::Subcommand)]

pallet/account-migration/src/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
5454
spec_name: sp_runtime::create_runtime_str!("Darwinia2"),
5555
impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"),
5656
authoring_version: 0,
57-
spec_version: 6_6_4_0,
57+
spec_version: 6_6_5_0,
5858
impl_version: 0,
5959
apis: sp_version::create_apis_vec!([]),
6060
transaction_version: 0,

pallet/staking/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,11 @@ pub mod pallet {
671671
};
672672

673673
reward(account_id(), actual_reward_to_ring);
674-
reward(<KtonRewardDistributionContract<T>>::get(), reward_to_kton);
674+
reward(
675+
[109, 111, 100, 108, 100, 97, 47, 116, 114, 115, 114, 121, 0, 0, 0, 0, 0, 0, 0, 0]
676+
.into(),
677+
reward_to_kton,
678+
);
675679

676680
T::KtonStakerNotifier::notify(reward_to_kton);
677681
}

pallet/staking/src/tests.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,6 @@ fn payout_should_work() {
539539
vec![
540540
// Pay to staking failed.
541541
Event::Unpaid { who: account_id(), amount: 5000000000000000000000 },
542-
// Pay to distribution contract failed.
543-
// The contract address is the same as staking pallet account in unit test.
544-
Event::Unpaid { who: account_id(), amount: 5000000000000000000000 },
545542
// Pay to collator failed.
546543
Event::Unpaid { who: account_id_of(6), amount: 3749999998500000000000 },
547544
// Pay to nominator failed.

runtime/crab/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
8080
spec_name: sp_runtime::create_runtime_str!("Crab2"),
8181
impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"),
8282
authoring_version: 0,
83-
spec_version: 6_6_4_0,
83+
spec_version: 6_6_5_0,
8484
impl_version: 0,
8585
apis: RUNTIME_API_VERSIONS,
8686
transaction_version: 0,

runtime/crab/src/migration.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
4545
}
4646

4747
fn migrate() -> frame_support::weights::Weight {
48-
frame_support::weights::Weight::zero()
49-
// <Runtime as frame_system::Config>::DbWeight::get().reads_writes(0, 0)
48+
const KTON_DAO_VAULT_ADDR: &str = "0xf1b4f3D438eE2B363C5ba1641A498709ff5780bA";
49+
50+
#[cfg(feature = "try-runtime")]
51+
assert!(array_bytes::hex_n_into::<_, _, 20>(KTON_DAO_VAULT_ADDR).is_ok());
52+
53+
if let Ok(w) = array_bytes::hex_n_into::<_, _, 20>(KTON_DAO_VAULT_ADDR) {
54+
<darwinia_staking::KtonRewardDistributionContract<Runtime>>::put(w);
55+
darwinia_staking::migration::migrate_staking_reward_distribution_contract::<Runtime>(w);
56+
}
57+
58+
// frame_support::weights::Weight::zero()
59+
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(10, 10)
5060
}

runtime/darwinia/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
8080
spec_name: sp_runtime::create_runtime_str!("Darwinia2"),
8181
impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"),
8282
authoring_version: 0,
83-
spec_version: 6_6_4_0,
83+
spec_version: 6_6_5_0,
8484
impl_version: 0,
8585
apis: RUNTIME_API_VERSIONS,
8686
transaction_version: 0,

runtime/darwinia/src/migration.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ fn migrate() -> frame_support::weights::Weight {
6161
}
6262
.remove_storage_values();
6363

64+
const KTON_DAO_VAULT_ADDR: &str = "0xf1b4f3D438eE2B363C5ba1641A498709ff5780bA";
65+
66+
#[cfg(feature = "try-runtime")]
67+
assert!(array_bytes::hex_n_into::<_, _, 20>(KTON_DAO_VAULT_ADDR).is_ok());
68+
69+
if let Ok(w) = array_bytes::hex_n_into::<_, _, 20>(KTON_DAO_VAULT_ADDR) {
70+
<darwinia_staking::KtonRewardDistributionContract<Runtime>>::put(w);
71+
darwinia_staking::migration::migrate_staking_reward_distribution_contract::<Runtime>(w);
72+
}
73+
6474
// frame_support::weights::Weight::zero()
65-
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(0, n)
75+
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(10, n + 10)
6676
}

runtime/koi/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
8080
spec_name: sp_runtime::create_runtime_str!("Darwinia Koi"),
8181
impl_name: sp_runtime::create_runtime_str!("DarwiniaOfficialRust"),
8282
authoring_version: 0,
83-
spec_version: 6_6_4_1,
83+
spec_version: 6_6_5_0,
8484
impl_version: 0,
8585
apis: RUNTIME_API_VERSIONS,
8686
transaction_version: 0,

0 commit comments

Comments
 (0)