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 Rikiddo migration #1363

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Fix Rikiddo migration #1363

merged 1 commit into from
Aug 30, 2024

Conversation

maltekliemann
Copy link
Contributor

What does it do?

The pallet prefix for zrml-rikiddo was specified incorrectly in the migration which clears the pallet. This is now mitigated. You can see that clearing the rikiddo pallet now actually deletes a key. That key is for the storage version of the pallet.

It may seem strange that the pallet for custom assets, for instance, doesn't have any keys. This seems to be due to the very different ways these two pallets were initialized, with the CustomAssets instance falling victim to the substrate bug that doesn't set the storage version when a pallet is added to a live chain. You can test this by finding what the storage key for the storage version of CustomAssets is (0x97ca552d2b66546c8271d80839408bfd4e7b9012096b41c4eb3aaf947f6ea429) and then querying it on Battery Station or Zeitgeist. The result is 0x, i.e. there is no storage under this key. By contrast, the storage key for the storage version of the Rikiddo pallet returns 0x0000, the correct zero-initialized value.

What important points should reviewers know?

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues?

References

@maltekliemann maltekliemann requested a review from sea212 as a code owner August 29, 2024 11:08
@maltekliemann maltekliemann self-assigned this Aug 29, 2024
@maltekliemann maltekliemann added the s:review-needed The pull request requires reviews label Aug 29, 2024
@maltekliemann maltekliemann added this to the v0.5.5 milestone Aug 29, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@16dae64). Learn more about missing BASE report.
Report is 1 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1363   +/-   ##
=======================================
  Coverage        ?   93.21%           
=======================================
  Files           ?      132           
  Lines           ?    29360           
  Branches        ?        0           
=======================================
  Hits            ?    27368           
  Misses          ?     1992           
  Partials        ?        0           
Flag Coverage Δ
tests 93.21% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@Chralt98 Chralt98 left a comment

Choose a reason for hiding this comment

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

Interesting, good that you caught this. Otherwise the RemovePallet would have been a noop.

@Chralt98 Chralt98 added s:accepted This pull request is ready for merge and removed s:review-needed The pull request requires reviews labels Aug 30, 2024
@mergify mergify bot merged commit aeb953d into main Aug 30, 2024
24 checks passed
@mergify mergify bot deleted the mkl-fix-migrations branch August 30, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:accepted This pull request is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants