distributed-compliance-ledger
distributed-compliance-ledger copied to clipboard
State Proofs: Verify proofs by CLI
After migration to the latest cosmos-sdk, the CLI doesn't verify state proofs for queries to store even if they are returned. See https://github.com/cosmos/cosmos-sdk/issues/6563. We need to change it, so that CLI verifies state proofs if they are returned by a query. Consider
- Contribution to https://github.com/cosmos/cosmos-sdk/tree/master/client
- The following needs to be verified for every state proof:
- Merkle Proof (see https://github.com/cosmos/cosmos-sdk/blob/master/store/rootmulti/proof.go)
- State signatures via Tendermint's light client. See https://github.com/tendermint/tendermint/tree/master/light
Please note, that
- Cosmos CLI queries don't return state proofs by default , so this change doesn't make much sense without implementing #183 as well.
- Only single value queries (that is quering items stored in Store directly) will be supported. For example
get-model
will have a state proof returned, whileget-all-models
will not. Multi value proofs support is a separate task: #34.