distributed-compliance-ledger
distributed-compliance-ledger copied to clipboard
State Proofs: Return proofs in gRPC/REST
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, whileget-all-models
will not. Multi value proofs support is a separate task: #34.