Skip to content
Snippets Groups Projects

WIP: WS2P v2

Open Éloïs requested to merge ws2p_v2 into master
1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
+ 4
1
@@ -518,10 +518,13 @@ WARNING : Exception with the RBF api feature : In a WS2P connection between two
|:-----:|---------------------|----------------------|--------------------|
| 0 | EMPTY_REQUEST | - | - |
| 1 | CURRENT_BLOCKSTAMP | - | - |
| 2 | SPECIFIC_BLOCK_HASH | block_id (u32) | - |
| 2 | BLOCKS_HASHS | begin_block_id (u32) | blocks_count (u16) |
| 3 | CHUNK | begin_block_id (u32) | blocks_count (u16) |
| 4 | WOT_POOL | folders_count (u16) | min_cert (u8) |
BLOCKS_HASHS := In case of fork, to quickly find the fork point, the node will request the hashes of the ForkWindowsSize of the local blockchains of the other nodes.
It would be counterproductive to ask directly for the entire blocks, when you will only need them if you actually decide to stack the corresponding branch.
WOT_POOL := For network performance reasons, a Duniter-Rust node never shares its entire wot pool at once. It randomly selects `folders_count` folders among those having received at least `min_cert` certifications. It's the requesting node that sets the values of `min_cert` and `folders_count` according to its connection rate, its configuration and the rate of new folders it has obtained in these previous requests.
### REQUESTS RESPONSES
Loading