Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

merle ProofOperators can't prove a key that is not exist in the tree #59

Closed
unclezoro opened this issue Mar 14, 2019 · 1 comment
Closed

Comments

@unclezoro
Copy link
Collaborator

I try to query an un exist object, but get unexpected response:

 ./tbnbcli account tbnb1z74n7d7h4y5m570dnrh9n9jwhuw7jmdvdv7gny  --node http://data-seed-qa-0-s3.fdgahl.cn:80   --chain-id   Binance-Chain-Nile
ERROR: failed to prove merkle proof: invalid proof

in my opinion, ProofOperators can not only prove an object exactly exist but can prove an object do not exist.

I don't know the key code is(maybe iavl), before I make more clean about this, put an issue in Tendermint

@unclezoro unclezoro self-assigned this Mar 14, 2019
@abelliumnt
Copy link
Contributor

As we know, merkle proof can be divided into two category: existence proof and absence proof. So when we try to verify merkle proof firstly we should judge the proof type.
We can cherry pick from this PR: cosmos/cosmos-sdk#3449

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants