CosmWasm / docs-old

Documentation for cosmwasm
https://www.cosmwasm.com/
Creative Commons Attribution Share Alike 4.0 International
2 stars 6 forks source link

Document query #20

Closed ethanfrey closed 4 years ago

ethanfrey commented 4 years ago

Add documents to explain how the v0.6 query interface will work, especially covering issues on raw vs. custom queries, and how to handle inter-contract queries without violating the actor model.

This could use some review, not just on the explanation, but the design in general. Is this the proper model? Can we improve this?

This will close https://github.com/confio/cosmwasm/issues/72 and it is good to read up on that discuss as well (after this text) when debating pros and cons of the architecure.

ethanfrey commented 4 years ago

Good questions.

I havent thought too much of non contract modules, but the address section on did was to go the way of providing a unified naming system for both. So the dispatcher could send it either direction. I should specify this more.

Also, raw queries refer to state on the blockchain and can come with proofs. Custom queries process the data so the answer is a transformed version of the proven data. Proving proofs for that is much more complex and out of scope for a long time. Rough idea is to provide merkle proofs for all keys read by the computation and have the client run the same wasm with same input to validate result. Clearly not light weight. For any mid term design, proofs are only raw queires and if you want more, do the processing in the client