You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Gossamer maintains running instances of all runtimes that were included in the canonical chain. This leads to a build up in memory usage for each runtime upgrade, since the previous instance (and all its associated wasmer/cgo resources) are kept running (see #1973).
So far, all calls need the best block runtime except:
Note each of these runtimes might be the same runtime pointer in most cases.
Keep the best block runtime instantiated
Keep the finalised block runtime instantiated (might be the same pointer as best block)
Keep a mapping from runtime-upgrade block hash <-> runtime location (hash, db key etc.)
When needed, find the ancestor runtime-upgrade block OR finalised block (whichever is found first) for a given block hash, then find the corresponding runtime and instantiate it from disk
Remove mapping block hash <-> runtime pointer
Unanswered questions:
Can an upgrade happen on some but not all of the unfinalised forks? -> Yes
Do we need the runtime substitution feature?
The text was updated successfully, but these errors were encountered:
(EDIT by Quentin on 2023-01-16)
Currently, Gossamer maintains running instances of all runtimes that were included in the canonical chain. This leads to a build up in memory usage for each runtime upgrade, since the previous instance (and all its associated wasmer/cgo resources) are kept running (see #1973).
So far, all calls need the best block runtime except:
dot/core
'shandleBlock
needs the parent block runtimedot/core
'shandleBlock
needs the (upgraded or not) current block runtime to detect if we should substitute itget_Metadata
,get_RuntimeVersion
andpayment_Queryinfo
can get the runtime for any block hash givendot/sync
'shandleBlock
needs the parent block runtimelib/babe
'shandleSlot
needs the slot parent block runtimeChanges to be made:
Runtimes to keep instantiated:
Note each of these runtimes might be the same runtime pointer in most cases.
Unanswered questions:
The text was updated successfully, but these errors were encountered: