Open RomarQ opened 1 month ago
sc_service::client
I do not see a point to only expose this type whentest-helpers
feature is enabled
This feature should not exist at all...
Could you give some more details on how you implemented this? I mean why do you need to expose these types at all? I would say that you only need to write some Backend
that fetches the values on demand (for sure it would not be async and whatever, but we don't support this any way right now).
sc_service::client
I do not see a point to only expose this type whentest-helpers
feature is enabledThis feature should not exist at all...
Could you give some more details on how you implemented this? I mean why do you need to expose these types at all? I would say that you only need to write some
Backend
that fetches the values on demand (for sure it would not be async and whatever, but we don't support this any way right now).
We had to change the CallExecutor
because of some validation in contextual_call
, but there was no way to pass it to a Client
instance without the use of test-helpers
feature.
` because of some validation in
contextual_call`
Which validation? Could you be more specific?
Description
At moonbeam we have worked on a
lazy-loading
feature which is a client mode that forks a live parachain and fetches its state on-demand, we have been able to do this by duplicating some code fromsc_service::client
. The objective of this PR is to simplify the implementation by making public some types in polkadot-sdk.sc_service::client
I do not see a point to only expose this type whentest-helpers
feature is enabledsc_service::client::WasmOverride
sc_service::client::WasmSubstitutes
sc_service::client::CodeProvider
Required after https://github.com/paritytech/polkadot-sdk/pull/4618In my opinion the advantages of making these types public is greater than keeping them as internals, since it gives more flexibility to devs when building their parachain clients.
Integration
Not applicable, the PR just makes some types public.
Review Notes
The changes included in this PR give more flexibility for client developers by exposing important types.