The main idea behind these changes are to move the in memory trie fully to the disk using a cache layer. That role is played by the TrieChanges class and put into use in DiskTrieService. The main flow that is executed is the same for each of the insert, update, delete operations:
traverse cache
traverse disk if needed
execute the operation
recalculate merkles for traversed nodes in reversed order starting from the result from the execution (newly inserted, deleted, etc)
The main idea behind these changes are to move the in memory trie fully to the disk using a cache layer. That role is played by the
TrieChanges
class and put into use inDiskTrieService
. The main flow that is executed is the same for each of the insert, update, delete operations: