This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Exclude runtime code from (at least wasm) light client bundle #5123
Labels
I8-footprint
An enhancement to provide a smaller (system load, memory, network or disk) footprint.
Milestone
Original problem description by @amaurymartiny: "the wasm light client has not 1 but 2 runtimes bundled in it: one in wasm and one in native (which is also wasm in our case)"
So the idea we have is to exclude both runtimes from (at least wasm) light client compilation. We have agreed that runtime code should still be included as storage entry in ChainSpec/GenesisConfig (we still need genesis runtime code for consensus modules initialization).
The main problem is that we need something similar to
RuntimeApi
, in order to compileClient
(and its own clients - RPCs, consensus modules, ...). AndRuntimeApi
is provided by runtime, which we want to exclude from compilation. The simplest option is to generate that struct at the native node side, but then we need to sync apis that are implemented every time we add/remove something from runtime, which is unacceptable The other solution could be 3rd compilation mode for runtime (in addition to wasm and native) - light-native, which will only exposeRuntimeApi
implementation (that is something I've originally suggested in #3875 ).The text was updated successfully, but these errors were encountered: