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

EPIC: Dev UX #13085

Closed
12 of 18 tasks
tac0turtle opened this issue Aug 29, 2022 · 6 comments
Closed
12 of 18 tasks

EPIC: Dev UX #13085

tac0turtle opened this issue Aug 29, 2022 · 6 comments
Assignees
Labels
T: Dev UX UX for SDK developers (i.e. how to call our code) T:Epic Epics

Comments

@tac0turtle
Copy link
Member

tac0turtle commented Aug 29, 2022

Summary

Much of the cosmos-sdk was written many years ago while it was evolving and growing its user base. In these times its hard to pinpoint the exact API's users may want. It has now been almost 3 years since appmodule interfaces were introduced and we have learned a lot on how to simplify things.

There is ongoing work with the core api and runtime modules in order to handle lots of the wiring. There will be a migration story, but there are users that may want to take longer to migrate instead of all at once. For these users it makes sense to spend a few days cleaning up the old apis to make it more ergonomic. Many of the changes would be minimal and could be done in a backwards way

On top of the APIs of creating modules, there are other areas where users could benefit from some cleanup.

Some ideas are:

  • Client api cleanup and ergonomic fixes
  • this has come up but would need better insight into how this should progress cc @jackzampolin
  • Codegen all cli and grpc for modules to avoid needing to write extra boiler plate
  • Separate internal external logic with a internal package in modules

I'd love to hear from @ValarDragon @ethanfrey @jackzampolin on other things they would like to see. Then we can add it to the tracking list:


Focus list:

As per the interviews with chain devs, the following issues have been created:

Exhaustive list:

  • T: Dev UX UX for SDK developers (i.e. how to call our code)
@tac0turtle tac0turtle added the T: Dev UX UX for SDK developers (i.e. how to call our code) label Aug 29, 2022
@alexanderbez
Copy link
Contributor

Love to see this epic getting started, but it's paramount that we have clearly documented proposals and the motivation for them. We also might want to reference ADR-061 here too.

@robert-zaremba
Copy link
Collaborator

  1. More DevRel persons (they are really needed to grow the dev community 10x and get 2x more contributors and increase 5x the quality -> more users, more devs usually leads to more usability).
    • Cosmos community is growing, but dev support is not, it's at bare minimum if any.
  2. Testability: Improve testing DevX #7362 (this issue is not fully solved). Current pain points:
    • lack of isolation in tests
    • lack of proper isolation in unit tests tests. Many, many tests "marked" as unit are integration tests
    • better mocking patterns for unit tests
    • integration tests have too much "hardcoded" specification, it's almost impossible to customize them. Imagine that an SDK users will change some core parameters (eg fees) -> then all builtin sim tests will fail.
    • Way too much copy paste between the tests. We need well organized test data directory (test fixtures) and reusable test setup.

image

@alexanderbez
Copy link
Contributor

We're literally doing most of this now. The team has been working hard and diligently on improving tests. See the improvements we've made in mocking, dependency isolation, etc...I encourage you to actually spend time looking over the recent testing related PRs the team has worked hard on.

@tomtau
Copy link
Contributor

tomtau commented Sep 9, 2022

A migration to the standard Protobuf JSON encoding is also something worth considering -- see cosmos/cosmos-rust#83 for the context

@tac0turtle
Copy link
Member Author

Carrying on from what Robert mentioned, we should document unit tests and mocks in order to educate users. For integration tests we should create a framework where all that is needed are routers. This would enable modules to write tests without needing to import unneeded modules. For example, if someone is testing bank via integration tests, they shouldn't need to import staking, but only need auth to run integration tests.

Once we have the integration framework it is easy to extend this to a module level benchmark framework that works with a store package to simulate real life scenarios.

To me this is a huge pain point of users, there are many different ways to write test because we don't have a framework for this.

cc @itsdevbear

@julienrbrt julienrbrt moved this from 💪 In Progress to 📝 Todo in Cosmos-SDK Jan 19, 2023
@tac0turtle tac0turtle moved this to 👀 To Do in Cosmos-SDK Nov 16, 2023
@julienrbrt
Copy link
Member

julienrbrt commented Aug 29, 2024

Most of these have been implemented. The rest is documentation related, so I have linked them in a different issue.
Let's use the board as well for Dev UX issue tracking.

@github-project-automation github-project-automation bot moved this from 📋 Backlog to 🥳 Done in Cosmos-SDK Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Dev UX UX for SDK developers (i.e. how to call our code) T:Epic Epics
Projects
Status: 🥳 Done
Development

No branches or pull requests

6 participants