From c5a2bcb19633544ef6bb71633be473047d376bc9 Mon Sep 17 00:00:00 2001 From: Aumetra Weisman Date: Fri, 24 May 2024 13:24:52 +0200 Subject: [PATCH 1/2] Reword sentence --- src/pages/core/architecture/actor-model.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/core/architecture/actor-model.mdx b/src/pages/core/architecture/actor-model.mdx index 109ef2bd..1862e435 100644 --- a/src/pages/core/architecture/actor-model.mdx +++ b/src/pages/core/architecture/actor-model.mdx @@ -50,8 +50,8 @@ be. 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. +already written everything to the state, meaning the state can't suddenly change +mid-execution and make your contract exhibit buggy behaviour. CosmWasm effectively forces you to follow the [CEI pattern (Checks, Effects, Interactions)](https://fravoll.github.io/solidity-patterns/checks_effects_interactions.html) From 9bb0eb45eb5a4ae5558522ec91edc2dd77656570 Mon Sep 17 00:00:00 2001 From: Aumetra Weisman Date: Fri, 24 May 2024 13:38:52 +0200 Subject: [PATCH 2/2] Reword the analogy --- src/pages/core/architecture/actor-model.mdx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/core/architecture/actor-model.mdx b/src/pages/core/architecture/actor-model.mdx index 1862e435..856243b7 100644 --- a/src/pages/core/architecture/actor-model.mdx +++ b/src/pages/core/architecture/actor-model.mdx @@ -27,9 +27,13 @@ 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 -wants to talk to person B, they write a letter and put it in person B's mailbox. -Person B will read the letter and write a response, putting it in person A's -mailbox. +wants to talk to person B, they write a letter, address to to person B, and send +it off. The mailman (or in this case, the chain) will put the letter in person +B's mailbox. + +Person B will then read the letter and can choose to write a response, address +it to person A with a note indicating that this is a reply, and send it off once +again. No direct interaction is happening here, nobody visits each other's house which would allow them to rummage around in their belongings (state). They simply