-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Tooling] RPC specification parity #628
Comments
@Olshansk ready for review |
@jessicadaugherty Is this link up to date with the V0 spec? https://docs.pokt.network/api-docs/pokt/# I will start getting the V1 spec up to date but its nice to have the readable swagger UI. I will document any areas (if I find any) that cannot be done just yet, when (of if) i get to them |
Hey @h5law! Those may be behind. I'd use this for the most up to date spec https://github.com/pokt-network/pocket-core/blob/staging/doc/specs/rpc-spec.yaml |
|
@Olshansk @jessicadaugherty so this PR includes the CLI endpoints as well 👍🏼 was just gunna ask, am getting through the list now |
Currently it looks like a L/XL. I have split out 2 PRs from the work I have already done for it: the TxResult and TxIndexer one. Both are S. Will work on the RPC savepoints afterwards don't want to make this PR too large ahah |
we love to see it
thanks for the estimates. will break out my bounty abacus. and, as always, let us know if you encounter any issues or have questions along the way! |
Appreciate the update, and totally agree that the scope of this is growing to an XL but +100 to the small PRs. |
@Olshansk So currently the RPC spec and CLI endpoints are these - the only faked one is v1/query/upgrade couldnt find anything that did this so I make a placeholder function in the postgres context (potentially a new param pocket_version this when changed would make it easy to query the height of any protocol upgrades but thats not important right now) The remaining v1/query endpoints are as follows: I dont believe any of these are currently able to be implemented without significant code changes. So the plan was to create functions in the UtilityContext/PostgresContext (Im thinking utility at the moment) that do nothing but let me write the RPC and CLI endpoints. This is the same for the following: Again for these I was thinking utility interface no-op functions However for the following I really don't know where the faked functions should go?
Any feedback is appreciated, if any of these could actually be implemented currently let me know - but I am not sure they can be. 👍 |
Currently ill-defined in v1, so let's skip it for now.
Currently ill-defined in v1, so let's skip it for now.
Can be replaced by /v1/query/validators below.
Look at /v1/query/fisherman
/v1/query/validator
/v1/query/servicer
/v1/query/application It can accept the height and address in the data fields
Look at /v1/query/fishermen
/v1/query/validators
/v1/query/servicers
/v1/query/applications It can accept the height and pagination in the data fields
We can leverage the types and balanced in the pools. GetPoolAmount(address []byte, height int64) (amount string, err error)
GetAllPools(height int64) ([]*coreTypes.Account, error)
Can you create a no-op endpoint for this?
This endpoint is trying to do too much. I don't think we nee dit.
I'm working on the backend for this RIGHT NOW. Can you create a no-op for it?
I'm working on the backend for this RIGHT NOW. Can you create a no-op for it?
Don't think we need this.
We already do this in
Can you create a no-op for it and add links to this in the code comments:
Don't think we need this.
Don't think we need this.
Don't think we need this.
Don't think we need this. |
## Description This PR aims to build out the RPC specification to have parity (not backwards compatability) with the V0 RPC specification. The OpenAPI YAML spec can be viewed [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/pokt-network/pocket/rpc-spec-parity/rpc/v1/openapi.yaml). This compares to the V0 spec which can be viewed [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/pokt-network/pocket-core/staging/doc/specs/rpc-spec.yaml) The CLI endpoints for the `v1/query` endpoints have also been implemented  Not only does this PR build out the specification but it also implements some new functionalities, laid out in the changes section below. Some have already been covered in the PRs #676 and #677 ## Issue Fixes #628 ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [x] Code health or cleanup - [ ] Major breaking change - [x] Documentation - [ ] Other ## List of changes - Add `networkId` and `timestamp` fields to the block - Ability to query the mempool for transactions yet to be commited to a block - Move the `utility/types/errors.go` file to `shared/core/types/errors.go` to be used throughout the codebase - Expose NO-OP functions for future implementation - Add Protobuf files for Sessions, Relays and Challenges for future implementations - Build out a functional RPC server and specification with CLI endpoints ## Testing - [x] `make develop_test`; if any code changes were made - [x] [Docker Compose LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md); if any major functionality was changed or introduced - [ ] [k8s LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md); if any infrastructure or configuration changes were made ## Required Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment)) - [x] I have tested my changes using the available tooling - [x] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s) --------- Co-authored-by: Daniel Olshansky <[email protected]> Co-authored-by: Daniel Olshansky <[email protected]>
Objective
Develop and implement an RPC specification for Pocket Network's v1 protocol with feature parity to the V0 utility RPC specification, ensuring compatibility and seamless integration with the existing system.
Origin Document
The V0 RPC specification can be found in this yaml file:
V0 utility RPC specification
The V1 utility specification can be found here:
V1 Utility Specification
Initial work has been done on the RPC specification when building the CLI MVP and can be reviewed in these PRs:
CLI and RPC MVP pt 1
CLI and RPC MVP pt 2
Goals
Deliverable
Non-goals / Non-deliverables
General issue deliverables
Testing Methodology
make test_all
LocalNet
is still functioning correctly by following the instructions at docs/development/README.mdCreator: @jessicadaugherty
The text was updated successfully, but these errors were encountered: