diff --git a/libretroshare/src/tests/network_simulator/README.txt b/libretroshare/src/tests/network_simulator/README.txt index 630ea6815..cf5838545 100644 --- a/libretroshare/src/tests/network_simulator/README.txt +++ b/libretroshare/src/tests/network_simulator/README.txt @@ -1,3 +1,51 @@ +TODO +==== + +Testing the router algorithm with network simulator + * generate a random network + * simulate disconnections (also in GUI) + * send messages from/to random peers and measure: + - how many times a given message is stored + - how much time a given message took to arrive. + +Implement + * clueing of GR from GXS (simulated in network simulator, when initing the network) + +In GLobal Router, by order of priority + * when a ACK is received for a msg that is already ACKed, we should still update the routing matrix and add a clue, but with lower prioity, + so that the matrix gets filled with additional routes. Can be checked in the simulator + + * routing strategy: + - when a route is known and available, always select it, but possibly add another random route, very rarely. + Peer disconnection is likely to cause the discovery of new routes anyway. + + * we should use clues from GXS to improve the routing matrix + - That would avoid lots of spamming. + - allows to init the routing matrices for all keys + - random walk will be a supplemental help, but restricted to small depth if no indication of route is available. + - needs to be implemented in network simulator. When providing a new key, the key should be spread in the network and new clues + should be added to the RGrouter matrix. + + * make sure the depth is accounted better: + - if single route is known => don't limit depth + - if no route is known => strictly limit depth + => add a counter which is increased when no route is available, and *reset* otherwise, so that the max number of bounce + we can do without knowledge of the keys is limited, but the total depth has no limits. + +Unsolved questions: + * handle dead routes correctly. How? + * should we send ACKs everywhere even upward? No, if we severely limit the depth of random walk. + * better distribute routing events, so that the matrix gets filled better? + * find a strategy to avoid storing too many items + * how to handle cases where a ACK cannot be sent back? The previous peer is going to try indefinitly? + => the ACK will be automatically collected by another route! + * how to make sure ACKed messages are not stored any longer than necessary? + * send signed ACKs, so that the receiver cannot be spoofed. + * only ACK when the message was properly received by the client service. No ACK if the client does not register that item? + +================================================================================================================ + + The purpose of this directory is to write a Network simulator, that can have multiple turtle routers interact together. The routers will talk to a fake link manager, which reports the peers for each node of a network graph. diff --git a/libretroshare/src/tests/network_simulator/gui/gui.pro b/libretroshare/src/tests/network_simulator/gui/gui.pro index 3c931691e..8cb01b4a2 100644 --- a/libretroshare/src/tests/network_simulator/gui/gui.pro +++ b/libretroshare/src/tests/network_simulator/gui/gui.pro @@ -20,7 +20,6 @@ FORMS = NetworkSimulatorGUI.ui TurtleRouterStatistics.ui GlobalRouterStatistics. LIBS *= ../../../lib/libretroshare.a \ ../../../../../libbitdht/src/lib/libbitdht.a \ - ../../../../../../lib/sqlcipher/.libs/libsqlcipher.a \ ../../../../../openpgpsdk/src/lib/libops.a \ ../lib/libnscore.a \ - -lgnome-keyring -lupnp -lssl -lcrypto -lbz2 -lixml + -lsqlcipher -lgnome-keyring -lupnp -lssl -lcrypto -lbz2 -lixml diff --git a/libretroshare/src/tests/scripts/config-linux.mk b/libretroshare/src/tests/scripts/config-linux.mk index 0947c4576..c97a3c21e 100644 --- a/libretroshare/src/tests/scripts/config-linux.mk +++ b/libretroshare/src/tests/scripts/config-linux.mk @@ -71,7 +71,7 @@ LIBS += -lssl -lcrypto -lpthread #LIBS += -L$(UPNPC_DIR) -lminiupnpc LIBS += $(XLIB) -ldl -lz LIBS += -lupnp -LIBS += ../../../../../lib/sqlcipher/.libs/libsqlcipher.a +LIBS += -lsqlcipher RSLIBS = $(LIBS)