Storing the Merkle Tree in a compact way



Summary:

The context discusses a simple idea to compress the Merkle Tree of Utreexo project, which could be useful in saving storage space and traversing issues. The idea involves getting rid of all pointers by using a 2D array with variable row size where each row length is N/2^j. The total storage required is just 2N-1 nodes, and traversing can be done neatly in any direction with the right formula. The formula involves fetching proof[i] through pseudo-code with direction to know + or - and adding the rest through loop. This simple approach of transforming a recursion to an iteration can work for any Merkle Tree. The lecture notes and video link are provided for reference, along with a more detailed explanation on BitcoinTalk forum by Shymaa M Arafat.


Updated on: 2023-06-15T01:50:31.147868+00:00