-
Notifications
You must be signed in to change notification settings - Fork 124
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
Update frame metadata to v16 #657
Conversation
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.
👍 LGTM
Just a comment on the tests: you test against a correct .bin file and on-the-fly generated erroneous metadata. Would there be an old or invalid .bin file you can also test against?
Yes, there would be the old .bin file, which does not contain any "RuntimeCall" (and similiar) enums. But I don't think this should be tested against, since this is actually rather undesired but hardly preventable behaviour (see subxt discussion:paritytech/subxt#1174 (comment)) . I don't know how to get erroneous metadata. Do you think the manually generated metadata is not sufficient? |
So, it panics, when you use the old one? What I meant was to test the error-case to know how it behaves in that case. That's all. But you can really leave it as is. |
No, it is a legitimate worry, as this does break the compatibility with very old node runtimes. It does not panic, but it returns an error But I think this should be alright, since it allows using the new v15 metadata (and reasonably old v14) and we are not supporting old polkadot-branches anyway. |
Updates the frame-metadata to v16.0
To ensure the tests still run with the v14 -> v15 conversion, it was necessary to exchange the outdated ksm metdata from parity (older than 2 years) with a newer one, as it did not contain the enum "RuntimeCall" yet (see parity discussion: paritytech/subxt#1171). To retrieve the metadata from a Kusama node, the file
dump_metadata
was created. This also allows fetching different metadata for testing purposes when needed.Additionally, the following was updated:
InvalidMetadataError
toMetadataConversionError
to clarify the error name. Also moved the Error Types fromMetadataError
toMetadataConversionError
which were only used in metadata conversion.closes #608