github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/spec/p2p/messages/pex.md (about) 1 --- 2 order: 6 3 --- 4 5 # Peer Exchange 6 7 ## Channels 8 9 Pex has one channel. The channel identifier is listed below. 10 11 | Name | Number | 12 |------------|--------| 13 | PexChannel | 0 | 14 15 ## Message Types 16 17 ### PexRequest 18 19 PexRequest is an empty message requesting a list of peers. 20 21 > EmptyRequest 22 23 ### PexResponse 24 25 PexResponse is an list of net addresses provided to a peer to dial. 26 27 | Name | Type | Description | Field Number | 28 |-------|------------------------------------|------------------------------------------|--------------| 29 | addresses | repeated [PexAddress](#pexaddress) | List of peer addresses available to dial | 1 | 30 31 ### PexAddress 32 33 PexAddress provides needed information for a node to dial a peer. This is in the form of a `URL` that gets parsed 34 into a `NodeAddress`. See [ParseNodeAddress](https://github.com/tendermint/tendermint/blob/f2a8f5e054cf99ebe246818bb6d71f41f9a30faa/internal/p2p/address.go#L43) for more details. 35 36 | Name | Type | Description | Field Number | 37 |------|--------|------------------|--------------| 38 | url | string | See [golang url](https://golang.org/pkg/net/url/#URL) | 1 | 39 40 ### Message 41 42 Message is a [`oneof` protobuf type](https://developers.google.com/protocol-buffers/docs/proto#oneof). The one of consists of two messages. 43 44 | Name | Type | Description | Field Number | 45 |--------------|-----------------------------|------------------------------------------------------|--------------| 46 | pex_request | [PexRequest](#pexrequest) | Empty request asking for a list of addresses to dial | 3 | 47 | pex_response | [PexResponse](#pexresponse) | List of addresses to dial | 4 |