-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Polkadot-v1.7.2 #1833
Conversation
There is a last test failing. It seems like the HostConfiguration is not applied and I do not know why: https://github.com/centrifuge/centrifuge-chain/actions/runs/9386407945/job/25846936686?pr=1833 As a fast-dirty-fix to make this work I did: 7e69e68 A better solution should be configuring the xcm part correctly. By now, I left this as debt-tech. We, anyway, need to clear and organize the 8K lines of liquidity pools, probably before starting the new features related to it |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1833 +/- ##
==========================================
+ Coverage 46.70% 46.76% +0.06%
==========================================
Files 169 169
Lines 13203 13169 -34
==========================================
- Hits 6166 6159 -7
+ Misses 7037 7010 -27 ☔ View full report in Codecov by Sentry. |
* migration for restricted transfer location * add correct location for centrifuge * minor changes * fix benchmarks * fix IT compilation * chore: extend v1.7.2 transfer location migration (#1858) * feat: add pre + post-upgrade * feat: add nuking migration for dev and demo * fix: remove account list for demo * refactor: Use `VersionedLocation` in `RestrictedTransferLocation` (#1861) * feat: add pre + post-upgrade * feat: add nuking migration for dev and demo * fix: remove account list for demo * refactor: use VersionedLocation * fix: transfer allowlist benchmarks + tests * fix: clippy * fix: benchmark cli * fix: revert tight coupling * fmt * fix IT compilation --------- Co-authored-by: William Freudenberger <[email protected]>
@william could you double check the last non-checked point in the PR description? If considered checked, I think we can merge this! |
@@ -23,6 +23,7 @@ pub type UpgradeAltair1035 = ( | |||
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>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have 2 migrations here? Out of curisoity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both needed. The first one is sorting just our invulnerables and pushing storage version from 0 to 1, the second one translates the storage entry and bumps 1 to 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this migraiton at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
type SubscriptionService = PolkadotXcm; | ||
type Trader = Trader; | ||
type TransactionalProcessor = FrameTransactionalProcessor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lemunozm have you looked into the codebase what this type is doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just wraps the XCM call into a transactional layer and rolls back in case of errors: https://github.com/paritytech/polkadot-sdk/blob/851c824dc7a8e7e6db2d0c9fb29d232f2f45198a/polkadot/xcm/xcm-builder/src/transactional.rs#L23
@@ -1010,6 +1056,7 @@ parameter_types! { | |||
|
|||
// periods between treasury spends | |||
pub const SpendPeriod: BlockNumber = 14 * DAYS; | |||
pub const PayoutPeriod: BlockNumber = 30 * DAYS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Config value taken from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a new parameter based on Polkadot et al. config: #1833 (comment)
pallet_balances::Holds::<T>::translate::<OldHolds, _>(|who, holds| { | ||
if Self::account_can_be_migrated(&who, &transfer_allowlist_accounts) { | ||
log::info!("{LOG_PREFIX} Migrating hold for account {who:?}"); | ||
let id_amount = IdAmount::<RuntimeHoldReason, Balance> { | ||
id: HoldReason::TransferAllowance.into(), | ||
// Non-emptiness ensured above | ||
amount: holds[0].amount, | ||
}; | ||
weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); | ||
|
||
Some(NewHolds::truncate_from(vec![id_amount])) | ||
} else { | ||
None | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope that one is not too heavy. How many entries do we have again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two on production luckily. They can only emerge from transfer allowlist for native currency. For more info, see here #1849 (comment)
You linked a stranger :) Sorry for the confusing Github name. It's a reference to my birth name. I am ensuring a Docker image can be build and then all checks are done! Only thing left at this point is re-adding the DMP Queue for the lazy migration. |
Doing it now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work everyone! So happy we can merge this bad boy 🤘
Description
Checklist:
polkadot-sdk
with version1.7.2
.cargo check
&cargo test
usingruntime-benchmarks
featurecargo update
using latest polkadot