parent
49605b257d
commit
07c4ebb7f2
@ -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:
|
||||
|
||||

|
||||
|
||||
```rust
|
||||
extern crate silk;
|
||||
|
||||
|
22
diagrams/historian.msc
Normal file
22
diagrams/historian.msc
Normal file
@ -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)" ] ;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user