diff --git a/state/state-network.md b/state/state-network.md index 410ca85..00b23d8 100644 --- a/state/state-network.md +++ b/state/state-network.md @@ -65,7 +65,18 @@ custom_payload = SSZ.serialize(custom_data) #### POKE Mechanism -The [POKE Mechanism](./portal-wire-protocol#poke-mechanism) MUST be disabled for the state network. As `content_for_retrieval` is different from `content_for_offer` the POKE mechanism cannot offer content that is verifiable. +As `content_for_retrieval` is different from `content_for_offer` the POKE mechanism cannot offer content that is verifiable without providing +the proof/s that are contained in the `content_for_offer` payload. These proofs are usually available when walking down the trie during content +lookups such as during an `eth_getBalance` JSON-RPC call implemented in the state network. + +The [POKE Mechanism](./portal-wire-protocol#poke-mechanism) for the state network requires building a `content_for_offer` by combining the `content_for_retrieval` with the parent proof/s and block hash. This is implemented differently for each +type of content: +- For account trie nodes the trie node in the `content_for_retrieval` is appended to the parent account proof and then combined with the block hash to build the `content_for_offer`. +- For contract trie nodes the trie node in the `content_for_retrieval` is appended to the parent storage proof and then combined with the account proof and block hash to build the `content_for_offer`. +- For contract code the code in the `content_for_retrieval` is combined with the account proof and block hash to build the `content_for_offer`. + +This POKE mechanism as described above SHOULD be executed after looking up content from the network, whenever the proofs and block hash are locally available +to be used to build the `content_for_offer`. ### Routing Table @@ -340,7 +351,7 @@ something like this (numbers next to branches indicate the index in the branch n ``` branch (root) - /0 \1 + /0 \1 prefix: 123 prefix: 234 value: A value: B ```