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

Have net_version also return the paratime version #313

Open
nhynes opened this issue Aug 23, 2022 · 2 comments
Open

Have net_version also return the paratime version #313

nhynes opened this issue Aug 23, 2022 · 2 comments
Assignees

Comments

@nhynes
Copy link
Contributor

nhynes commented Aug 23, 2022

It's good for debugging

@nhynes nhynes self-assigned this Aug 23, 2022
@CedarMist
Copy link
Member

The paratime or other component versions (e.g. keymanager, oasis-core etc) can't be returned in net_version as it could break clients who are expecting a consistent integer network id across multiple software upgrades.

oasis-web3-gateway makes no distinction between chain ID & network ID.

Currently net_version returns chain ID, as is required & documented:

And eth_chainId works as is required & documented:

A better candidate would be web3_clientVersion ?

Or a custom oasis_paratime API call, which returns the paratime & platform version infos? Then could return a dictionary with necessary info.

Or could use a response header, X-Oasis-Paratime: Sapphire/0.5.2 ?

@nhynes
Copy link
Contributor Author

nhynes commented Jun 21, 2023

Great analysis and suggestions. For context, the debugging scenario mentioned in the issue description happens after a runtime upgrade and gateways may straggle. The version does not necessarily need to be visible to the client, and in an ideal world, not even the developer–the gateways should just upgrade. I have also not missed not having this feature since the time the issue was created, so my current assumptions may be skewed.

In context, an X-Oasis-Runtime header is useful since the deployment on the ground usually has just one straggler gateway behind a load balancer, which wouldn't be obvious just from oasis_getRuntime. This form is also visible to web3 clients with fetch as a bonus.

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

2 participants