cw-ibc-queries icon indicating copy to clipboard operation
cw-ibc-queries copied to clipboard

Store commit proofs on queried chains

Open JakeHartnell opened this issue 3 years ago • 1 comments

Full credit to @larry0x for this great idea:

(4/5) the contract will do the smart query, and then (here's the important part) it saves the following:

hash(id | contract | msg | query_response)

where | is bytes concat

in its store as a "commit"

(5/5) the relayer will relay the query response back to A, and the proof that the commit exists in B contract's store

this way, A knows the query response, the response value can be proven!

This is a great idea and should be very simple to implement!

JakeHartnell avatar Oct 13 '22 17:10 JakeHartnell

Apparently Quasar has already implemented something similar: https://github.com/quasar-finance/interchain-query-demo

larry0x avatar Oct 13 '22 18:10 larry0x