Skip to content

Commit 390248e

Browse files
committed
Nat hole punch wire protocol
1 parent 0b551d7 commit 390248e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

discv5/discv5-wire.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ handshake packet.
154154

155155
![handshake packet layout](./img/handshake-packet-layout.png)
156156

157+
### Notification Packet (`flag = 3`)
158+
159+
Aside from the flag value, this container is identical to a [message packet](#ordinary-message-packet).
160+
157161
## Protocol Messages
158162

159163
This section lists all defined messages which can be sent and received. The hexadecimal
@@ -291,6 +295,26 @@ TOPICQUERY requests nodes in the [topic queue] of the given topic. The recipient
291295
request must send one or more NODES messages containing node records registered for the
292296
topic.
293297

298+
## Protocol Notifications
299+
300+
This section lists all defined notifications which can be sent and received. The hexadecimal
301+
value in parentheses is the `notification-type`.
302+
303+
### RELAYINIT (0x01)
304+
305+
message-data = [inr-enr, tgt-id, nonce]
306+
notification-type = 0x01
307+
inr-enr = initiator ENR
308+
tgt-id = 256-bit node ID of target
309+
nonce = uint96 -- nonce of timed out request
310+
311+
### RELAYMSG (0x02)
312+
313+
message-data = [init-enr, nonce]
314+
notification-type = 0x02
315+
init-enr = initiator ENR
316+
nonce = uint96 -- nonce of timed out request
317+
294318
## Test Vectors
295319

296320
A collection of test vectors for this specification can be found at

0 commit comments

Comments
 (0)