From ef7f74b56146256c929481cd65f624f22964d2c0 Mon Sep 17 00:00:00 2001 From: Bear Wang Date: Thu, 14 Dec 2023 11:05:24 +0800 Subject: [PATCH 1/2] Upgrade to the frontier patch version (#1347) --- Cargo.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 27c096124..23759010e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4201,7 +4201,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "async-trait", "fp-storage", @@ -4213,7 +4213,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "async-trait", "fp-consensus", @@ -4229,7 +4229,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "async-trait", "ethereum", @@ -4260,7 +4260,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "fc-db", "fc-storage", @@ -4283,7 +4283,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "ethereum", "ethereum-types", @@ -4337,7 +4337,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "ethereum", "ethereum-types", @@ -4350,7 +4350,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "ethereum", "ethereum-types", @@ -4541,7 +4541,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "hex", "impl-serde", @@ -4560,7 +4560,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "ethereum", "parity-scale-codec", @@ -4572,7 +4572,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "ethereum", "ethereum-types", @@ -4585,7 +4585,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "evm", "frame-support", @@ -4601,7 +4601,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "ethereum", "ethereum-types", @@ -4618,7 +4618,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "frame-support", "parity-scale-codec", @@ -4630,7 +4630,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "parity-scale-codec", "serde", @@ -8390,7 +8390,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "ethereum", "ethereum-types", @@ -8439,7 +8439,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "environmental", "evm", @@ -8465,7 +8465,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "fp-evm", ] @@ -8473,7 +8473,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bls12381" version = "1.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "ark-bls12-381", "ark-ec", @@ -8485,7 +8485,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "fp-evm", "sp-core", @@ -8515,7 +8515,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "fp-evm", "frame-support", @@ -8527,7 +8527,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "fp-evm", "num", @@ -8536,7 +8536,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "fp-evm", "ripemd", @@ -11107,7 +11107,7 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "precompile-utils" version = "0.1.0" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "derive_more", "environmental", @@ -11135,7 +11135,7 @@ dependencies = [ [[package]] name = "precompile-utils-macro" version = "0.1.0" -source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#a58b609794c4c94926728d5d1f2aa595b816a85d" +source = "git+https://github.com/darwinia-network/frontier?branch=polkadot-v1.1.0-patch#45d5f996e64252be981e886ef46525019db99684" dependencies = [ "case", "num_enum 0.7.1", From 9ac6db77074f5b020da3fe837fce2c1ec63949ad Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Thu, 21 Dec 2023 13:32:23 +0800 Subject: [PATCH 2/2] Release `v6.5.1-1` --- Cargo.lock | 44 +++++++++++++++++------------------ Cargo.toml | 2 +- runtime/crab/src/lib.rs | 2 +- runtime/crab/src/migration.rs | 27 ++------------------- runtime/darwinia/src/lib.rs | 2 +- 5 files changed, 27 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 23759010e..04ce234d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1801,7 +1801,7 @@ dependencies = [ [[package]] name = "crab-runtime" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "array-bytes", "bp-darwinia-core", @@ -2845,7 +2845,7 @@ dependencies = [ [[package]] name = "darwinia" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "array-bytes", "async-trait", @@ -2924,7 +2924,7 @@ dependencies = [ [[package]] name = "darwinia-account-migration" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "array-bytes", "darwinia-deposit", @@ -2949,7 +2949,7 @@ dependencies = [ [[package]] name = "darwinia-asset-limit" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "frame-support", "frame-system", @@ -2960,7 +2960,7 @@ dependencies = [ [[package]] name = "darwinia-common-runtime" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "bp-darwinia-core", "darwinia-precompile-assets", @@ -2988,7 +2988,7 @@ dependencies = [ [[package]] name = "darwinia-deposit" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "darwinia-staking-traits", "dc-inflation", @@ -3009,7 +3009,7 @@ dependencies = [ [[package]] name = "darwinia-ecdsa-authority" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "array-bytes", "dc-primitives", @@ -3029,7 +3029,7 @@ dependencies = [ [[package]] name = "darwinia-message-gadget" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "array-bytes", "frame-support", @@ -3048,7 +3048,7 @@ dependencies = [ [[package]] name = "darwinia-message-transact" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "array-bytes", "bp-message-dispatch", @@ -3077,7 +3077,7 @@ dependencies = [ [[package]] name = "darwinia-precompile-assets" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "fp-evm", "frame-support", @@ -3098,7 +3098,7 @@ dependencies = [ [[package]] name = "darwinia-precompile-bls12-381" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "ark-bls12-381", "ark-ec", @@ -3116,7 +3116,7 @@ dependencies = [ [[package]] name = "darwinia-precompile-deposit" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "darwinia-deposit", "fp-evm", @@ -3136,7 +3136,7 @@ dependencies = [ [[package]] name = "darwinia-precompile-staking" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "darwinia-deposit", "darwinia-staking", @@ -3157,7 +3157,7 @@ dependencies = [ [[package]] name = "darwinia-precompile-state-storage" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "fp-evm", "frame-support", @@ -3176,7 +3176,7 @@ dependencies = [ [[package]] name = "darwinia-runtime" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "array-bytes", "bp-darwinia-core", @@ -3288,7 +3288,7 @@ dependencies = [ [[package]] name = "darwinia-staking" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "darwinia-deposit", "darwinia-staking-traits", @@ -3316,7 +3316,7 @@ dependencies = [ [[package]] name = "darwinia-staking-traits" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "parity-scale-codec", "scale-info", @@ -3351,7 +3351,7 @@ dependencies = [ [[package]] name = "dc-inflation" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "dc-types", "primitive-types", @@ -3361,7 +3361,7 @@ dependencies = [ [[package]] name = "dc-primitives" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "dc-types", "fp-account", @@ -3371,7 +3371,7 @@ dependencies = [ [[package]] name = "dc-types" -version = "6.5.1" +version = "6.5.1-1" [[package]] name = "der" @@ -9265,7 +9265,7 @@ dependencies = [ [[package]] name = "pangolin-runtime" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "array-bytes", "bp-darwinia-core", @@ -9380,7 +9380,7 @@ dependencies = [ [[package]] name = "pangoro-runtime" -version = "6.5.1" +version = "6.5.1-1" dependencies = [ "array-bytes", "bp-darwinia-core", diff --git a/Cargo.toml b/Cargo.toml index 37196aafa..e6b0e41ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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.5.1-1" [workspace.dependencies] # crates.io diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs index db620447e..accb72222 100644 --- a/runtime/crab/src/lib.rs +++ b/runtime/crab/src/lib.rs @@ -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_5_1_1, 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 43980d4c4..10ab892e6 100644 --- a/runtime/crab/src/migration.rs +++ b/runtime/crab/src/migration.rs @@ -41,30 +41,7 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade { } fn migrate() -> frame_support::weights::Weight { - // core - use core::str::FromStr; - // substrate - use frame_support::pallet_prelude::StorageVersion; - - let _ = migration::clear_storage_prefix(b"PhragmenElection", b"Members", &[], None, None); - let _ = migration::clear_storage_prefix(b"PhragmenElection", b"RunnersUp", &[], None, None); - let _ = migration::clear_storage_prefix(b"PhragmenElection", b"Candidates", &[], None, None); - let _ = - migration::clear_storage_prefix(b"PhragmenElection", b"ElectionRounds", &[], None, None); - let _ = migration::clear_storage_prefix(b"PhragmenElection", b"Voting", &[], None, None); - let _ = migration::clear_storage_prefix(b"TechnicalMembership", b"Members", &[], None, None); - let _ = migration::clear_storage_prefix(b"TechnicalMembership", b"Prime", &[], None, None); - - StorageVersion::new(1).put::>(); - - const REVERT_BYTECODE: [u8; 5] = [0x60, 0x00, 0x60, 0x00, 0xFD]; - // CONVICTION_VOTING_ADDRESS equals to the addr(0x602) in the pallet-evm runtime. - const CONVICTION_VOTING_ADDRESS: &str = "0x0000000000000000000000000000000000000602"; - if let Ok(addr) = sp_core::H160::from_str(CONVICTION_VOTING_ADDRESS) { - EVM::create_account(addr, REVERT_BYTECODE.to_vec()); - } - - // frame_support::weights::Weight::zero() - RuntimeBlockWeights::get().max_block + frame_support::weights::Weight::zero() + // RuntimeBlockWeights::get().max_block // ::DbWeight::get().reads_writes(0, 2) } diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs index fa634d792..d73223617 100644 --- a/runtime/darwinia/src/lib.rs +++ b/runtime/darwinia/src/lib.rs @@ -79,7 +79,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_5_1_0, + spec_version: 6_5_1_1, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0,