Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v6.6.0 #1387

Merged
merged 6 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 22 additions & 23 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ edition = "2021"
homepage = "https://darwinia.network"
license = "GPL-3.0"
repository = "https://github.com/darwinia-network/darwinia"
version = "6.5.1"
version = "6.6.0"

[workspace.dependencies]
# crates.io
Expand Down
4 changes: 2 additions & 2 deletions node/src/chain_spec/darwinia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ pub fn genesis_config() -> ChainSpec {
treasury: Default::default(),

// Utility stuff.
tx_pause: Default::default(),
// tx_pause: Default::default(),

// XCM stuff.
polkadot_xcm: PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), ..Default::default() },
Expand Down Expand Up @@ -336,7 +336,7 @@ fn testnet_genesis(
treasury: Default::default(),

// Utility stuff.
tx_pause: Default::default(),
// tx_pause: Default::default(),

// XCM stuff.
polkadot_xcm: PolkadotXcmConfig {
Expand Down
1 change: 0 additions & 1 deletion pallet/account-migration/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-11-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `inv.cafe`, CPU: `Intel(R) Core(TM) i9-14900KF`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("pangolin-dev"), DB CACHE: 1024

// Executed Command:
Expand Down
1 change: 0 additions & 1 deletion pallet/deposit/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-11-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `inv.cafe`, CPU: `Intel(R) Core(TM) i9-14900KF`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("pangolin-dev"), DB CACHE: 1024

// Executed Command:
Expand Down
1 change: 0 additions & 1 deletion pallet/ecdsa-authority/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-11-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `inv.cafe`, CPU: `Intel(R) Core(TM) i9-14900KF`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("pangolin-dev"), DB CACHE: 1024

// Executed Command:
Expand Down
1 change: 0 additions & 1 deletion pallet/staking/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-11-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `inv.cafe`, CPU: `Intel(R) Core(TM) i9-14900KF`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("pangolin-dev"), DB CACHE: 1024

// Executed Command:
Expand Down
2 changes: 1 addition & 1 deletion runtime/crab/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,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_5_1_0,
spec_version: 6_6_0_0,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
Expand Down
76 changes: 41 additions & 35 deletions runtime/crab/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,41 +41,47 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
}

fn migrate() -> frame_support::weights::Weight {
let _ =
migration::clear_storage_prefix(b"MessageGadget", b"CommitmentContract", &[], None, None);
let _ = migration::clear_storage_prefix(b"EcdsaAuthority", b"Authorities", &[], None, None);
let _ = migration::clear_storage_prefix(b"EcdsaAuthority", b"NextAuthorities", &[], None, None);
let _ = migration::clear_storage_prefix(b"EcdsaAuthority", b"Nonce", &[], None, None);
let _ = migration::clear_storage_prefix(
b"EcdsaAuthority",
b"AuthoritiesChangeToSign",
&[],
None,
None,
);
let _ =
migration::clear_storage_prefix(b"EcdsaAuthority", b"MessageRootToSign", &[], None, None);
let _ = migration::clear_storage_prefix(b"Council", b"Proposals", &[], None, None);
let _ = migration::clear_storage_prefix(b"Council", b"ProposalOf", &[], None, None);
let _ = migration::clear_storage_prefix(b"Council", b"Voting", &[], None, None);
let _ = migration::clear_storage_prefix(b"Council", b"ProposalCount", &[], None, None);
let _ = migration::clear_storage_prefix(b"Council", b"Members", &[], None, None);
let _ = migration::clear_storage_prefix(b"Council", b"Prime", &[], None, None);
let _ = migration::clear_storage_prefix(b"Democracy", b"PublicPropCount", &[], None, None);
let _ = migration::clear_storage_prefix(b"Democracy", b"PublicProps", &[], None, None);
let _ = migration::clear_storage_prefix(b"Democracy", b"DepositOf", &[], None, None);
let _ = migration::clear_storage_prefix(b"Democracy", b"ReferendumCount", &[], None, None);
let _ = migration::clear_storage_prefix(b"Democracy", b"LowestUnbaked", &[], None, None);
let _ = migration::clear_storage_prefix(b"Democracy", b"ReferendumInfoOf", &[], None, None);
let _ = migration::clear_storage_prefix(b"Democracy", b"VotingOf", &[], None, None);
let _ =
migration::clear_storage_prefix(b"Democracy", b"LastTabledWasExternal", &[], None, None);
let _ = migration::clear_storage_prefix(b"Democracy", b"NextExternal", &[], None, None);
let _ = migration::clear_storage_prefix(b"Democracy", b"Blacklist", &[], None, None);
let _ = migration::clear_storage_prefix(b"Democracy", b"Cancellations", &[], None, None);
let _ = migration::clear_storage_prefix(b"Democracy", b"MetadataOf", &[], None, None);
let items: &[(&[u8], &[&[u8]])] = &[
(b"MessageGadget", &[b"CommitmentContract"]),
(
b"EcdsaAuthority",
&[
b"Authorities",
b"NextAuthorities",
b"Nonce",
b"AuthoritiesChangeToSign",
b"MessageRootToSign",
],
),
(
b"Council",
&[b"Proposals", b"ProposalOf", b"Voting", b"ProposalCount", b"Members", b"Prime"],
),
(
b"Democracy",
&[
b"PublicPropCount",
b"PublicProps",
b"DepositOf",
b"ReferendumCount",
b"LowestUnbaked",
b"ReferendumInfoOf",
b"VotingOf",
b"LastTabledWasExternal",
b"NextExternal",
b"Blacklist",
b"Cancellations",
b"MetadataOf",
],
),
];

let w = items.iter().fold(0, |w, (p, is)| {
w + is.iter().fold(0, |w, i| {
w + migration::clear_storage_prefix(p, i, &[], None, None).backend as u64
})
});

// frame_support::weights::Weight::zero()
RuntimeBlockWeights::get().max_block
// <Runtime as frame_system::Config>::DbWeight::get().reads_writes(0, 2)
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(0, w)
}
2 changes: 1 addition & 1 deletion runtime/crab/src/pallets/governance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl pallet_collective::Config<TechnicalCollective> for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type SetMembersOrigin = RootOr<GeneralAdmin>;
type WeightInfo = weights::pallet_collective_technical_committee::WeightInfo<Self>;
type WeightInfo = weights::pallet_collective::WeightInfo<Self>;
}

impl pallet_conviction_voting::Config for Runtime {
Expand Down
12 changes: 10 additions & 2 deletions runtime/crab/src/pallets/tx_pause.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
use crate::*;

pub struct TxPauseWhitelistedCalls;
// #[cfg(feature = "runtime-benchmarks")]
// impl frame_support::traits::Contains<pallet_tx_pause::RuntimeCallNameOf<Runtime>>
// for TxPauseWhitelistedCalls
// {
// fn contains(_: &pallet_tx_pause::RuntimeCallNameOf<Runtime>) -> bool {
// false
// }
// }
// #[cfg(not(feature = "runtime-benchmarks"))]
impl frame_support::traits::Contains<pallet_tx_pause::RuntimeCallNameOf<Runtime>>
for TxPauseWhitelistedCalls
{
Expand Down Expand Up @@ -50,7 +59,6 @@ impl pallet_tx_pause::Config for Runtime {
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type UnpauseOrigin = RootOrAtLeastTwoThird<TechnicalCollective>;
// TODO: Update the benchmark weight info
type WeightInfo = ();
type WeightInfo = weights::pallet_tx_pause::WeightInfo<Runtime>;
type WhitelistedCalls = TxPauseWhitelistedCalls;
}
Loading