This code was written in 2015 to estimate append-only proof sizes in Merkle prefix trees, and later used for a research project on append-only authenticated dictionaries (AADs) in 20191.
The idea here was to not dynamically allocate every tree node with left, right and parent pointers.
Instead, for each tree level, we keep a Go map that maps a node's location on that level to its Merkle hash. This drastically reduced the memory consumption.