Skip to content
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

fix: gateway migration et al. #1950

Merged
merged 5 commits into from
Aug 8, 2024

Conversation

wischli
Copy link
Contributor

@wischli wischli commented Aug 7, 2024

Description

  • Fixes Gateway migration from migration: Add LP Gateway migration for outbound messages #1946
  • Removes DMP Queue from runtimes because this was deprecated with Polkadot v1.7.2 (or lower) but we needed to keep the pallet in order to migrate to the new Polkadot SDK Message Queue. This is done now and DMP Queue can be removed safely.
  • Removes deprecated common migrations for loans v4 and hold reasons from Polkadot v1.7.2
  • Adds migration to remove undecodable ForeignInvestmentInfo v1 storage entries (see Slack for context)

Checklist:

  • I have added Rust doc comments to structs, enums, traits and functions
  • I have made corresponding changes to the documentation
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works

@wischli wischli added I3-annoyance The code behaves as expected, but "expected" is an issue. D8-migration Pull request touches storage and needs migration code. labels Aug 7, 2024
@wischli wischli self-assigned this Aug 7, 2024
@wischli wischli requested review from lemunozm and cdamian August 7, 2024 10:30
@cdamian
Copy link
Contributor

cdamian commented Aug 7, 2024

Thank you very much @wischli!!! <3

fn on_runtime_upgrade() -> Weight {
let mut weight = Weight::zero();

match clear_prefix(&get_storage_prefix(), Some(REMOVAL_LIMIT)) {
Copy link
Contributor Author

@wischli wischli Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is not the way we should do it and instead I should set up the old storage entry with the deprecated tranche currency type but I hope we can make an exception here because of the limited time until the audit. This prefix does not exist anymore in v2.

On Centrifuge Chain, there are 3 FI entries with a total of 0.000006 USDC. I discussed with Jay that we can discard it. Swapping with Orderbook is not possible because the amounts are too low.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree! Thanks for the explanation

Copy link
Contributor

@lemunozm lemunozm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @wischli for this clean up and for being to much aware of all details of migrations

Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 41 lines in your changes missing coverage. Please review.

Please upload report for BASE (feat/lp-v2-gateway-queue-migration@33f81d6). Learn more about missing BASE report.

Files Patch % Lines
...me/common/src/migrations/foreign_investments_v2.rs 0.00% 22 Missing ⚠️
...e/common/src/migrations/liquidity_pools_gateway.rs 0.00% 19 Missing ⚠️
Additional details and impacted files
@@                          Coverage Diff                          @@
##             feat/lp-v2-gateway-queue-migration    #1950   +/-   ##
=====================================================================
  Coverage                                      ?   47.90%           
=====================================================================
  Files                                         ?      184           
  Lines                                         ?    12920           
  Branches                                      ?        0           
=====================================================================
  Hits                                          ?     6189           
  Misses                                        ?     6731           
  Partials                                      ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lemunozm
Copy link
Contributor

lemunozm commented Aug 7, 2024

It seems like our try-runtime CI job is broken 🤔

@wischli wischli merged commit ebd3e08 into feat/lp-v2-gateway-queue-migration Aug 8, 2024
9 checks passed
@wischli
Copy link
Contributor Author

wischli commented Aug 8, 2024

It seems like our try-runtime CI job is broken 🤔

9dc9c03 should fix it.

wischli added a commit that referenced this pull request Aug 8, 2024
* migration: Add LP Gateway migration for outbound messages

* fix: gateway migration et al. (#1950)

* chore: remove deprecated DMP Queue

* chore: remove deprecated custom migrations

* fix: gateway migration

* fix: rm FI v1 storage entries

* ci: fix try-runtime cli by adding install

---------

Co-authored-by: William Freudenberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D8-migration Pull request touches storage and needs migration code. I3-annoyance The code behaves as expected, but "expected" is an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants