@@ -110,6 +110,8 @@ of `authdata`, which differs depending on the packet type.
110
110
### Ordinary Message Packet (` flag = 0 ` )
111
111
112
112
For message packets, the ` authdata ` section is just the source node ID.
113
+ [ Protocol messages] ( #protocol-messages ) of type request are transported in the
114
+ ` message ` field of this packet.
113
115
114
116
authdata = src-id
115
117
authdata-size = 32
@@ -159,16 +161,19 @@ handshake packet.
159
161
Aside from the flag value, this container is identical to a
160
162
[ message packet] ( #ordinary-message-packet ) . Contrary to a message packet, failing to
161
163
decrypt a notification packet should not trigger a handshake.
164
+ [ Protocol messages] ( #protocol-messages ) of type response and notification are transported
165
+ in the ` message ` field of this packet.
162
166
163
167
## Protocol Messages
164
168
165
169
This section lists all defined messages which can be sent and received. The hexadecimal
166
170
value in parentheses is the ` message-type ` .
167
171
168
- The first element of every ` message-data ` list is the request ID. ` request-id ` is an RLP
169
- byte array of length <= 8 bytes. For requests, this value is assigned by the requester.
170
- The recipient of a message must mirror the value in the ` request-id ` element of the
171
- response. The selection of appropriate values for request IDs is left to the implementation.
172
+ For request and response messages, the first element of every ` message-data ` list is the
173
+ request ID. ` request-id ` is an RLP byte array of length <= 8 bytes. For requests, this value
174
+ is assigned by the requester. The recipient of a message must mirror the value in the
175
+ ` request-id ` element of the response. The selection of appropriate values for request IDs is
176
+ left to the implementation.
172
177
173
178
### PING Request (0x01)
174
179
@@ -297,20 +302,15 @@ TOPICQUERY requests nodes in the [topic queue] of the given topic. The recipient
297
302
request must send one or more NODES messages containing node records registered for the
298
303
topic.
299
304
300
- ## Protocol Notifications
301
-
302
- This section lists all defined notifications which can be sent and received. The hexadecimal
303
- value in parentheses is the ` notification-type ` .
304
-
305
- ### RELAYINIT (0x01)
305
+ ### RELAYINIT Notification (0x0B)
306
306
307
307
message-data = [inr-enr, tgt-id, nonce]
308
308
notification-type = 0x01
309
309
inr-enr = initiator ENR
310
310
tgt-id = 256-bit node ID of target
311
311
nonce = uint96 -- nonce of timed out request
312
312
313
- ### RELAYMSG (0x02 )
313
+ ### RELAYMSG Notification (0x0C )
314
314
315
315
message-data = [inr-enr, nonce]
316
316
notification-type = 0x02
0 commit comments