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

[SDK] Decouple pkg/sdk from the poktroll repo #510

Closed
9 tasks
Olshansk opened this issue Apr 29, 2024 · 2 comments
Closed
9 tasks

[SDK] Decouple pkg/sdk from the poktroll repo #510

Olshansk opened this issue Apr 29, 2024 · 2 comments
Assignees
Labels
p0 Top priority sdk Everything relatd to the sdk

Comments

@Olshansk
Copy link
Member

Olshansk commented Apr 29, 2024

Objective

Decouple pkg/sdk to prepare for a full-time owner of the Shannon SDK

Origin Document

Note: not all of these are publically accessible

Goals

  • Prepare Shannon POC SDK to be transferred to a full-time owner
  • Enable any gateway current/future gateway to easily interoperate with Shannon

Deliverables

  • 1. Move pkg/sdk into its own repository called pocket-shannon-go and update poktroll to depend on it
  • 2. Make storage and network statefullness configurable in the new SDK
    • 2.1 If this deems more than a few hours of work, remove it altogether while making sure poktroll still works.
  • 3. Remove as many cosmos dependencies as possible (e.g. depinject) as longs as its straightforward.
    • 3.1 Leave TODO_DECOUPLE if it's non-trivial. Goal 1 is the top priority

Technical notes/considerations for future SDK owners

  • The new SDK should be viewed - conceptually - as a replacement for pocket-go
  • Frameworks like fern can be used to generate SDKs on a per language basis at a cost of $10,800/year/language.
    • Cons: It'll require heavy pocket-specific customizations
    • Pros: We can get other languages (e.g. javascript, python) using the same flow to get replacements for things like pocket-js
    • Potential investigations: We can potentially leverage the open-source tools underlying fern to do this ourselves. See the discussion here.
  • Frameworks like gendocu could be used for automating grpc documentation
  • The modern Cosmos SDK uses gRPC instead of OpenAPI as the source of truth
    • If you search for service across all *.proto files in this repo, they will come pop up and be viewed as the source of truth
    • docs/static/openapi.yml contains a swagger-compatible OpenAPI spec but should not be seen as the source of truth
  • Need to look into why
    gateway-server didn't use pocket-go as they should (theoretically) be using the new SDK

Non-goals / Non-deliverables

  • Anything that's detailed out in the future owner section above

General deliverables

  • Comments: Add/update TODOs and comments alongside the source code so it is easier to follow.
  • Testing: Add new tests (unit and/or E2E) to the test suite.
  • Makefile: Add new targets to the Makefile to make the new functionality easier to use.
  • Documentation: Update architectural or development READMEs; use mermaid diagrams where appropriate.

Creator: @Olshansk
Co-Owners: @red-0ne @moatus

@Olshansk Olshansk added the sdk Everything relatd to the sdk label Apr 29, 2024
@Olshansk Olshansk added this to the Shannon MainNet milestone Apr 29, 2024
@Olshansk Olshansk changed the title [WIP][DRAFT][SDK] Decouple pkg/sdk from the poktroll repo [SDK] Decouple pkg/sdk from the poktroll repo Apr 29, 2024
@Olshansk
Copy link
Member Author

Screenshot 2024-04-30 at 12 55 12 PM

@red-0ne
Copy link
Contributor

red-0ne commented Jun 18, 2024

Close with #554 and #594

@red-0ne red-0ne closed this as completed Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p0 Top priority sdk Everything relatd to the sdk
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants