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
If I request a getHexProof() for a leaf I am unable to later verify the proof. The other two proof forms seem to work.
Here is an example showing the use of getProof(), getHexProof(), and getPositionalHexProof()
Since it does not contain the positional info needed to verify I am not sure why the output of getPositionalHexProof() is not what getHexProof() returns.
If this is for some reason intentional it really needs to be documented as to why. Otherwise this is a footgun.
I now also see a closed issue that you closed as 'expected behavior'. If this is in fact the desired behavior can you please take this bug as a need to fully document this behavior somewhere?
If I request a
getHexProof()
for a leaf I am unable to later verify the proof. The other two proof forms seem to work.Here is an example showing the use of
getProof()
,getHexProof()
, andgetPositionalHexProof()
Since it does not contain the positional info needed to verify I am not sure why the output of
getPositionalHexProof()
is not whatgetHexProof()
returns.If this is for some reason intentional it really needs to be documented as to why. Otherwise this is a footgun.
Update : After reviewing the tests it seems you can get it to work, but only if you create the tree with
{ sortPairs: true }
https://github.com/miguelmota/merkletreejs/blob/21ce84a950c9a3a53bcd1360ea0b80004d099268/test/MerkleTree.test.js#L134
This behavior is not documented in the README, or in the function signature:
https://github.com/miguelmota/merkletreejs/blob/master/src/MerkleTree.ts#L535
I now also see a closed issue that you closed as 'expected behavior'. If this is in fact the desired behavior can you please take this bug as a need to fully document this behavior somewhere?
#27
Thanks
The text was updated successfully, but these errors were encountered: