From 3da4e2ea50b74b8c1f0705907dfa7387fc2223c6 Mon Sep 17 00:00:00 2001 From: William Freudenberger Date: Fri, 5 Jul 2024 09:53:04 +0200 Subject: [PATCH] chore: bump spec versions + cleanup migrations --- Cargo.lock | 8 +-- Cargo.toml | 96 +++++++++++++-------------- runtime/altair/src/lib.rs | 4 +- runtime/altair/src/migrations.rs | 60 +---------------- runtime/centrifuge/src/lib.rs | 4 +- runtime/centrifuge/src/migrations.rs | 2 +- runtime/development/src/lib.rs | 4 +- runtime/development/src/migrations.rs | 2 +- 8 files changed, 61 insertions(+), 119 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39dbc922cc..d9f6b1b5d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,7 +121,7 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "altair-runtime" -version = "0.12.0" +version = "0.13.0" dependencies = [ "axelar-gateway-precompile", "cfg-primitives", @@ -1377,7 +1377,7 @@ dependencies = [ [[package]] name = "centrifuge-chain" -version = "0.12.0" +version = "0.13.0" dependencies = [ "altair-runtime", "async-trait", @@ -1470,7 +1470,7 @@ dependencies = [ [[package]] name = "centrifuge-runtime" -version = "0.12.0" +version = "0.13.0" dependencies = [ "axelar-gateway-precompile", "cfg-primitives", @@ -3101,7 +3101,7 @@ dependencies = [ [[package]] name = "development-runtime" -version = "0.12.0" +version = "0.13.0" dependencies = [ "axelar-gateway-precompile", "cfg-primitives", diff --git a/Cargo.toml b/Cargo.toml index eb323f9867..755f52578e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,49 +1,49 @@ [workspace] resolver = "2" members = [ - "node", - "libs/mocks", - "libs/primitives", - "libs/test-utils", - "libs/traits", - "libs/types", - "libs/utils", - "pallets/anchors", - "pallets/anchors-v2", - "pallets/bridge", - "pallets/block-rewards", - "pallets/collator-allowlist", - "pallets/ethereum-transaction", - "pallets/fees", - "pallets/foreign-investments", - "pallets/interest-accrual", - "pallets/investments", - "pallets/keystore", - "pallets/liquidity-pools", - "pallets/liquidity-pools-gateway", - "pallets/liquidity-pools-gateway/axelar-gateway-precompile", - "pallets/liquidity-pools-gateway/routers", - "pallets/liquidity-rewards", - "pallets/loans", - "pallets/oracle-feed", - "pallets/oracle-collection", - "pallets/order-book", - "pallets/permissions", - "pallets/pool-fees", - "pallets/pool-system", - "pallets/pool-registry", - "pallets/restricted-tokens", - "pallets/restricted-xtokens", - "pallets/rewards", - "pallets/swaps", - "pallets/token-mux", - "pallets/transfer-allowlist", - "runtime/altair", - "runtime/centrifuge", - "runtime/development", - "runtime/common", - "runtime/integration-tests", - "runtime/integration-tests/procedural", + "node", + "libs/mocks", + "libs/primitives", + "libs/test-utils", + "libs/traits", + "libs/types", + "libs/utils", + "pallets/anchors", + "pallets/anchors-v2", + "pallets/bridge", + "pallets/block-rewards", + "pallets/collator-allowlist", + "pallets/ethereum-transaction", + "pallets/fees", + "pallets/foreign-investments", + "pallets/interest-accrual", + "pallets/investments", + "pallets/keystore", + "pallets/liquidity-pools", + "pallets/liquidity-pools-gateway", + "pallets/liquidity-pools-gateway/axelar-gateway-precompile", + "pallets/liquidity-pools-gateway/routers", + "pallets/liquidity-rewards", + "pallets/loans", + "pallets/oracle-feed", + "pallets/oracle-collection", + "pallets/order-book", + "pallets/permissions", + "pallets/pool-fees", + "pallets/pool-system", + "pallets/pool-registry", + "pallets/restricted-tokens", + "pallets/restricted-xtokens", + "pallets/rewards", + "pallets/swaps", + "pallets/token-mux", + "pallets/transfer-allowlist", + "runtime/altair", + "runtime/centrifuge", + "runtime/development", + "runtime/common", + "runtime/integration-tests", + "runtime/integration-tests/procedural", ] [workspace.package] @@ -53,7 +53,7 @@ license = "LGPL-3.0" homepage = "https://centrifuge.io/" repository = "https://github.com/centrifuge/centrifuge-chain" documentation = "https://reference.centrifuge.io/centrifuge_chain/index.html" -version = "0.12.0" +version = "0.13.0" [workspace.dependencies] hex-literal = { version = "0.4.1" } @@ -176,7 +176,7 @@ frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", defau frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, features = [ - "tuples-96", + "tuples-96", ], branch = "release-polkadot-v1.7.2" } # Check when tuples-96 can be removed frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" } @@ -288,14 +288,14 @@ pallet-remarks = { git = "https://github.com/foss3/runtime-pallet-library", bran # Moonbeam fork of polkadot-evm/frontier fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2", features = [ - "serde", + "serde", ] } pallet-base-fee = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2", features = [ - "forbid-evm-reentrancy", + "forbid-evm-reentrancy", ] } pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2", features = [ - "forbid-evm-reentrancy", + "forbid-evm-reentrancy", ] } pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v1.7.2" } diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index d8c3e488f2..b37e8d6fea 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -172,7 +172,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("altair"), impl_name: create_runtime_str!("altair"), authoring_version: 1, - spec_version: 1200, + spec_version: 1300, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, @@ -2071,7 +2071,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - migrations::UpgradeAltair1200, + migrations::UpgradeAltair1300, >; // Frame Order in this block dictates the index of each one in the metadata diff --git a/runtime/altair/src/migrations.rs b/runtime/altair/src/migrations.rs index 558c6fb157..f506402093 100644 --- a/runtime/altair/src/migrations.rs +++ b/runtime/altair/src/migrations.rs @@ -10,64 +10,6 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use cfg_primitives::AccountId; -use sp_core::parameter_types; - -use crate::{ForeignInvestments, OraclePriceCollection, OraclePriceFeed, OrderBook}; - -// Number of identities on Altair Chain on 30.05.2024 was 34 -const IDENTITY_MIGRATION_KEY_LIMIT: u64 = 1000; - -parameter_types! { - pub InitialTcMembers: sp_std::vec::Vec = sp_std::vec![ - // Luis: 4ck67NuZLjvbMRijqsmHdRMbGbyq2CoD99urmawqvx73WUn4 - AccountId::new(hex_literal::hex!("3e098bb449c1ab045c84e560c301a04ecd10660b7411b649047c8ca247115265")), - // Cosmin: 4dM5pHAuujs6HT63qpgCa7pMMhq9GpgevY8PSgsaXz6msuB6 - AccountId::new(hex_literal::hex!("58ba2478321eb64560f7e8f1172e8f2b2ba6ea84ecb49efe277bf6228fb35c4b")), - // William: kAKWYPrsqdtdUbQx39xAnNjXJLdHniAbeb96vk1CnjapdVKVt - AccountId::new(hex_literal::hex!("684f4dc6a026ea82a6cb36de4330a1a44428bbe243fb7f26ccf6227b0d0ef054")), - // Frederik: kALk3JfT7QGy4ChQwoV3z45ARuWpgVBGQaRrqt97trG5KPxoy - AccountId::new(hex_literal::hex!("9ed70c707d596bb8687518884161377c2617402f69116ef0970ce0f547b1db5d")), - // Jeroen: kAJ4NgSQg6Jv8JQautnNoHmjt8EYw4Q1Z1G4LsK6bqStqHQyq - AccountId::new(hex_literal::hex!("281dfd3154a3ca796fd870e806fe4d1fa17844ba4b0c03ebae04b8e510b6012e")), - // Lucas: kAMMsuzRLaEgDppbvpcJp2hdCQhiyBTcdWZWFtq3ENrVhtuKg - AccountId::new(hex_literal::hex!("ba2c4540acac96a93e611ec4258ce05338434f12107d35f29783bbd2477dd20e")), - // Cassidy kAM4RNjEyJ1jZiMCA2onHwtLW8EoAtGCjYvNHCGEpvag5jeWF - AccountId::new(hex_literal::hex!("acdbc2ab1dd9274a5d0699a9b666d531b880aef033fd748e5e09522ac5896010")) - ]; -} - /// The migration set for Altair @ Kusama. /// It includes all the migrations that have to be applied on that chain. -pub type UpgradeAltair1200 = ( - runtime_common::migrations::increase_storage_version::Migration, - runtime_common::migrations::increase_storage_version::Migration, - runtime_common::migrations::increase_storage_version::Migration, - runtime_common::migrations::increase_storage_version::Migration, - pallet_collator_selection::migration::v1::MigrateToV1, - pallet_collator_selection::migration::v2::MigrationToV2, - runtime_common::migrations::loans::AddWithLinearPricing, - // As of May 2024, the `pallet_balances::Hold` storage was empty. But better be safe. - runtime_common::migrations::hold_reason::MigrateTransferAllowListHolds< - crate::Runtime, - crate::RuntimeHoldReason, - >, - // Migrations below this comment originate from Polkadot SDK - pallet_xcm::migration::MigrateToLatestXcmVersion, - cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, - pallet_identity::migration::versioned::V0ToV1, - pallet_uniques::migration::MigrateV0ToV1, - // Initialize OpenGov TechnicalCommittee - runtime_common::migrations::technical_comittee::InitMigration, - runtime_common::migrations::increase_storage_version::Migration, - runtime_common::migrations::increase_storage_version::Migration< - crate::TechnicalCommittee, - 0, - 4, - >, - runtime_common::migrations::increase_storage_version::Migration< - crate::TechnicalCommitteeMembership, - 0, - 4, - >, -); +pub type UpgradeAltair1300 = (); diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index e1d71fe98f..d9134e6e5a 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -167,7 +167,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("centrifuge"), impl_name: create_runtime_str!("centrifuge"), authoring_version: 1, - spec_version: 1200, + spec_version: 1300, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, @@ -2082,7 +2082,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - migrations::UpgradeCentrifuge1200, + migrations::UpgradeCentrifuge1300, >; // Frame Order in this block dictates the index of each one in the metadata diff --git a/runtime/centrifuge/src/migrations.rs b/runtime/centrifuge/src/migrations.rs index 0defe2a353..bd16bdc22d 100644 --- a/runtime/centrifuge/src/migrations.rs +++ b/runtime/centrifuge/src/migrations.rs @@ -12,4 +12,4 @@ /// The migration set for Centrifuge @ Polkadot. /// It includes all the migrations that have to be applied on that chain. -pub type UpgradeCentrifuge1200 = (); +pub type UpgradeCentrifuge1300 = (); diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index cb8016acd5..49a93892fd 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -175,7 +175,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("centrifuge-devel"), impl_name: create_runtime_str!("centrifuge-devel"), authoring_version: 1, - spec_version: 1200, + spec_version: 1300, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, @@ -2171,7 +2171,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - crate::migrations::UpgradeDevelopment1200, + crate::migrations::UpgradeDevelopment1300, >; // Frame Order in this block dictates the index of each one in the metadata diff --git a/runtime/development/src/migrations.rs b/runtime/development/src/migrations.rs index 4addb188ee..440a77a4d4 100644 --- a/runtime/development/src/migrations.rs +++ b/runtime/development/src/migrations.rs @@ -21,7 +21,7 @@ parameter_types! { /// The migration set for Development & Demo. /// It includes all the migrations that have to be applied on that chain. -pub type UpgradeDevelopment1200 = ( +pub type UpgradeDevelopment1300 = ( // Initialize OpenGov Technical Committee with Alice runtime_common::migrations::technical_comittee::InitMigration, runtime_common::migrations::increase_storage_version::Migration,