distributed-compliance-ledger icon indicating copy to clipboard operation
distributed-compliance-ledger copied to clipboard

State Proofs: Verify proofs by CLI

Open ashcherbakov opened this issue 3 years ago • 0 comments

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, while get-all-models will not. Multi value proofs support is a separate task: #34.

ashcherbakov avatar Jan 17 '22 11:01 ashcherbakov