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

rpc: decide on versioning #1345

Closed
Tracked by #1474
distractedm1nd opened this issue Nov 10, 2022 · 6 comments · Fixed by #1901
Closed
Tracked by #1474

rpc: decide on versioning #1345

distractedm1nd opened this issue Nov 10, 2022 · 6 comments · Fixed by #1901
Labels

Comments

@distractedm1nd
Copy link
Collaborator

distractedm1nd commented Nov 10, 2022

We need to make a decision on how we want to version our RPC. In the future we could provide multiple versions at multiple endpoints. At the very least, it will be a failsafe for someone accidentally trying to use an old version of our api

We can then provide the first RPC at /v1 for example

Also: return it as part of node.Info

@renaynay
Copy link
Member

renaynay commented Mar 9, 2023

We can add standard versioning to the gateway starting at v1 but for json rpc, I propose just versioning it via an endpoint that can be provided on the NodeModule since that's where all admin-related info lives. In Lotus, they just have an endpoint on the common API that returns the version as an encoded uint32. I feel like it's overkill and we can just return a string :)

@Wondertan
Copy link
Member

String is fine to me, although I would ask them why the made it as uint32

@renaynay
Copy link
Member

renaynay commented Mar 9, 2023

Alternatively, we could explore something related to the discussion here. But IMO this is a later consideration and something we should think about from a devX perspective (probably loop in @YazzyYaz)

@renaynay
Copy link
Member

renaynay commented Mar 9, 2023

As another alternative, we could think about versioning the namespaces under which our modules are registered, but I think that's hairy.

@Wondertan
Copy link
Member

As another alternative, we could think about versioning the namespaces under which our modules are registered, but I think that's hairy.

This is the correct approach IMO. Wouldn't say it's hairy but it adds some overhead for sure.

@renaynay
Copy link
Member

renaynay commented Mar 13, 2023

Screenshot 2023-03-13 at 09 37 04

🤷🏻

I think we can just use a string until further notice.

renaynay added a commit that referenced this issue Mar 23, 2023
Introduce a version string to the API

Resolves #1345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants