Skip to content

Commit 9359cdf

Browse files
h5lawOlshansk
andauthored
[RPC][CLI] RPC Specification Parity (Issue #628) (#684)
## 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 ![image](https://user-images.githubusercontent.com/53987565/232327322-953d2f0a-e65f-4a60-bc63-2a88b88b4f75.png) 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]>
1 parent d8fff4c commit 9359cdf

File tree

148 files changed

+5692
-782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+5692
-782
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ generate_rpc_openapi: go_oapi-codegen ## (Re)generates the RPC server and client
321321

322322
.PHONY: swagger-ui
323323
swagger-ui: ## Starts a local Swagger UI instance for the RPC API
324-
echo "Attempting to start Swagger UI at http://localhost:8080\n\n"
324+
echo "Attempting to start Swagger UI at http://localhost:8080"
325325
docker run -p 8080:8080 -e SWAGGER_JSON=/v1/openapi.yaml -v $(shell pwd)/rpc/v1:/v1 swaggerapi/swagger-ui
326326

327327
.PHONY: generate_cli_commands_docs

0 commit comments

Comments
 (0)