Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Move light features into their own crate #6036

Closed
gnunicorn opened this issue May 14, 2020 · 2 comments · Fixed by #6235
Closed

Move light features into their own crate #6036

gnunicorn opened this issue May 14, 2020 · 2 comments · Fixed by #6235
Assignees
Labels
I7-refactor Code needs refactoring.

Comments

@gnunicorn
Copy link
Contributor

With moving client into sc-service, we also made the light client features internal to sc-service. While this is fine for now, it means that you can't easily construct the equivalent of a light client without using the sc-service's ServiceBuilder anymore. However, only the new_light function in there is bound to client, everything else should be either in the respective crates (e.g. executor in sc-executor) or at least accessible without the need for sc-service. We should move service/client/light/{executor,backend,blockchain,fetcher} into a new crate sc-light to offer a single simple place to reuse the components.

@gnunicorn gnunicorn added the I7-refactor Code needs refactoring. label May 14, 2020
@gnunicorn gnunicorn changed the title Move light-client features into their own crate Move light features into their own crate May 14, 2020
@bkchr
Copy link
Member

bkchr commented May 14, 2020

I don't understand this issue? Can you not say the same about the full node executor, backend etc code?

@seunlanlege seunlanlege self-assigned this May 15, 2020
@gnunicorn
Copy link
Contributor Author

Node executor, backend all other components to build a full client are indeed available outside of service, but the same isn't true for the same components if you were to build a non-service-driven light-client. And doing that (in particular to only observe grandpa finality) is what some people are doing apparently. We were not aware of this pattern before moving the light-modules into sc-service, but now they can't access them and do their super-thin-light-client anymore. The goal of this issue to expose those components again, and make them available without having to pull in the entire sc-service – same as you can pull in all components of a full-client without sc-service.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I7-refactor Code needs refactoring.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants