-
Notifications
You must be signed in to change notification settings - Fork 943
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]: OpenRPC integration into Celestia Node #873
Comments
Linking #169 here |
The way https://github.com/filecoin-project/lotus does OpenRPC things:
|
It seems like the tooling around OpenAPI/Swagger is much more mature than OpenRPC and clearly has much more adoption, can you please give your perspective on why you prefer it @Wondertan? |
Ok so the more I read on OpenRPC the more I can understand it, BUT I still have some thoughts and concerns:
some questions we need to be asking:
Relevant: |
This is because they separate their apis by namespace. Can you clarify what you mean here? This doesn't look bad: Here are the namespaces. We don't need to do this |
Grooming 20/09: Let's async do a deep dive for this and later on have a call to finalise our decision |
And finally ethereum/consensus-specs#1012 (comment) |
Thoughts from Geth devs are indeed very helpful, and they push us to ask what are the primary use cases for our RPC/API. Based on this, we could easily answer whether we should use RPC(it doesn't matter which one yet) or REST. For the use case, I would mention these:
We should also list out what our RPC is not supposed to be:
Now, let's look at what Geth devs mentioned:
They specifically state that RPC(it doesn't matter which kind yet) is suitable and works well(even better than REST) for 1:1 interactions but is horrible and was a mistake for public API where caching, horizontal scaling, and many clients are needed. Which I would argue is not the requirement for Node's Public API. The Public API is about trusted 1:1 interactions between different processes/applications building on top of us - e.g., Optimint, which RPC(Remote Procedure Call) is a better fit for. If and once we align on the above, we can proceed to a discussion about which RPC to use, but for now, we have to understand why RPC is in the first place. |
Structure of call
NotesDecision |
We decided to go with OpenAPI in the first iteration |
Implementation ideas
With the Node API having more and more features and endpoints added, it might be worth to use OpenRPC to spin up a self-documenting API endpoint with a playground included whenever there's a new Node release.
https://playground.open-rpc.org/
This can allows us to brand our API more with it's own website and playground we can deploy and link developers to from our documentation page.
The text was updated successfully, but these errors were encountered: