@@ -368,8 +363,10 @@ for each connection attempt, the process is as follows:
...
@@ -368,8 +363,10 @@ for each connection attempt, the process is as follows:
| data name | size in bytes | data type |
| data name | size in bytes | data type |
|:-------------:|---------------|--------------|
|:-------------:|---------------|--------------|
| challenge | 32 | [u8; 32] |
| challenge | 32 | [u8; 32] |
| api_features | 2/+ | WS2PFeatures |
| af_size | 1 | u8 |
| flags_queries | 1/+ | WS2PFlags |
| api_features | af_size | WS2PFeatures |
| flags_size | 1 | u8 |
| flags_queries | flags_size | WS2PFlags |
| peer_card | ? | Peer card |
| peer_card | ? | Peer card |
| chunk_id* | 4 | u32 |
| chunk_id* | 4 | u32 |
| chunk_hash* | 32 | [u8; 32] |
| chunk_hash* | 32 | [u8; 32] |
...
@@ -394,8 +391,6 @@ chunk_hash := Last block hash of the chunk.
...
@@ -394,8 +391,6 @@ chunk_hash := Last block hash of the chunk.
| 0000_0001 | SYNC |
| 0000_0001 | SYNC |
| 0000_0010 | ASK_SYNC_CHUNK |
| 0000_0010 | ASK_SYNC_CHUNK |
| 0000_0100 | RES_SYNC_CHUNK |
| 0000_0100 | RES_SYNC_CHUNK |
| ... | ... |
| 1000_0000 | EXTENDED |
SYNC := Boolean indicating whether the connection corresponds to a synchronization request or not. In case of a synchronization request, the connection will necessarily be accepted but temporary. Whereas in the normal case the connection may or may not be accepted according to classic ws2p rules, but it will be permanent.
SYNC := Boolean indicating whether the connection corresponds to a synchronization request or not. In case of a synchronization request, the connection will necessarily be accepted but temporary. Whereas in the normal case the connection may or may not be accepted according to classic ws2p rules, but it will be permanent.
...
@@ -403,8 +398,6 @@ ASK_SYNC_CHUNK := So that the synchronization is not too slow, the nodes to whic
...
@@ -403,8 +398,6 @@ ASK_SYNC_CHUNK := So that the synchronization is not too slow, the nodes to whic
RES_SYNC_CHUNK := A WS2P Public node that asks to synchronize sends its PeerCard to the network, which can then contact it spontaneously to send chunk, the node in synchronization will accept in priority this type of connections.
RES_SYNC_CHUNK := A WS2P Public node that asks to synchronize sends its PeerCard to the network, which can then contact it spontaneously to send chunk, the node in synchronization will accept in priority this type of connections.
EXTENDED := Indicates that the field contain one additional byte to store 8 more features.
### ACK message
### ACK message
| data name | size in bytes | data type |
| data name | size in bytes | data type |
...
@@ -418,7 +411,8 @@ challenge_sig := Signature of the challenge given by the other node.
...
@@ -418,7 +411,8 @@ challenge_sig := Signature of the challenge given by the other node.
@@ -429,8 +423,6 @@ challenge_sig := Signature of the challenge given by the other node.
...
@@ -429,8 +423,6 @@ challenge_sig := Signature of the challenge given by the other node.
| 0000_0001 | LOW_FLOW_DEMAND |
| 0000_0001 | LOW_FLOW_DEMAND |
| 0000_0010 | MEMBER_PUBKEY |
| 0000_0010 | MEMBER_PUBKEY |
| 0000_0100 | MEMBER_PROOF |
| 0000_0100 | MEMBER_PROOF |
| ... | ... |
| 1000_0000 | EXTENDED |
LOW_FLOW_DEMAND := The sender node of this message indicates that it's behind a low speed connection and therefore care must be taken to transmit low volumes of data to it.
LOW_FLOW_DEMAND := The sender node of this message indicates that it's behind a low speed connection and therefore care must be taken to transmit low volumes of data to it.
...
@@ -439,8 +431,6 @@ MEMBER_PUBKEY: Indicates whether or not the member_pubkey field is present in th
...
@@ -439,8 +431,6 @@ MEMBER_PUBKEY: Indicates whether or not the member_pubkey field is present in th
MEMBER_PROOF := Indicates that the message contains proof that the sender node is a member. If this boolean is false, then the member_proof field must not be present.
MEMBER_PROOF := Indicates that the message contains proof that the sender node is a member. If this boolean is false, then the member_proof field must not be present.
If this boolean is true, the "member_proof" must contain a signature must sign the following datas :
If this boolean is true, the "member_proof" must contain a signature must sign the following datas :
EXTENDED := Indicates that the field contain one additional byte to store 8 more features.