Skip to content

Commit

Permalink
relay/circuit-v2: Replace excalidraw with plantuml
Browse files Browse the repository at this point in the history
For the sake of consistency across the specifications use plantuml to
picture circuit relay v2 protocol interaction.
  • Loading branch information
mxinden committed May 10, 2021
1 parent 3c0e757 commit fae5b54
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 1 deletion.
41 changes: 40 additions & 1 deletion relay/circuit-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,46 @@ Peer _A_ is a private peer, which is not publicly reachable; it
utilizes the services of peer _R_ as the relay. Peer _B_ is another
peer who wishes to connect to peer _A_ through _R_.

![Circuit v2 Protocol Interaction](circuit-v2.png)
![Circuit v2 Protocol Interaction](circuit-v2.svg)

<details>
<summary>Instructions to reproduce diagram</summary>

Use https://plantuml.com/ and the specification below to reproduce the diagram.

```
@startuml
participant A
participant R
participant B
skinparam sequenceMessageAlign center
== Reservation ==
A -> R: [hop] RESERVE
R -> A: [hop] STATUS:OK
hnote over A: Reservation timeout approaching.
hnote over A: Refresh.
A -> R: [hop] RESERVE
R -> A: [hop] STATUS:OK
hnote over A: ...
== Circuit Establishment ==
B -> R: [hop] CONNECT to A
R -> A: [stop] CONNECT from B
A -> R: [stop] STATUS:OK
B <-> A: Connection
@enduml
```

</details>


The first part of the interaction is _A_'s reservation of a relay slot
in _R_. This is accomplished by opening a connection to _R_ and
Expand Down
Binary file removed relay/circuit-v2.png
Binary file not shown.
38 changes: 38 additions & 0 deletions relay/circuit-v2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fae5b54

Please sign in to comment.