Skip to content

Commit 58c1cba

Browse files
author
Emilia Hane
committed
Lint fixes
1 parent d7371c0 commit 58c1cba

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

discv5/discv5-theory.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -346,30 +346,30 @@ as follows:
346346
- hm - [handshake message packet]
347347
- s - [session message packet]
348348

349-
```mermaid
350-
sequenceDiagram
351-
participant Alice
352-
participant Relay
353-
participant Bob
354-
355-
Relay-->>Alice: m(NODES[Bob's ENR])
356-
Alice->>Bob: m(nonce,FINDNODE)
357-
Note left of Alice:Hole punched in Alice's NAT for Bob
358-
Note left of Alice:FINDNODE timed out
359-
Alice->>Relay: s(RELAYINIT[nonce])
360-
Relay->>Bob: s(RELAYMSG[nonce])
361-
Bob-->>Alice: whoareyou(nonce)
362-
Note right of Bob: Hole punched in Bob's NAT for Alice
363-
Alice-->>Bob: hm(FINDNODE)
364-
```
349+
```mermaid
350+
sequenceDiagram
351+
participant Alice
352+
participant Relay
353+
participant Bob
354+
355+
Relay-->>Alice: m(NODES[Bob's ENR])
356+
Alice->>Bob: m(nonce,FINDNODE)
357+
Note left of Alice:Hole punched in Alice's NAT for Bob
358+
Note left of Alice:FINDNODE timed out
359+
Alice->>Relay: s(RELAYINIT[nonce])
360+
Relay->>Bob: s(RELAYMSG[nonce])
361+
Bob-->>Alice: whoareyou(nonce)
362+
Note right of Bob: Hole punched in Bob's NAT for Alice
363+
Alice-->>Bob: hm(FINDNODE)
364+
```
365365
366366
Bob is behind a NAT. Bob is in Relay's kbuckets, they have a session together and Bob has
367367
sent a packet to Relay in the last ~20 seconds hence Relay can get through Bob's NAT[^1].
368368
369369
As part of recursive query for peers, Alice sends a [FINDNODE] request to Bob, who's ENR
370370
it received from Relay. By making an outgoing request to Bob, if Alice is behind a NAT,
371371
Alice's NAT adds the filtering rule `(Alice's-LAN-ip, Alice's-LAN-port, Bob's-WAN-ip,
372-
Bob's-WAN-port, entry-lifetime)` to it's UDP session table[^2][^3]. This means a hole now
372+
Bob's-WAN-port, entry-lifetime)` to it's UDP session table[^2] [^3]. This means a hole now
373373
is punched for Bob in Alice's NAT for the duration of `entry-lifetime`. The request to Bob
374374
times out as Bob is behind a NAT.
375375
@@ -388,7 +388,7 @@ ENR.
388388
Bob disassembles the [RELAYMSG] and uses the `nonce` to assemble a [WHOAREYOU packet],
389389
then sends it to Alice using the address in the `initiator-enr`. Bob's NAT adds the
390390
filtering rule `(Bob's-LAN-ip, Bob's-LAN-port, Alice's-WAN-ip, Alice's-WAN-port,
391-
entry-lifetime)` to it's UDP session table[^2][^3]. A hole is punched in Bob's NAT for
391+
entry-lifetime)` to it's UDP session table[^2] [^3]. A hole is punched in Bob's NAT for
392392
Alice for the duration of `entry-lifetime`.
393393
394394
From here on it's business as usual. See [Sessions].

0 commit comments

Comments
 (0)