Skip to content

Commit

Permalink
Merge pull request #526 from aeternity/525-document-ping-v2
Browse files Browse the repository at this point in the history
Add ping version 2 description.
  • Loading branch information
mitchelli authored Apr 25, 2024
2 parents c98caac + b02e4d9 commit d634e7a
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, currently only "ping" is supported.
- `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 d634e7a

Please sign in to comment.