Fruzhin icon indicating copy to clipboard operation
Fruzhin copied to clipboard

Block execution research

Open vikinatora opened this issue 1 year ago • 1 comments

Dedicate time to researching how to approach improving the existing block execution.

vikinatora avatar Apr 29 '24 10:04 vikinatora

  • [ ] 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-node state-version... or at least streamline hanging hardcoded StateVersions 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 BlockTrieAccessor simply 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 the BlockState and block finalisation / handling of forks; BUT I've stumbled upon this being an issue whilst trying to write the assertion for the kusamaFirstBlock test 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]

David-Petrov avatar May 14 '24 09:05 David-Petrov

Closing this Epic task, as all other sub-tasks were completed.

nistanimirov avatar Aug 07 '24 10:08 nistanimirov