@@ -531,10 +531,10 @@ registration algorithm if the same topic is being registered and searched for.
531
531
532
532
The protocol introduces the notification packet kind. There are 4 total message
533
533
containers, these are abbreviated in the sequence diagram below as follows:
534
- - m - message packet
535
- - whoareyou - [ WHOEAREYOU ] packet
534
+ - m - [ message packet]
535
+ - whoareyou - [ WHOAREYOU packet]
536
536
- hm - [ handshake message packet]
537
- - n - notification packet
537
+ - n - [ notification packet]
538
538
539
539
``` mermaid
540
540
sequenceDiagram
@@ -550,6 +550,7 @@ containers, these are abbreviated in the sequence diagram below as follows:
550
550
Relay->>Bob:n(RELAYMSG[nonce])
551
551
Bob-->>Alice: whoareyou(nonce)
552
552
Note right of Bob: Hole punched in Bob's NAT for Alice
553
+ Alice-->>Bob: hm(FINDNODE)
553
554
```
554
555
Bob is behind a NAT. Bob is in Relay's kbuckets, they have a session together and Bob
555
556
has sent a packet to Relay in the last ~ 20 seconds[ ^ 1 ] .
@@ -561,15 +562,15 @@ Bob, if Alice is behind a NAT, Alice's NAT adds the filtering rule
561
562
it's UDP session table[ ^ 2 ] [ ^ 3 ] . This means a hole now is punched for Bob in Alice's NAT
562
563
for the duration of ` entry-lifetime ` . The request to Bob times out as Bob is behind a NAT.
563
564
564
- Alice initiates an attempt to punch a hole in Bob's NAT via Relay. Alice reset the request
565
+ Alice initiates an attempt to punch a hole in Bob's NAT via Relay. Alice resets the request
565
566
time out on the timed out [ FINDNODE] message and wraps the message's nonce in a [ RELAYINIT]
566
567
notification and sends it to Relay. The notification also contains its ENR and Bob's node
567
568
id.
568
569
569
570
Relay disassembles the [ RELAYINIT] notification and uses the ` tgt-id ` to look up Bob's
570
571
ENR in its kbuckets. With high probability, Relay will find Bob's ENR in its kbuckets
571
572
as ~ 1 second ago, Relay assembled a [ NODES] response for Alice containing Bob's ENR (see
572
- [ UDP Communication] for recommended time out times ). Relay assembles a [ RELAYMSG]
573
+ [ UDP Communication] for recommended time out duration ). Relay assembles a [ RELAYMSG]
573
574
notification with Alice's message nonce and ENR, then sends it to the address in Bob's
574
575
ENR.
575
576
@@ -592,13 +593,15 @@ From here on it's business as usual. See [Sessions].
592
593
[ PING ] : ./discv5-wire.md#ping-request-0x01
593
594
[ PONG ] : ./discv5-wire.md#pong-response-0x02
594
595
[ FINDNODE ] : ./discv5-wire.md#findnode-request-0x03
596
+ [ NODES ] : ./discv5-wire.md#nodes-response-0x04
595
597
[ REGTOPIC ] : ./discv5-wire.md#regtopic-request-0x07
596
598
[ REGCONFIRMATION ] : ./discv5-wire.md#regconfirmation-response-0x09
597
599
[ TOPICQUERY ] : ./discv5-wire.md#topicquery-request-0x0a
598
600
[ RELAYINIT ] : ./discv5-wire.md#relayinit-0x01
599
601
[ RELAYMSG ] : ./discv5-wire.md#relaymsg-0x02
600
602
601
603
[ UDP communication ] : ./discv5-wire.md#udp-communication
604
+ [ Sessions ] : ./discv5-theory.md#sessions
602
605
603
606
[ ^ 1 ] : https://pdos.csail.mit.edu/papers/p2pnat.pdf
604
607
[ ^ 2 ] : https://datatracker.ietf.org/doc/html/rfc4787
0 commit comments