summaryrefslogtreecommitdiff
path: root/coin.dot
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-12 11:31:52 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-12 11:31:52 +0200
commit5d9ac101da6f747457522952533cf53e8bbf6ac1 (patch)
tree3f6691db2cc9bdadbe7b33c7969bc4ed7bb99bc1 /coin.dot
parent5b41c8882c6cc7a531566c4160165c497deef829 (diff)
downloaddocs-5d9ac101da6f747457522952533cf53e8bbf6ac1.tar.gz
docs-5d9ac101da6f747457522952533cf53e8bbf6ac1.tar.bz2
docs-5d9ac101da6f747457522952533cf53e8bbf6ac1.zip
coin state machine
Diffstat (limited to 'coin.dot')
-rw-r--r--coin.dot45
1 files changed, 45 insertions, 0 deletions
diff --git a/coin.dot b/coin.dot
new file mode 100644
index 0000000..a381223
--- /dev/null
+++ b/coin.dot
@@ -0,0 +1,45 @@
+digraph Coin {
+
+ planchet [color=blue, shape="box"];
+ fresh [color=blue, label="fresh coin", shape="box"];
+ rs [color=blue, label="refresh session", shape="box"];
+ partial [color=blue, label="dirty coin", shape="box"];
+ revoked [color=blue, label="revoked coin", shape="box"];
+ zombie [color=blue, label="zombie coin", shape="box"];
+ spent [color=blue, label="spent coin", shape="doublecircle"];
+ expired [color=blue, label="expired coin", shape="doublecircle"];
+
+ subgraph {
+ rank = same; spent; expired;
+ }
+
+ subgraph {
+ withdraw; melt;
+ }
+
+ subgraph {
+ rank = same; melt; reveal; rs;
+ }
+
+
+ planchet->withdraw;
+ planchet->melt;
+ withdraw->fresh;
+ fresh->deposit;
+ fresh->melt;
+ deposit->partial;
+ deposit->spent;
+ melt->rs;
+ rs->reveal;
+ reveal->fresh;
+ melt->partial;
+ melt->spent;
+ partial->melt;
+ partial->deposit [color=red];
+ fresh->expired [style=dotted];
+ fresh->revoked [style=dotted];
+ revoked->recoup;
+ recoup->rs;
+ recoup->zombie;
+ zombie->melt;
+}