rename .dot files, remove obsolete ones

This commit is contained in:
Brian Warner 2017-02-15 12:19:39 -08:00
parent 40e0d6b663
commit c9f3abe703
10 changed files with 123 additions and 259 deletions

41
docs/code.dot Normal file
View File

@ -0,0 +1,41 @@
digraph {
WCM_start [label="Wormhole Code\nMachine" style="dotted"]
WCM_start -> WCM_S_unknown [style="invis"]
WCM_S_unknown [label="unknown"]
WCM_S_unknown -> WCM_P_set_code [label="set"]
WCM_P_set_code [shape="box" label="WM_set_code()"]
WCM_P_set_code -> WCM_S_known
WCM_S_known [label="known" color="green"]
WCM_S_unknown -> WCM_P_list_nameplates [label="input"]
WCM_S_typing_nameplate [label="typing\nnameplate"]
WCM_S_typing_nameplate -> WCM_P_nameplate_completion [label="<tab>"]
WCM_P_nameplate_completion [shape="box" label="completion?"]
WCM_P_nameplate_completion -> WCM_P_list_nameplates
WCM_P_list_nameplates [shape="box" label="NLM_update_nameplates()"]
WCM_P_list_nameplates -> WCM_S_typing_nameplate
WCM_S_typing_nameplate -> WCM_P_got_nameplates [label="C_rx_nameplates()"]
WCM_P_got_nameplates [shape="box" label="stash nameplates\nfor completion"]
WCM_P_got_nameplates -> WCM_S_typing_nameplate
WCM_S_typing_nameplate -> WCM_P_finish_nameplate [label="finished\nnameplate"]
WCM_P_finish_nameplate [shape="box" label="lookup wordlist\nfor completion"]
WCM_P_finish_nameplate -> WCM_S_typing_code
WCM_S_typing_code [label="typing\ncode"]
WCM_S_typing_code -> WCM_P_code_completion [label="<tab>"]
WCM_P_code_completion [shape="box" label="completion"]
WCM_P_code_completion -> WCM_S_typing_code
WCM_S_typing_code -> WCM_P_set_code [label="finished\ncode"]
WCM_S_unknown -> WCM_P_allocate [label="allocate"]
WCM_P_allocate [shape="box" label="C_allocate_nameplate()"]
WCM_P_allocate -> WCM_S_allocate_waiting
WCM_S_allocate_waiting [label="waiting"]
WCM_S_allocate_waiting -> WCM_P_allocate_generate [label="WCM_rx_allocation()"]
WCM_P_allocate_generate [shape="box" label="generate\nrandom code"]
WCM_P_allocate_generate -> WCM_P_set_code
}

View File

@ -1,124 +1,4 @@
digraph {
/* could shave a RTT by committing to the nameplate early, before
finishing the rest of the code input. While the user is still
typing/completing the code, we claim the nameplate, open the mailbox,
and retrieve the peer's PAKE message. Then as soon as the user
finishes entering the code, we build our own PAKE message, send PAKE,
compute the key, send VERSION. Starting from the Return, this saves
two round trips. OTOH it adds consequences to hitting Tab. */
WM_start [label="Wormhole\nMachine" style="dotted"]
WM_start -> WM_S_nothing [style="invis"]
WM_S_nothing [label="know\nnothing"]
WM_S_nothing -> WM_P_queue1 [label="API_send" style="dotted"]
WM_P_queue1 [shape="box" style="dotted" label="queue\noutbound msg"]
WM_P_queue1 -> WM_S_nothing [style="dotted"]
WM_S_nothing -> WM_P_build_pake [label="WM_set_code()"]
WM_P_build_pake [shape="box" label="build_pake()"]
WM_P_build_pake -> WM_S_save_pake
WM_S_save_pake [label="checkpoint"]
WM_S_save_pake -> WM_P_post_pake [label="saved"]
WM_P_post_pake [label="M_set_nameplate()\nM_send(pake)" shape="box"]
WM_P_post_pake -> WM_S_know_code
WM_S_know_code [label="know code\n"]
WM_S_know_code -> WM_P_queue2 [label="API_send" style="dotted"]
WM_P_queue2 [shape="box" style="dotted" label="queue\noutbound msg"]
WM_P_queue2 -> WM_S_know_code [style="dotted"]
WM_S_know_code -> WM_P_compute_key [label="WM_rx_pake"]
WM_S_know_code -> WM_P_mood_lonely [label="close"]
WM_P_compute_key [label="compute_key()" shape="box"]
WM_P_compute_key -> WM_P_save_key [label="pake ok"]
WM_P_save_key [label="checkpoint"]
WM_P_save_key -> WM_P_post_version [label="saved"]
WM_P_compute_key -> WM_P_mood_scary [label="pake bad"]
WM_P_mood_scary [shape="box" label="M_close()\nmood=scary"]
WM_P_mood_scary -> WM_P_notify_failure
WM_P_notify_failure [shape="box" label="notify_failure()" color="red"]
WM_P_notify_failure -> WM_S_closed
WM_P_post_version [label="M_send(version)\nnotify_verifier()" shape="box"]
WM_P_post_version -> WM_S_know_key
WM_S_know_key [label="know_key\nunverified" color="orange"]
WM_S_know_key -> WM_P_queue3 [label="API_send" style="dotted"]
WM_P_queue3 [shape="box" style="dotted" label="queue\noutbound msg"]
WM_P_queue3 -> WM_S_know_key [style="dotted"]
WM_S_know_key -> WM_P_verify [label="WM_rx_msg()"] /* version or phase */
WM_S_know_key -> WM_P_mood_lonely [label="close"] /* more like impatient */
WM_P_verify [label="verify(msg)" shape="box"]
WM_P_verify -> WM_P_accept_msg [label="verify good"]
WM_P_verify -> WM_P_mood_scary [label="verify bad"]
WM_P_accept_msg [label="deliver\ninbound\nmsg()" shape="box"]
WM_P_accept_msg -> WM_P_send_queued
WM_P_send_queued [shape="box" label="M_send()\nqueued"]
WM_P_send_queued -> WM_S_verified_key
WM_S_verified_key [color="green"]
WM_S_verified_key -> WM_P_verify [label="WM_rx_msg()"] /* probably phase */
WM_S_verified_key -> WM_P_mood_happy [label="close"]
WM_S_verified_key -> WM_P_send [label="API_send"]
WM_P_mood_happy [shape="box" label="M_close()\nmood=happy"]
WM_P_mood_happy -> WM_S_closed
WM_P_mood_lonely [shape="box" label="M_close()\nmood=lonely"]
WM_P_mood_lonely -> WM_S_closed
WM_P_send [shape="box" label="M_send(msg)"]
WM_P_send -> WM_S_verified_key
WM_S_closed [label="closed"]
WCM_start [label="Wormhole Code\nMachine" style="dotted"]
WCM_start -> WCM_S_unknown [style="invis"]
WCM_S_unknown [label="unknown"]
WCM_S_unknown -> WCM_P_set_code [label="set"]
WCM_P_set_code [shape="box" label="WM_set_code()"]
WCM_P_set_code -> WCM_S_known
WCM_S_known [label="known" color="green"]
WCM_S_unknown -> WCM_P_list_nameplates [label="input"]
WCM_S_typing_nameplate [label="typing\nnameplate"]
WCM_S_typing_nameplate -> WCM_P_nameplate_completion [label="<tab>"]
WCM_P_nameplate_completion [shape="box" label="completion?"]
WCM_P_nameplate_completion -> WCM_P_list_nameplates
WCM_P_list_nameplates [shape="box" label="NLM_update_nameplates()"]
WCM_P_list_nameplates -> WCM_S_typing_nameplate
WCM_S_typing_nameplate -> WCM_P_got_nameplates [label="C_rx_nameplates()"]
WCM_P_got_nameplates [shape="box" label="stash nameplates\nfor completion"]
WCM_P_got_nameplates -> WCM_S_typing_nameplate
WCM_S_typing_nameplate -> WCM_P_finish_nameplate [label="finished\nnameplate"]
WCM_P_finish_nameplate [shape="box" label="lookup wordlist\nfor completion"]
WCM_P_finish_nameplate -> WCM_S_typing_code
WCM_S_typing_code [label="typing\ncode"]
WCM_S_typing_code -> WCM_P_code_completion [label="<tab>"]
WCM_P_code_completion [shape="box" label="completion"]
WCM_P_code_completion -> WCM_S_typing_code
WCM_S_typing_code -> WCM_P_set_code [label="finished\ncode"]
WCM_S_unknown -> WCM_P_allocate [label="allocate"]
WCM_P_allocate [shape="box" label="C_allocate_nameplate()"]
WCM_P_allocate -> WCM_S_allocate_waiting
WCM_S_allocate_waiting [label="waiting"]
WCM_S_allocate_waiting -> WCM_P_allocate_generate [label="WCM_rx_allocation()"]
WCM_P_allocate_generate [shape="box" label="generate\nrandom code"]
WCM_P_allocate_generate -> WCM_P_set_code
/*
NM_start [label="Nameplate\nMachine" style="dotted"]
@ -203,11 +83,4 @@ digraph {
P2_P_send_pakev2 -> P2_P_process_v2 [label="rx pake_v2"]
P2_P_process_v2 [shape="box" label="process v2"]
*/
WCM_S_known -> O_WM [style="invis"]
O_WM [label="Wormhole\nMachine" style="dotted"]
O_WM -> O_MM [style="dotted"]
O_MM [label="Mailbox\nMachine" style="dotted"]
O_MM -> O_CM [style="dotted"]
O_CM [label="Connection\nMachine" style="dotted"]
}

View File

@ -1,80 +0,0 @@
digraph {
/* new idea */
M_title [label="Message\nMachine" style="dotted"]
M_S1 [label="S1:\nknow nothing" color="orange"]
M_S1 -> M_P2_claim [label="M_set_nameplate()" color="orange" fontcolor="orange"]
M_S2 [label="S2:\nmaybe claimed" color="orange"]
/*M_S2 -> M_SrB [label="M_close()" style="dashed"]
M_SrB [label="SrB" style="dashed"]*/
M_P2_claim [shape="box" label="qtx claim" color="orange"]
M_P2_claim -> M_S2 [color="orange"]
M_S2 -> M_P2_queue [label="M_send(msg)" style="dotted"]
M_P2_queue [shape="box" label="queue" style="dotted"]
M_P2_queue -> M_S2 [style="dotted"]
M_S2 -> M_P_open [label="rx claimed" color="orange" fontcolor="orange"]
M_P_open [shape="box" label="store mailbox\nqtx open\nqtx add(queued)" color="orange"]
M_P_open -> M_S3 [color="orange"]
M_S3 [label="S3:\nclaimed\nmaybe open" color="orange"]
M_S3 -> M_S3 [label="rx claimed"]
M_S3 -> M_P3_send [label="M_send(msg)"]
M_P3_send [shape="box" label="queue\nqtx add(msg)"]
M_P3_send -> M_S3
M_S3 -> M_P3_process_ours [label="rx message(side=me)"]
M_P3_process_ours [shape="box" label="dequeue"]
M_P3_process_ours -> M_S3
M_S3 -> M_P3_process_theirs1 [label="rx message(side!=me)" color="orange" fontcolor="orange"]
M_P3_process_theirs1 [shape="box" label="qtx release" color="orange"]
M_P3_process_theirs1 -> M_P3_process_theirs2 [color="orange"]
M_P3_process_theirs2 [shape="octagon" label="process message" color="orange"]
/* pay attention to the race here: this process_message() will
deliver msg_pake to the WormholeMachine, which will compute_key() and
M_send(version), and we're in between M_S2A (where M_send gets
queued) and M_S3A (where M_send gets sent and queued), and we're no
longer passing through the M_P3_open phase (which drains the queue).
So there's a real possibility of the outbound msg_version getting
dropped on the floor, or put in a queue but never delivered. */
M_P3_process_theirs2 -> M_S4 [color="orange"]
/*{rank=same; M_S4A M_P4_release M_S4 M_P4_process M_P4_send M_P4_queue}*/
M_S4 [label="S4:\nmaybe released\nmaybe open" color="orange"]
M_S4 -> M_P4_send [label="M_send(msg)"]
M_P4_send [shape="box" label="queue\nqtx add(msg)"]
M_P4_send -> M_S4
M_S4 -> M_P4_process [label="rx message"]
M_P4_process [shape="octagon" label="process message"]
M_P4_process -> M_S4
M_S4 -> M_S5 [label="rx released" color="orange" fontcolor="orange"]
seed [label="from Seed?"]
seed -> M_S5
M_S5 [label="S5:\nreleased\nmaybe open" color="green"]
M_S5 -> M_process [label="rx message" color="green" fontcolor="green"]
M_process [shape="octagon" label="process message" color="green"]
M_process -> M_S5 [color="green"]
M_S5 -> M_P5_send [label="M_send(msg)" color="green" fontcolor="green"]
M_P5_send [shape="box" label="queue\nqtx add(msg)" color="green"]
M_P5_send -> M_S5 [color="green"]
/*M_S5 -> M_CcB_P_close [label="M_close()" style="dashed" color="orange" fontcolor="orange"]
M_CcB_P_close [label="qtx close" style="dashed" color="orange"] */
M_process [shape="octagon" label="process message"]
M_process_me [shape="box" label="dequeue"]
M_process -> M_process_me [label="side == me"]
M_process_them [shape="box" label="" style="dotted"]
M_process -> M_process_them [label="side != me"]
M_process_them -> M_process_pake [label="phase == pake"]
M_process_pake [shape="box" label="WM_rx_pake()"]
M_process_them -> M_process_other [label="phase in (version,numbered)"]
M_process_other [shape="box" label="WM_rx_msg()"]
}

View File

@ -1,52 +0,0 @@
digraph {
/* M_close pathways */
MC_title [label="Mailbox\nClose\nMachine" style="dotted"]
MC_title -> MC_S2 [style="invis"]
/* All dashed states are from the main Mailbox Machine diagram, and
all dashed lines indicate M_close() pathways in from those states.
Within this graph, all M_close() events leave the state unchanged. */
MC_Pr [shape="box" label="qtx release" color="orange"]
MC_Pr -> MC_Sr [color="orange"]
MC_Sr [label="SrB:\nwaiting for:\nrelease" color="orange"]
MC_Sr -> MC_P_stop [label="rx released" color="orange" fontcolor="orange"]
MC_Pc [shape="box" label="qtx close" color="orange"]
MC_Pc -> MC_Sc [color="orange"]
MC_Sc [label="ScB:\nwaiting for:\nclosed" color="orange"]
MC_Sc -> MC_P_stop [label="rx closed" color="orange" fontcolor="orange"]
MC_Prc [shape="box" label="qtx release\nqtx close" color="orange"]
MC_Prc -> MC_Src [color="orange"]
MC_Src [label="SrcB:\nwaiting for:\nrelease\nclosed" color="orange"]
MC_Src -> MC_Sc [label="rx released" color="orange" fontcolor="orange"]
MC_Src -> MC_Sr [label="rx closed" color="orange" fontcolor="orange"]
MC_P_stop [shape="box" label="C_stop()"]
MC_P_stop -> MC_Ss
MC_Ss -> MC_Ss [label="M_stopped()"]
MC_Ss [label="SsB: closed\nstopping"]
MC_Ss [label="Ss: closed" color="green"]
{rank=same; MC_S2 MC_S1 MC_S3 MC_S4 MC_S5}
MC_S1 [label="S1" color="orange" style="dashed"]
MC_S1 -> MC_P_stop [style="dashed" color="orange"]
MC_S2 [label="S2" color="orange" style="dashed"]
MC_S2 -> MC_Pr [color="orange" style="dashed"]
MC_S3 [label="S3" color="orange" style="dashed"]
MC_S3 -> MC_Prc [color="orange" style="dashed"]
MC_S4 [label="S4" color="orange" style="dashed"]
MC_S4 -> MC_Prc [color="orange" style="dashed"]
MC_S5 [label="S5" color="green" style="dashed"]
MC_S5 -> MC_Pc [style="dashed" color="green"]
}

82
docs/wormhole.dot Normal file
View File

@ -0,0 +1,82 @@
digraph {
/* could shave a RTT by committing to the nameplate early, before
finishing the rest of the code input. While the user is still
typing/completing the code, we claim the nameplate, open the mailbox,
and retrieve the peer's PAKE message. Then as soon as the user
finishes entering the code, we build our own PAKE message, send PAKE,
compute the key, send VERSION. Starting from the Return, this saves
two round trips. OTOH it adds consequences to hitting Tab. */
WM_start [label="Wormhole\nMachine" style="dotted"]
WM_start -> WM_S_nothing [style="invis"]
WM_S_nothing [label="know\nnothing"]
WM_S_nothing -> WM_P_queue1 [label="API_send" style="dotted"]
WM_P_queue1 [shape="box" style="dotted" label="queue\noutbound msg"]
WM_P_queue1 -> WM_S_nothing [style="dotted"]
WM_S_nothing -> WM_P_build_pake [label="WM_set_code()"]
WM_P_build_pake [shape="box" label="build_pake()"]
WM_P_build_pake -> WM_S_save_pake
WM_S_save_pake [label="checkpoint"]
WM_S_save_pake -> WM_P_post_pake [label="saved"]
WM_P_post_pake [label="M_set_nameplate()\nM_send(pake)" shape="box"]
WM_P_post_pake -> WM_S_know_code
WM_S_know_code [label="know code\n"]
WM_S_know_code -> WM_P_queue2 [label="API_send" style="dotted"]
WM_P_queue2 [shape="box" style="dotted" label="queue\noutbound msg"]
WM_P_queue2 -> WM_S_know_code [style="dotted"]
WM_S_know_code -> WM_P_compute_key [label="WM_rx_pake"]
WM_S_know_code -> WM_P_mood_lonely [label="close"]
WM_P_compute_key [label="compute_key()" shape="box"]
WM_P_compute_key -> WM_P_save_key [label="pake ok"]
WM_P_save_key [label="checkpoint"]
WM_P_save_key -> WM_P_post_version [label="saved"]
WM_P_compute_key -> WM_P_mood_scary [label="pake bad"]
WM_P_mood_scary [shape="box" label="M_close()\nmood=scary"]
WM_P_mood_scary -> WM_P_notify_failure
WM_P_notify_failure [shape="box" label="notify_failure()" color="red"]
WM_P_notify_failure -> WM_S_closed
WM_P_post_version [label="M_send(version)\nnotify_verifier()" shape="box"]
WM_P_post_version -> WM_S_know_key
WM_S_know_key [label="know_key\nunverified" color="orange"]
WM_S_know_key -> WM_P_queue3 [label="API_send" style="dotted"]
WM_P_queue3 [shape="box" style="dotted" label="queue\noutbound msg"]
WM_P_queue3 -> WM_S_know_key [style="dotted"]
WM_S_know_key -> WM_P_verify [label="WM_rx_msg()"] /* version or phase */
WM_S_know_key -> WM_P_mood_lonely [label="close"] /* more like impatient */
WM_P_verify [label="verify(msg)" shape="box"]
WM_P_verify -> WM_P_accept_msg [label="verify good"]
WM_P_verify -> WM_P_mood_scary [label="verify bad"]
WM_P_accept_msg [label="deliver\ninbound\nmsg()" shape="box"]
WM_P_accept_msg -> WM_P_send_queued
WM_P_send_queued [shape="box" label="M_send()\nqueued"]
WM_P_send_queued -> WM_S_verified_key
WM_S_verified_key [color="green"]
WM_S_verified_key -> WM_P_verify [label="WM_rx_msg()"] /* probably phase */
WM_S_verified_key -> WM_P_mood_happy [label="close"]
WM_S_verified_key -> WM_P_send [label="API_send"]
WM_P_mood_happy [shape="box" label="M_close()\nmood=happy"]
WM_P_mood_happy -> WM_S_closed
WM_P_mood_lonely [shape="box" label="M_close()\nmood=lonely"]
WM_P_mood_lonely -> WM_S_closed
WM_P_send [shape="box" label="M_send(msg)"]
WM_P_send -> WM_S_verified_key
WM_S_closed [label="closed"]
}