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

Set correct onchain versions #1796

Merged
merged 2 commits into from
Apr 4, 2024
Merged

Set correct onchain versions #1796

merged 2 commits into from
Apr 4, 2024

Conversation

lemunozm
Copy link
Contributor

@lemunozm lemunozm commented Apr 4, 2024

Description

I'm not sure why the new Oracle pallets added have their on-chain version of 0 when it should be 1. It is not an issue now, but it can be if we update them tomorrow, and makes the new Ci job for migrations fail. This PR set them with the correct version.

My hypothesis of why this has happened is that we reused the previous indexes from the previous oracle pallets (orml-oracle, and pallet-data-collection), and because of this, it has not update the version (even when the pallet names have changed).

The same happens for Orderbook and ForeignInvestments for altair. Altair didn't require reseting the storage but we did not update the version numbers there.

@lemunozm lemunozm added Q1-easy Can be done by primarily duplicating and adapting code. I3-annoyance The code behaves as expected, but "expected" is an issue. P7-asap Issue should be addressed in the next days. labels Apr 4, 2024
@lemunozm lemunozm self-assigned this Apr 4, 2024
@lemunozm lemunozm changed the title Oracles: set onchain versions Oracles: set correct onchain versions Apr 4, 2024
@lemunozm lemunozm force-pushed the release/oracle-versions branch from 8189052 to b617f08 Compare April 4, 2024 09:25
@lemunozm lemunozm force-pushed the release/oracle-versions branch from b617f08 to 10fb26e Compare April 4, 2024 09:27
@lemunozm lemunozm changed the title Oracles: set correct onchain versions Set correct onchain versions Apr 4, 2024
@lemunozm
Copy link
Contributor Author

lemunozm commented Apr 4, 2024

I think this changes are not required to demo, because soon or later it will be hard reset

Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes! I suppose pallets are initialized with storage version 0 instead of version at present when added to the runtime..

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.70%. Comparing base (90490eb) to head (10fb26e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1796   +/-   ##
=======================================
  Coverage   47.70%   47.70%           
=======================================
  Files         170      170           
  Lines       13576    13576           
=======================================
  Hits         6477     6477           
  Misses       7099     7099           

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

@lemunozm lemunozm merged commit d3a0f0c into main Apr 4, 2024
12 checks passed
@lemunozm
Copy link
Contributor Author

lemunozm commented Apr 4, 2024

But when adding an external pallet, it always starts with the version it has, not 0 🤔

@lemunozm lemunozm deleted the release/oracle-versions branch April 4, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I3-annoyance The code behaves as expected, but "expected" is an issue. P7-asap Issue should be addressed in the next days. Q1-easy Can be done by primarily duplicating and adapting code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants