This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
MMR: scope storing full subtrees in offchain db #13000
Labels
I9-optimisation
An enhancement to provide better overall performance in terms of time-to-completion for a task.
Derived from: #12864
Now we are saving each MMR node by their position in the MMR. Another option would be to save each subtree by the block that introduced it (this would save multiple nodes at once). For example
For the tree:
we are now saving the data for each node at the following keys:
The other option would be to save:
This could have a couple of advantages:
However, I'm not sure this would be compatible with MMBs. It might sense to look at this optimization after switching to MMBs.
PoC: https://github.com/serban300/substrate/tree/mmr_subtree
The text was updated successfully, but these errors were encountered: