include message in goodbye

Add a descriptive message to goodbye, to describe disconnection reason
for debugging purposes. Clients may choose to leave it empty, or not
send a goodbye at all.
This commit is contained in:
Jacek Sieka 2020-07-13 21:11:39 +02:00
parent 7b43a3d772
commit 4af54293d7
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8
1 changed files with 6 additions and 2 deletions

View File

@ -655,14 +655,16 @@ Implementers are free to implement such behavior in their own way.
#### Goodbye
**Protocol ID:** ``/eth2/beacon_chain/req/goodbye/1/``
**Protocol ID:** ``/eth2/beacon_chain/req/goodbye/2/``
Request, Response Content:
```
(
uint64
code: uint64
message: List[byte, 256]
)
```
Client MAY send goodbye messages upon disconnection. The reason field MAY be one of the following values:
- 1: Client shut down.
@ -677,6 +679,8 @@ The request/response MUST be encoded as a single SSZ-field.
The response MUST consist of a single `response_chunk`.
*Note*: By convention, the `message` is a sequence of bytes that MAY be interpreted as a UTF-8 string (for debugging purposes). Clients MUST treat as valid any byte sequences.
#### BeaconBlocksByRange
**Protocol ID:** `/eth2/beacon_chain/req/beacon_blocks_by_range/1/`