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

[Feature Request]: Version the JSON RPC API #3950

Open
cmwaters opened this issue Nov 19, 2024 · 3 comments
Open

[Feature Request]: Version the JSON RPC API #3950

cmwaters opened this issue Nov 19, 2024 · 3 comments
Labels
external Issues created by non node team members needs:triage

Comments

@cmwaters
Copy link
Contributor

Implementation ideas

This issue proposes adding a versioning system to the JSON RPC API that would allow us to slowly deprecate older API methods (adding is trivial) so as to give users apt time to migrate to the newer API methods. Ideally this introduction itself is done in a backwards compatible change (i.e. no version specified is interpreted as v1).

How versioning is done (in the url vs in the method vs in the params) is left to be decided.

@github-actions github-actions bot added needs:triage external Issues created by non node team members labels Nov 19, 2024
@Wondertan
Copy link
Member

Wondertan commented Nov 19, 2024

The API reports version at node.Info endpoint: https://github.com/celestiaorg/celestia-node/blob/main/nodebuilder%2Fnode%2Fadmin.go#L29-L34

@cmwaters
Copy link
Contributor Author

cmwaters commented Nov 19, 2024

So how would having a v2 while supporting a v1 work?

I think it's common for the client to provide the version that they are currently on and the server tries to match it - that way we can provide some degree of backwards compatibility

@rootulp
Copy link
Contributor

rootulp commented Jan 8, 2025

Notes from call:

  • Once API is stable, the APIVersion returned can stop being the binary's SemVer version and instead be a distinct stable API version.
  • Server can interpret the lack of a client-supplied version in a request as "v0".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Issues created by non node team members needs:triage
Projects
None yet
Development

No branches or pull requests

3 participants