Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document cross-contract (and ibc) queries #98

Closed
ethanfrey opened this issue Dec 23, 2019 · 4 comments
Closed

Document cross-contract (and ibc) queries #98

ethanfrey opened this issue Dec 23, 2019 · 4 comments
Assignees
Milestone

Comments

@ethanfrey
Copy link
Member

This is left as TODO until 0.7 for open theoretical issues.

Let's think a bit more and finalize the design (so we can update the implementation)

@ethanfrey
Copy link
Member Author

After much thinking, I think the "readonly recent snapshot" is good for both the actor model theory and rust borrowing rules. It will take some changes to the transactional / StorageTransaction workflow, but can be done. This means that no changes that happened in the same tx will be visible in any case. Which can create issues, but must be very clear that it never happens, so we encourage good design patterns.

eg. if a contract queries it's erc20 balance before releasing it, that balance may be off if I had another msg in the same transaction that sent funds here. I would prefer to be explicit here to never require this to work, and leave us the flexibility of the actor model. If this is absolutely needed for some use cases in the future, we can revisit this decision. But it is always easier to provide more accurate data to a contract without breaking things, than provide less accurate data.

We will also add a gas price per call and a max depth (as we have the overhead of many contracts open simultaneously), as well as enforce no call cycles.

@Daimaniman

This comment has been minimized.

@ariessulistio

This comment has been minimized.

@ethanfrey
Copy link
Member Author

Closed (cross-contract queries) by #43
IBC will be covered by #147

brew0722 added a commit to brew0722/cosmwasm-1 that referenced this issue Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants