substrate
substrate copied to clipboard
Metadata V15: Expose API to fetch metadata for version
This PR extends the Metadata
API to fetch the metadata at a given provided version.
It lays the foundation for keeping the metadata V14 around and exposing the V15 for early adopters before making a major breaking change.
The runtime API comes with 2 new functions:
-
metadata_at_version
- Fetch the metadata at a given version -
metadata_versions
- List the supported versions bymetadata_at_version
At the current moment, substrate only supports V14.
Soon, the V15 will be exposed as unstable
under the u32::max
value.
Users could then fetch the v15 metadata, allowing for an appropriate time to migrate their use cases.
Part of: https://github.com/paritytech/substrate/issues/12939.
polkadot companion: https://github.com/paritytech/polkadot/pull/6655 cumulus companion: https://github.com/paritytech/cumulus/pull/2155
CC: @paritytech/tools-team
bot rebase
Rebased
bot rebase
Rebased
bot rebase
Rebased
bot rebase
Rebased
bot rebase
Rebased
Error: "Check reviews" status is not passing for https://github.com/paritytech/polkadot/pull/6655
When we then have
v15
as stable metadata, we can introducemetadata-v14
.
But adding a feature for old metadata would only make sense if it this substantially reduces compiles times or code size, right? Features are quite annoying.
When we then have
v15
as stable metadata, we can introducemetadata-v14
.But adding a feature for old metadata would only make sense if it this substantially reduces compiles times or code size, right? Features are quite annoying.
Yes, this is then something we can find out while introducing v15
. Another possible way could be that the last two versions are always exposed by the crate. So with the release of v15
you would need to enable v13
manually.
Thank you for your work here @lexnv!!
bot merge
Error: "Check reviews" status is not passing for https://github.com/paritytech/polkadot/pull/6655
bot merge
Error: "Check reviews" status is not passing for https://github.com/paritytech/polkadot/pull/6655
Cc @jacogr
bot merge
This pull request has been mentioned on Polkadot Forum. There might be relevant details there:
https://forum.polkadot.network/t/stablising-v15-metadata/2819/1