You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The get_merkle_proof function in utils/merkle_minimal.py returns too many values when tree_len is not explicitly set.
One might think the last value is the root but that's not the case. It's the root being mixed together with the zero_hash value of the respective layer.
Specifying the tree_len at len(tree) -1 circumvents it.
Not sure if there are edge cases to consider but having len(tree) -1 fixes it.
The get_merkle_proof function in utils/merkle_minimal.py returns too many values when tree_len is not explicitly set.
One might think the last value is the root but that's not the case. It's the root being mixed together with the zero_hash value of the respective layer.
Specifying the tree_len at len(tree) -1 circumvents it.
Not sure if there are edge cases to consider but having len(tree) -1 fixes it.
Sample Code:
The expected result would be len(proof) = 32 (not including the root).
The text was updated successfully, but these errors were encountered: