Block execution research
Dedicate time to researching how to approach improving the existing block execution.
-
[ ] LocalStorage must be fork-aware, which ours is not. Aside from extracting this dependency, we must consider where the use site is going to be regarding fork awareness. Gossamer solves this by instantiating a as a new in-memory DB, but I'm not sure when / how those get persisted if at all. Not that high priority for now as it's not been a blocker.
-
[ ] Take time go properly handle
per-nodestate-version... or at least streamline hanging hardcodedStateVersions into parameters. [Murad] -
[ ] Migrate trie from in-memory to on-disk. [Yordan to research & work on + support from David & Murad]
-
[ ] After executing a block, the
BlockTrieAccessorsimply dumps all the trie nodes in the database (i.e. to even retrieve it from the DB later, we must at least know the root hash... to identify the trie) and the information about what root we've managed to calculate is lost (i.e. we have no link saying "this is the root hash for this block"). Has to do rather with theBlockStateand block finalisation / handling of forks; BUT I've stumbled upon this being an issue whilst trying to write the assertion for thekusamaFirstBlocktest case...: after we've executed the block, we can't actually "see what the result of the execution was", i.e. "which is the hash that had been calculated"... so my temporary workaround is to simply recalculate it again from the last state of the in-memory trie... which is not that cool. 😄 [David & Murad to sync]
Closing this Epic task, as all other sub-tasks were completed.