Does this ambiguity regarding the depth of the leaf in the tree not introduce similar weaknesses as the original Merkle tree construction?
Not quite sure which weakness you’re referring to here. Is it CVE-2012-2459 (one from calculating the Bitcoin block header commitment)? Since we don’t duplicate hashes, it’s not vulnerable to that particular attack.
Why would we float up leaf-hashes rather than create a tagged hash at each level?
Since we float up the leaf hashes, we can save on the proofs being sent over for the sibling later on.
On a tree like so, proof for 01
is 00
, 09
, 13
.
014
1|---------------\
212 13
3|-------\ |-------\
408 09 10 11
5|---\ |---\ |---\ |---\
600 01 02 03 04 05 06 07
If we delete 00
, then 01
moves up to 08
. The proof for 01
is now 09
and 13
. The proof got shorter.
014
1|---------------\
212 13
3|-------\ |-------\
401 09 10 11
5|---\ |---\ |---\ |---\
6 02 03 04 05 06 07