therealyingtong/zip-flyclient

bagging the peaks

Opened this issue · 0 comments

Just a small suggestion (having implemented an MMR in a couple languages). Change the algorithm for "bagging the peaks" to instead be simply the hash of the concatenation of all peaks

This allows you to refer to nodes by a definite and unchanging position index, whereas the nodes created during your current bagging process have to be recomputed from scratch every time you add a leaf anyway.

zmitton/merkle-mountain-range#1 (comment)