Skip to content

Commit

Permalink
Add ping version 2 description.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelli committed Mar 1, 2024
1 parent 9b6b468 commit e002148
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions sync/p2p_messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,33 @@ Message is RLP encoded, fields:

Message is RLP encoded, fields:

- `Port :: int` - listen port
- `Share :: int` - number of peers to share
### Version 1

- `Port :: int` - listen port.
- `Share :: int` - number of peers to share.
- `GenesisHash :: byte_array`
- `Difficulty :: int` - the total difficulty of the chain.
- `TopHash :: byte_array`
- `SyncAllowed :: bool` - if the sender of this ping message is accepting
synchronization messages.
- `Peers :: [byte_array]` - list of shared peers.


### Version 2

- `Versions :: list`
- `Protocol :: binary` - type of message.
- `Vsns :: [int]` - versions supported
- `Port :: int` - listen port.
- `Share :: int` - number of peers to share.
- `GenesisHash :: byte_array`
- `Height :: int` - current height.
- `Difficulty :: int` - the total difficulty of the chain.
- `TopHash :: byte_array`
- `sync_allowed :: bool` - if the sender of this ping message is accepting
- `SyncAllowed :: bool` - if the sender of this ping message is accepting
synchronization messages.
- `Peers :: [byte_array]` - list of shared peers
- `Capabilities :: byte_array` - list of supported capabilites.
- `Peers :: [byte_array]` - list of shared peers.

Peers are serialized/deserialized in `aec_peer_messages`

Expand Down

0 comments on commit e002148

Please sign in to comment.