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

State Proofs: Return proofs in gRPC/REST

Open ashcherbakov opened this issue 3 years ago • 0 comments

Cosmos-sdk doesn't return any state proofs in gRPC/REST queries, see https://github.com/cosmos/cosmos-sdk/issues/7036. As REST is supposed to be one of the main ways for communication with nodes, we need to return them.

Options: O1: Contribute to cosmos-sdk (probably requires communication and check of the design with cosmos maintainers) O2: Explicitly return state proofs as one of the values in every DCL query response

  • just add this parameter to query.proto for every response and every module
  • generate the response appropriately.
  • An example where a similar approach is used: link and link

Please note, that

  • This change doesn't make much sense if clients don't verify the proofs on their side (see #186 or #187)
  • We may decide not to support proofs in gRPC/REST (and hence don't work on this task) if we create a client SDK based on Tendermint RPC which has state proofs out of the box (see #187).
  • 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