From 6c9a433805894f6a237573b4eebd77101fe81273 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 10 Dec 2018 16:27:45 +0000 Subject: [PATCH] Add example of rejected events getting into state --- proposals/1442-state-resolution.md | 16 ++++++++++++++++ proposals/images/state-res-rejected.png | Bin 0 -> 7596 bytes 2 files changed, 16 insertions(+) create mode 100644 proposals/images/state-res-rejected.png diff --git a/proposals/1442-state-resolution.md b/proposals/1442-state-resolution.md index c908d8d0..3796225d 100644 --- a/proposals/1442-state-resolution.md +++ b/proposals/1442-state-resolution.md @@ -488,6 +488,8 @@ event. # Appendix +## Example 1 + The following is an example room DAG, where time flows down the page. We shall work through resolving the state at both _Message 2_ and _Message 3_. @@ -543,6 +545,20 @@ auth checks, and so the last topic, _Topic 4_, is chosen. This gives the resolved state at _Message 3_ to be _Topic 4_. +## Example 2 + +The following is an example room DAG, where time flows down the page. We assume +event `B` is initially rejected by the server (due to not passing auth against +the state, but does pass auth against its auth chain). + +![state-res-rejected.png](images/state-res-rejected.png) + +At `C` we first resolve the power levels, which results in `A`. When we then go +to resolve the topics against the partially resolved state Bob has ops, and so +the resolved state include the topic change `B`, even though it was initially +rejected. + + ## Notes [^1]: In the current room protocol these are: the create event, power levels, diff --git a/proposals/images/state-res-rejected.png b/proposals/images/state-res-rejected.png new file mode 100644 index 0000000000000000000000000000000000000000..057402d67a28d227948cdd7c31dddfccf9698426 GIT binary patch literal 7596 zcmZ8`2T)T@)HWf6-g`$nD8%HK>X+ziID-n3H+v$k3w=J(3^sGGGc+5!L$ta%hW@}|9XzAPN zU=0gRC;0}>Bb(~$d+O`zxBKfZqckhd!#+1Ttv;#WE|1t(KYtPQo*j+=WByMgrz%-> zX9|rVA|?J9ml1n5`)lq+1Q|g0B)^5#rexz%rjp5qPJ-+{@BrF0f8O;CQNw7zv8uzpx`~zy?JL=k`fCdu{jMLzn)wT4u(Kh-vzvG3ei$>>NDR78~Zu^NKn& z(d2jEp56Pa+Cns#=4*R;{zZA?bf+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