Skip to content

Commit

Permalink
feat: v0.12.0 for altair RU
Browse files Browse the repository at this point in the history
  • Loading branch information
wischli committed Jun 28, 2024
1 parent 230651d commit 6b11298
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 53 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.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.11.3"
version = "0.12.0"

[workspace.dependencies]
hex-literal = { version = "0.4.1" }
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 @@ -173,7 +173,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("altair"),
impl_name: create_runtime_str!("altair"),
authoring_version: 1,
spec_version: 1103,
spec_version: 1200,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -2072,7 +2072,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
migrations::UpgradeAltair1103,
migrations::UpgradeAltair1200,
>;

// Frame Order in this block dictates the index of each one in the metadata
Expand Down
2 changes: 1 addition & 1 deletion runtime/altair/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ parameter_types! {

/// The migration set for Altair @ Kusama.
/// It includes all the migrations that have to be applied on that chain.
pub type UpgradeAltair1103 = (
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>,
Expand Down
4 changes: 2 additions & 2 deletions runtime/centrifuge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("centrifuge"),
impl_name: create_runtime_str!("centrifuge"),
authoring_version: 1,
spec_version: 1103,
spec_version: 1200,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -2083,7 +2083,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
migrations::UpgradeCentrifuge1103,
migrations::UpgradeCentrifuge1200,
>;

// Frame Order in this block dictates the index of each one in the metadata
Expand Down
41 changes: 1 addition & 40 deletions runtime/centrifuge/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,6 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

use cfg_primitives::AccountId;
use frame_support::parameter_types;
use sp_std::{vec, vec::Vec};

use crate::{OraclePriceCollection, OraclePriceFeed};

// Number of identities on Centrifuge Chain on 29.05.2024 was 34
const IDENTITY_MIGRATION_KEY_LIMIT: u64 = 1000;

parameter_types! {
// Address used by Anemoy to withdraw in AssetHub
// 4dTeMxuPJCK7zQGhFcgCivSJqBs9Wo2SuMSQeYCCuVJ9xrE2 --> 5CSfibAR9HHEwKpXbdsDHguAmLgKS6yKat2joTLA75DZ152L
pub AccountMap: Vec<(AccountId, AccountId)> = vec![
(
AccountId::new(hex_literal::hex!("5dbb2cec05b6bda775f7945827b887b0e7b5245eae8b4ef266c60820c9377185")),
AccountId::new(hex_literal::hex!("10c03288a534d77418e3c19e745dfbc952423e179e1e3baa89e287092fc7802f"))
)
];
}

/// The migration set for Centrifuge @ Polkadot.
/// It includes all the migrations that have to be applied on that chain.
pub type UpgradeCentrifuge1103 = (
runtime_common::migrations::increase_storage_version::Migration<OraclePriceFeed, 0, 1>,
runtime_common::migrations::increase_storage_version::Migration<OraclePriceCollection, 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>,
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, ()>,
runtime_common::migrations::restricted_location::MigrateRestrictedTransferLocation<
crate::Runtime,
AccountMap,
>,
);
pub type UpgradeCentrifuge1200 = ();
4 changes: 2 additions & 2 deletions runtime/development/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,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: 1103,
spec_version: 1200,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -2172,7 +2172,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
crate::migrations::UpgradeDevelopment1103,
crate::migrations::UpgradeDevelopment1200,
>;

// 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 UpgradeDevelopment1100 = (
pub type UpgradeDevelopment1200 = (
// 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 6b11298

Please sign in to comment.