Skip to content

Commit 399b9f0

Browse files
committed
discv5: put diagram source into an external file
1 parent 736c6e3 commit 399b9f0

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

discv5/discv5-theory.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -369,23 +369,7 @@ each message in the diagram below. We use these abbreviations:
369369
- `H(X)`: [handshake message packet] containing request `X`
370370
- `s(M)`: [session message packet] containing message `M`
371371

372-
<?mermaid
373-
sequenceDiagram
374-
participant Alice
375-
participant Relay
376-
participant Bob
377-
378-
Relay-->>Alice: s(NODES[Bob's ENR])
379-
Alice->>Bob: m(nonce,FINDNODE)
380-
Note left of Alice:Hole punched in Alice's NAT for Bob
381-
Note left of Alice:FINDNODE timed out
382-
Alice->>Relay: s(RELAYINIT[nonce])
383-
Relay->>Bob: s(RELAYMSG[nonce])
384-
Bob-->>Alice: whoareyou(nonce)
385-
Note right of Bob: Hole punched in Bob's NAT for Alice
386-
Alice-->>Bob: H(FINDNODE)
387-
?>
388-
372+
<!-- diagram source: ./img/nat-hole-punching-flow.mermaid -->
389373
![Diagram](./img/nat-hole-punching-flow.svg)
390374

391375
Preconditions: Bob is behind NAT. Bob is contained in Relay's node table, they have an
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
sequenceDiagram
2+
participant Alice
3+
participant Relay
4+
participant Bob
5+
6+
Relay-->>Alice: s(NODES[Bob's ENR])
7+
Alice->>Bob: m(nonce,FINDNODE)
8+
Note left of Alice:Hole punched in Alice's NAT for Bob
9+
Note left of Alice:FINDNODE timed out
10+
Alice->>Relay: s(RELAYINIT[nonce])
11+
Relay->>Bob: s(RELAYMSG[nonce])
12+
Bob-->>Alice: whoareyou(nonce)
13+
Note right of Bob: Hole punched in Bob's NAT for Alice
14+
Alice-->>Bob: H(FINDNODE)

0 commit comments

Comments
 (0)