Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 07c4ebb

Browse files
committed
Add message sequence chart for readme demo
Fixes #17
1 parent 49605b2 commit 07c4ebb

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Create a *Historian* and send it *events* to generate an *event log*, where each
2424
is tagged with the historian's latest *hash*. Then ensure the order of events was not tampered
2525
with by verifying each entry's hash can be generated from the hash in the previous entry:
2626

27+
![historian](https://user-images.githubusercontent.com/55449/36492299-151c65e2-16ea-11e8-97b6-14f1d9b97985.png)
28+
2729
```rust
2830
extern crate silk;
2931

diagrams/historian.msc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
msc {
2+
client,historian,logger;
3+
4+
client=>historian [ label = "Tick" ] ;
5+
historian=>logger [ label = "Tick" ] ;
6+
logger=>historian [ label = "e0 = Entry{hash: h0, n: 0, event: Tick}" ] ;
7+
logger=>logger [ label = "h1 = hash(h0)" ] ;
8+
logger=>logger [ label = "h2 = hash(h1)" ] ;
9+
client=>historian [ label = "UserData(d0)" ] ;
10+
historian=>logger [ label = "UserData(d0)" ] ;
11+
logger=>logger [ label = "h3 = hash(h2 + d0)" ] ;
12+
logger=>historian [ label = "e1 = Entry{hash: hash(h3), n: 2, event: UserData(d0)}" ] ;
13+
logger=>logger [ label = "h4 = hash(h3)" ] ;
14+
logger=>logger [ label = "h5 = hash(h4)" ] ;
15+
logger=>logger [ label = "h6 = hash(h5)" ] ;
16+
client=>historian [ label = "Tick" ] ;
17+
historian=>logger [ label = "Tick" ] ;
18+
logger=>historian [ label = "e2 = Entry{hash: h6, n: 3, event: Tick}" ] ;
19+
client=>historian [ label = "collect()" ] ;
20+
historian=>client [ label = "entries = [e0, e1, e2]" ] ;
21+
client=>client [ label = "verify_slice(entries)" ] ;
22+
}

0 commit comments

Comments
 (0)