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

Commit

Permalink
Add message sequence chart for readme demo
Browse files Browse the repository at this point in the history
Fixes #17
  • Loading branch information
garious committed Feb 21, 2018
1 parent 49605b2 commit 07c4ebb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Create a *Historian* and send it *events* to generate an *event log*, where each
is tagged with the historian's latest *hash*. Then ensure the order of events was not tampered
with by verifying each entry's hash can be generated from the hash in the previous entry:

![historian](https://user-images.githubusercontent.com/55449/36492299-151c65e2-16ea-11e8-97b6-14f1d9b97985.png)

```rust
extern crate silk;

Expand Down
22 changes: 22 additions & 0 deletions diagrams/historian.msc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
msc {
client,historian,logger;

client=>historian [ label = "Tick" ] ;
historian=>logger [ label = "Tick" ] ;
logger=>historian [ label = "e0 = Entry{hash: h0, n: 0, event: Tick}" ] ;
logger=>logger [ label = "h1 = hash(h0)" ] ;
logger=>logger [ label = "h2 = hash(h1)" ] ;
client=>historian [ label = "UserData(d0)" ] ;
historian=>logger [ label = "UserData(d0)" ] ;
logger=>logger [ label = "h3 = hash(h2 + d0)" ] ;
logger=>historian [ label = "e1 = Entry{hash: hash(h3), n: 2, event: UserData(d0)}" ] ;
logger=>logger [ label = "h4 = hash(h3)" ] ;
logger=>logger [ label = "h5 = hash(h4)" ] ;
logger=>logger [ label = "h6 = hash(h5)" ] ;
client=>historian [ label = "Tick" ] ;
historian=>logger [ label = "Tick" ] ;
logger=>historian [ label = "e2 = Entry{hash: h6, n: 3, event: Tick}" ] ;
client=>historian [ label = "collect()" ] ;
historian=>client [ label = "entries = [e0, e1, e2]" ] ;
client=>client [ label = "verify_slice(entries)" ] ;
}

0 comments on commit 07c4ebb

Please sign in to comment.