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

Runtime custom sections missing mention of runtime_apis #646

Open
tomaka opened this issue May 25, 2023 · 0 comments
Open

Runtime custom sections missing mention of runtime_apis #646

tomaka opened this issue May 25, 2023 · 0 comments

Comments

@tomaka
Copy link
Collaborator

tomaka commented May 25, 2023

Section 2.6.3.4 mentions:

For newer Runtimes, the Runtime version (Section C.4.1.) can be read directly from the Wasm custom section with the name runtime_version. The content is a SCALE encoded structure as described in Section C.4.1..

However there are actually two sections, one runtime_version for the version with an empty list of APIs, and one section runtime_apis with just the list of APIs (the content of the apis field of the struct in section C.4.1.). This was done so for implementation difficulty reasons.

Additionally, due to accidents, some runtimes have one custom section but not the other. When that is the case, the custom section must be ignored, and the host should fall back to calling Core_version.

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

No branches or pull requests

1 participant