Unverified Commit f1f999c2 authored by Éloïs's avatar Éloïs
Browse files

add reconnexion interval and dynamic trimming

parent 2e39bf8b
......@@ -9,7 +9,7 @@ This document details the current specifications of WS2P v1 as they are already
* [WS2P Endpoints](#ws2p-endpoints)
* [Endpoint format](#endpoint-format)
* [Getting endpoints from other Duniter nodes](#getting-endpoints-from-other-duniter-nodes)
* [Priority of WS2P connections](#priority-of-ws2p-connections)
* [Priority of WS2P outcoming connections](#priority-of-ws2p-outcoming-connections)
* [Establishing a WS2P connection](#establishing-a-ws2p-connection)
* [HEAD messages](#head-messages)
* [Documents messages](#documents-messages)
......@@ -59,7 +59,11 @@ _*peer card : Signed document declaring all the access points of a peer._
When duniter-ts starts up, the WS2P module accesses the peer cards stored in duniter-ts's database following synchronization.
## Priority of WS2P connections
## Priority of WS2P outcoming connections
The WS2P module attempts to establish outcoming connections at the kick-start of the node and then every 10 minutes.
At each attempt, all known endpoints are contacted until the outcoming quota is reached.
If the outcoming quota is already reached at the beginning of an attempt, the least priority connection is removed in order to keep the network dynamic and scalable.
The WS2P module does not attempt to connect randomly to any node among those of which it knows a WS2P endpoint,
it classifies them according to the following criteria :
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment