Skip to content

Commit

Permalink
fix 1.7.0 upgrade changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Feb 28, 2024
1 parent 63eabff commit 6f6337d
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 87 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions system-parachains/encointer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ smallvec = "1.13.1"
# encointer deps
encointer-balances-tx-payment = { default-features = false, version = "6.0.0" }
encointer-balances-tx-payment-rpc-runtime-api = { default-features = false, version = "6.0.0" }
encointer-primitives = { default-features = false, version = "6.0.0" }
encointer-primitives = { default-features = false, version = "6.0.2" }
pallet-encointer-balances = { default-features = false, version = "6.0.0" }
pallet-encointer-bazaar = { default-features = false, version = "6.0.0" }
pallet-encointer-bazaar-rpc-runtime-api = { default-features = false, version = "6.0.0" }
Expand Down Expand Up @@ -153,7 +153,7 @@ std = [
"frame-support/std",
"frame-system-rpc-runtime-api/std",
"frame-system/std",
"frame-try-runtime/std",
"frame-try-runtime?/std",
"log/std",
"pallet-asset-tx-payment/std",
"pallet-aura/std",
Expand Down Expand Up @@ -240,3 +240,4 @@ experimental = ["pallet-aura/experimental"]
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = ["sp-api/disable-logging"]

12 changes: 5 additions & 7 deletions system-parachains/encointer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ use system_parachains_constants::{
SLOT_DURATION,
};
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
use xcm::{latest::BodyId, v3::AssetId as XcmAssetId};
use xcm::latest::prelude::{BodyId, AssetId as XcmAssetId};

use xcm_config::{KsmLocation, XcmOriginToTransactDispatchOrigin};

Expand Down Expand Up @@ -307,7 +307,6 @@ impl pallet_balances::Config for Runtime {
type RuntimeHoldReason = ();
type RuntimeFreezeReason = RuntimeFreezeReason;
type FreezeIdentifier = ();
type MaxHolds = ConstU32<0>;
type MaxFreezes = ConstU32<0>;
}

Expand Down Expand Up @@ -440,7 +439,7 @@ impl cumulus_pallet_aura_ext::Config for Runtime {}
parameter_types! {
pub const ExecutiveBody: BodyId = BodyId::Executive;
/// The asset ID for the asset that we use to pay for message delivery fees.
pub FeeAssetId: XcmAssetId = XcmAssetId::Concrete(xcm_config::KsmLocation::get());
pub FeeAssetId: XcmAssetId = XcmAssetId(xcm_config::KsmLocation::get());
/// The base fee for the message delivery fees.
pub const ToSiblingBaseDeliveryFee: u128 = CENTS.saturating_mul(3);
pub const ToParentBaseDeliveryFee: u128 = CENTS.saturating_mul(3);
Expand Down Expand Up @@ -706,10 +705,7 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, Si

/// Migrations to apply on runtime upgrade.
pub type Migrations = (
// fixing the scheduler with a local migration is necessary because we have missed intermediate
// migrations. the safest migration is, therefore, to clear all storage and bump StorageVersion
migrations_fix::scheduler::v4::MigrateToV4<Runtime>,
// also here we're actually too late with applying the migration. however, the migration does
// we're actually too late with applying the migration. however, the migration does
// work as-is.
pallet_xcm::migration::v1::VersionUncheckedMigrateToV1<Runtime>,
// balances are more tricky. We missed to do the migration to V1 and now we have inconsistent
Expand All @@ -721,6 +717,8 @@ pub type Migrations = (
//then apply the proper migration as we should have done earlier
pallet_balances::migration::MigrateToTrackInactive<Runtime, xcm_config::CheckingAccount>,
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
);

/// Executive: handles dispatch to the various modules.
Expand Down
116 changes: 71 additions & 45 deletions system-parachains/encointer/src/weights/pallet_balances.rs

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

Loading

0 comments on commit 6f6337d

Please sign in to comment.