Skip to content

Commit

Permalink
chore: bump spec versions + cleanup migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
wischli committed Jul 5, 2024
1 parent 0a26688 commit 3da4e2e
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 119 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 48 additions & 48 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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" }
Expand Down Expand Up @@ -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" }
Expand Down Expand Up @@ -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" }
Expand Down
4 changes: 2 additions & 2 deletions runtime/altair/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -2071,7 +2071,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
migrations::UpgradeAltair1200,
migrations::UpgradeAltair1300,
>;

// Frame Order in this block dictates the index of each one in the metadata
Expand Down
60 changes: 1 addition & 59 deletions runtime/altair/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<AccountId> = 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<OraclePriceFeed, 0, 1>,
runtime_common::migrations::increase_storage_version::Migration<OraclePriceCollection, 0, 1>,
runtime_common::migrations::increase_storage_version::Migration<OrderBook, 0, 1>,
runtime_common::migrations::increase_storage_version::Migration<ForeignInvestments, 0, 1>,
pallet_collator_selection::migration::v1::MigrateToV1<crate::Runtime>,
pallet_collator_selection::migration::v2::MigrationToV2<crate::Runtime>,
runtime_common::migrations::loans::AddWithLinearPricing<crate::Runtime>,
// 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<crate::Runtime>,
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<crate::Runtime>,
pallet_identity::migration::versioned::V0ToV1<crate::Runtime, IDENTITY_MIGRATION_KEY_LIMIT>,
pallet_uniques::migration::MigrateV0ToV1<crate::Runtime, ()>,
// Initialize OpenGov TechnicalCommittee
runtime_common::migrations::technical_comittee::InitMigration<crate::Runtime, InitialTcMembers>,
runtime_common::migrations::increase_storage_version::Migration<crate::Referenda, 0, 1>,
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 = ();
4 changes: 2 additions & 2 deletions runtime/centrifuge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -2082,7 +2082,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
migrations::UpgradeCentrifuge1200,
migrations::UpgradeCentrifuge1300,
>;

// Frame Order in this block dictates the index of each one in the metadata
Expand Down
2 changes: 1 addition & 1 deletion runtime/centrifuge/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ();
4 changes: 2 additions & 2 deletions runtime/development/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -2171,7 +2171,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
crate::migrations::UpgradeDevelopment1200,
crate::migrations::UpgradeDevelopment1300,
>;

// Frame Order in this block dictates the index of each one in the metadata
Expand Down
2 changes: 1 addition & 1 deletion runtime/development/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<crate::Runtime, InitialTcMembers>,
runtime_common::migrations::increase_storage_version::Migration<crate::Referenda, 0, 1>,
Expand Down

0 comments on commit 3da4e2e

Please sign in to comment.