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

Improve separation of encointer-stuff #35

Open
clangenb opened this issue Jan 24, 2023 · 0 comments
Open

Improve separation of encointer-stuff #35

clangenb opened this issue Jan 24, 2023 · 0 comments

Comments

@clangenb
Copy link
Member

clangenb commented Jan 24, 2023

I think we have can get better in separating encointer stuff from the rest of the code. The current state is that whenever needed, we just added an encointer module there. However, I think the better approach would be to have the encointer stuff all in one place, and in crates instead of in submodules, which can then be imported in the app-libs crates. In some cases, this is absolutely straightforward, for other cases, we need some better separation of code, so the encointer crate do imports without introducing dependency cycles.

Target structure with the current code I see:

  • ./encointer # top level folder (not a crate)
    • stf/ // <- should be straightforward, see Separate trusted calls/getters from rest. #36
      • trusted_call
      • trusted_cetter
    • api-client-extensions // <- should be straighforward
    • cli/ // <- here we first need to extract some utils from the current cli code, so we don't get dependency cycles. Todo: define issue
      • commands
      • trusted-commands

The scheduler STF interface needs some more thinking, in how we can cleanly solve this without having to touch the executor, but it should be doable too. We need to think more generically here so that we can implement in app-libs an: on_update_state function, that the executor will call agnostic to the actual business logic.

@clangenb clangenb changed the title Improve separation from encointer-stuff Improve separation of encointer-stuff Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant