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: asset-registry metadata migration #896

Conversation

sander2
Copy link
Contributor

@sander2 sander2 commented Mar 15, 2023

Addresses #894 .

Note that as discussed in the issue, the migration only works if Metadata.location is None or Some(VersionedMultiLocation::V1(_)). Any metadata items that are Some(VersionedMultiLocation::V0()) will be set to None.

@xlc
Copy link
Member

xlc commented Mar 15, 2023

Kind of blocked by paritytech/polkadot#6884 which changes the encoding format for versioned types.

@xlc
Copy link
Member

xlc commented Mar 16, 2023

Actually there is no need of migration for V1 because V1 and V2 are identical (after paritytech/polkadot#6884 is merged)

@sander2
Copy link
Contributor Author

sander2 commented Mar 17, 2023

Actually there is no need of migration for V1 because V1 and V2 are identical (after paritytech/polkadot#6884 is merged)

Nice, once that is backported this won't be required indeed, so closing this

@sander2 sander2 closed this Mar 17, 2023
@sander2
Copy link
Contributor Author

sander2 commented Mar 17, 2023

Actually maybe we should still merge this to for v0 users? Better to remove the location as done by this migration, than to have invalid storage items I think

@sander2 sander2 reopened this Mar 17, 2023
@xlc
Copy link
Member

xlc commented Mar 19, 2023

I am not sure if that makes sense. They should just upgrade it to the v1 format before upgrade to v3. Delete data and have invalid data is somewhat the same to the runtime as failed decode should just give the default data.

@sander2 sander2 closed this Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants