Skip to content

Commit e002148

Browse files
committed
Add ping version 2 description.
1 parent 9b6b468 commit e002148

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

sync/p2p_messages.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,33 @@ Message is RLP encoded, fields:
8080

8181
Message is RLP encoded, fields:
8282

83-
- `Port :: int` - listen port
84-
- `Share :: int` - number of peers to share
83+
### Version 1
84+
85+
- `Port :: int` - listen port.
86+
- `Share :: int` - number of peers to share.
87+
- `GenesisHash :: byte_array`
88+
- `Difficulty :: int` - the total difficulty of the chain.
89+
- `TopHash :: byte_array`
90+
- `SyncAllowed :: bool` - if the sender of this ping message is accepting
91+
synchronization messages.
92+
- `Peers :: [byte_array]` - list of shared peers.
93+
94+
95+
### Version 2
96+
97+
- `Versions :: list`
98+
- `Protocol :: binary` - type of message.
99+
- `Vsns :: [int]` - versions supported
100+
- `Port :: int` - listen port.
101+
- `Share :: int` - number of peers to share.
85102
- `GenesisHash :: byte_array`
103+
- `Height :: int` - current height.
86104
- `Difficulty :: int` - the total difficulty of the chain.
87105
- `TopHash :: byte_array`
88-
- `sync_allowed :: bool` - if the sender of this ping message is accepting
106+
- `SyncAllowed :: bool` - if the sender of this ping message is accepting
89107
synchronization messages.
90-
- `Peers :: [byte_array]` - list of shared peers
108+
- `Capabilities :: byte_array` - list of supported capabilites.
109+
- `Peers :: [byte_array]` - list of shared peers.
91110

92111
Peers are serialized/deserialized in `aec_peer_messages`
93112

0 commit comments

Comments
 (0)