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

Gracefully handle runtime upgrades while connected to a node #509

Closed
jsdw opened this issue Apr 12, 2022 · 0 comments · Fixed by #513
Closed

Gracefully handle runtime upgrades while connected to a node #509

jsdw opened this issue Apr 12, 2022 · 0 comments · Fixed by #513
Milestone

Comments

@jsdw
Copy link
Collaborator

jsdw commented Apr 12, 2022

During a runtime upgrade, things like the spec/runtime version will potentially change. The subxt Client downloads these when it first connects to a node, and after an update they might no longer be valid. This would lead to things like transactions (which rely on these numbers lining up between subxt and node) no longer working. The current workaround would be to create a new Client.

Can/should we subscribe to something like state_subscribeRuntimeVersion when the Client connects to a node, to make sure that any changes to these values (we care about transaction_version and spec_version) are kept in sync?

The metadata might also change; could also spot this and update our stored metadata? With things like the static validation work, this would make sure that a long running client can properly warn about differences (as well as make sure that constants and such as obtained from the metadata are still correct).

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 a pull request may close this issue.

1 participant