-
Notifications
You must be signed in to change notification settings - Fork 4
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
Basic actor model docs #24
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Co-authored-by: Tomasz Kurcz <360248+uint@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks very good! Treat my comments as suggestions, nothing more. (I may have messed up submitting the comments together with the approval.)
means a contract can only interact with the outside world via messages and only | ||
manipulate its own state. | ||
|
||
Picture two people living in two houses, each house has a mailbox. If person A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been a while since I've used snail mail, but, I believe I would put the letter in my own mailbox, then the postal service picks it up to put it in the other person's.
Kinda a nit, since the point is more about addresses and messages than delivery - but when adding messages in contracts, we don't actually add the message directly to the other contract either - we add it to our Response object, and then it's picked up and delivered to the destination, so I think it would fit better overall to describe it this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dang, okay, I hit the merge button a little too quickly. Yeah, good point, I'll have a look over the wording again and make a separate PR for that.
But how does that fix reentrancy? In CosmWasm, you can only send out messages at | ||
the end of a contract execution as part of the response. This ensures you have | ||
already written everything to the state, meaning your state is in a consistent | ||
state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"meaning your state is in a consistent state" is clever, but, could be confusing... maybe something like "meaning your state cannot be changed under your feet mid-execution", or something like that, e.g. explicitly point out the problem it's solving?
No description provided.