-
Notifications
You must be signed in to change notification settings - Fork 680
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
Reconsider the way runtime version checks are performed on node side #3756
Comments
I'd like to propose option #3 which aims at moving all of the logic related to runtime api versioning in Implement the logic of detecting runtime versions changes in the
This has the downside of always spawning the runtime to get events at each block, not sure there is a way to avoid that. |
Maybe there is no need to look for the |
Looking for The rest is more or less the same at the moment - there is a runtime call
Another thing we can do is to generate event with the runtime version - once on startup and once on each new version. This way the subsystem won't need to query the runtime and will know which version is available. There is a BUT though - this is true for the latest block. The runtime might need to make a query at an older block where the runtime might be different. Then each subsystem will need to track versions by itself and we'll add unnecessary complexity. |
Indeed, my 3 doesn't really solve much. I'd lean more towards 1 since 2 might be more complicated to implement and maintain over time. |
Follow up from a discussion with @alindima in #3580 (comment)
At the moment new runtime apis are handled on the node side by calling
has_required_runtime
which queries the runtime version. Usually this call is followed by another runtime call (being either a 'new runtime call' or a 'fallback runtime call').This leads to duplicated version checks - once in
has_required_runtime
and once in the runtime call itself (check the discussion in the linked PR for details and example).There are two possible solutions:
The text was updated successfully, but these errors were encountered: