-
Notifications
You must be signed in to change notification settings - Fork 2.6k
try-runtime-cli: disk-backed remote-externalities #14076
Comments
That all makes a lot of sense. Gonna think out loud about
although I am sure you know the better experts in this domain, Basti and Emeric.
substrate/client/db/src/lib.rs Line 104 in 8a4746e
Then the question is, do we make a new substrate/primitives/io/src/lib.rs Line 1694 in 842e651
|
After spending some time experimenting with refactoring
There are a lot of convenience methods present in |
Deprioritised for now in favour of lazy-loading which is simpler to implement & provides similar value. |
Moved to paritytech/try-runtime-cli#15 |
Prelude
Discussion in #13562 expanded to include various topics other than lazy-download, including improving general performance and using a disk-backed database.
I am creating this issue to separate the discussion and progress around allowing the try-runtime-cli to accept a DB path for reading state, rather than loading all state into memory.
Motivation
Creating snapshots and loading state into memory is not a significant issue for chains like Polkadot and Kusama, but it can be for heavier-weight chains like Moonbeam with extensive state.
On these heavy chains:
Implementation ideas
TestExternalities
currently has a hardcodedInMemoryBackend
as a generic parameter. However, that could be updated to a more genericsp_state_machine::Backend
.InMemoryBackend
orDiskDbBackend
(which is already implemented in fudge) inTestExternalities
.Mode
toremote-externalities
called something likeDisk
, so we would haveOnline
,Offline
(perhaps rename this toSnap
), andDisk
.live
,snap
, and a new optiondb
when specifying where to get state. If the user choosesdb
, they pass the path, and theTestExternalities
will be initialized with aDiskDbBackend
instead of theInMemoryBackend
.The text was updated successfully, but these errors were encountered: