Currently, each node holds a uint64 for the regCount and a uint16 for a maxDepth. The first one captures the number of registers s and the second one captures the maximum depth under that subtree. the maxDepth can be replaced with an update level metric that captures the maximum depth that was reached during the update without the nodes keeping the information about the maxDepth.
by removing that value from the intermediate nodes we can save a good amount of memory