diff options
-rw-r--r-- | TODO | 21 | ||||
-rw-r--r-- | src/topology/gnunet-daemon-topology.c | 31 |
2 files changed, 32 insertions, 20 deletions
@@ -1,17 +1,14 @@ | |||
1 | 0.9.0pre1: | 1 | 0.9.0pre1: |
2 | * PEERINFO: | 2 | * PEERINFO: [CG] |
3 | - trust: need *fast* way to check/update trust in peers | 3 | - trust: need *fast* way to check/update trust in peers |
4 | (async peerinfo would not be right; certainly not with the current API) | 4 | (async peerinfo would not be right; certainly not with the current API) |
5 | * TOPOLOGY: | 5 | * TOPOLOGY: [CG] |
6 | - check if new HELLO learned is different from old HELLO | ||
7 | before resetting entire state! | ||
8 | - needs more testing (especially F2F topology) | ||
9 | - needs to re-try connecting after disconnect (currently, it | 6 | - needs to re-try connecting after disconnect (currently, it |
10 | initially triggers a connection request, but if that connection | 7 | initially triggers a connection request, but if that connection |
11 | fails / goes down, it does not retry in a timely fashion; | 8 | fails / goes down, it does not retry in a timely fashion; |
12 | cause seems to be the 'blacklist_after_attempt' being set to 1h, | 9 | cause seems to be the 'greylist_after_attempt' being set to 1h, |
13 | which is rather long -- and should probably be adjusted based on | 10 | which is rather long -- and should probably be adjusted based on |
14 | the number of connections / known peers) | 11 | the number of connections / known peers & use some form of back-off) |
15 | - If the topology daemon crashes, peers that were put on the | 12 | - If the topology daemon crashes, peers that were put on the |
16 | blacklist with transport will never be removed from it (until | 13 | blacklist with transport will never be removed from it (until |
17 | transport service dies); we should use the blacklist notification | 14 | transport service dies); we should use the blacklist notification |
@@ -24,9 +21,7 @@ | |||
24 | a minor issue; OTOH, we might want to be more explicit about | 21 | a minor issue; OTOH, we might want to be more explicit about |
25 | allowing/forbidding connects on pre-connect to avoid | 22 | allowing/forbidding connects on pre-connect to avoid |
26 | entering connect attempts to just be blacklisted shortly afterwards). | 23 | entering connect attempts to just be blacklisted shortly afterwards). |
27 | * DATASTORE: | 24 | - needs more testing (especially F2F topology) |
28 | - API lacks cancellation methods (needed? or is disconnect enough?) | ||
29 | - may also want to integrate request queuing here instead of gnunet-service-fs_drq.c | ||
30 | * FS: [CG] | 25 | * FS: [CG] |
31 | - support recursive download even if filename is NULL and we hence | 26 | - support recursive download even if filename is NULL and we hence |
32 | do not generate files on disk (use temp_filename) | 27 | do not generate files on disk (use temp_filename) |
@@ -180,10 +175,6 @@ | |||
180 | Optimizations: | 175 | Optimizations: |
181 | * TCP: | 176 | * TCP: |
182 | - should use hash map to look up sessions | 177 | - should use hash map to look up sessions |
183 | * PEERINFO: | ||
184 | - api creates many, many short-lived TCP connections; either some | ||
185 | clients should use the API differently or we need to change the | ||
186 | API to enable re-use of connections to the service | ||
187 | * STATISTICS: | 178 | * STATISTICS: |
188 | - should use BIO instead of mmap | 179 | - should use BIO instead of mmap |
189 | * TRANSPORT: | 180 | * TRANSPORT: |
@@ -196,7 +187,7 @@ Optimizations: | |||
196 | - should use hash map to look up Neighbours | 187 | - should use hash map to look up Neighbours |
197 | * HOSTLIST: | 188 | * HOSTLIST: |
198 | - 'server' uses 'GNUNET_PEERINFO_iterate', should probably switch to notification API | 189 | - 'server' uses 'GNUNET_PEERINFO_iterate', should probably switch to notification API |
199 | (for more instant / up-to-date hostlists at lower cost) [OPTIMIZATION] | 190 | (for more instant / up-to-date hostlists at lower cost) |
200 | * DATASTORE (?): | 191 | * DATASTORE (?): |
201 | - check for duplicates on insertion (currently, same content is frequently | 192 | - check for duplicates on insertion (currently, same content is frequently |
202 | stored again [seen with KBLOCKS and SBLOCKS]!) | 193 | stored again [seen with KBLOCKS and SBLOCKS]!) |
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index 3aa518fa1..3a2a421d4 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c | |||
@@ -1016,6 +1016,8 @@ consider_for_advertising (const struct GNUNET_HELLO_Message *hello) | |||
1016 | { | 1016 | { |
1017 | int have_address; | 1017 | int have_address; |
1018 | struct GNUNET_PeerIdentity pid; | 1018 | struct GNUNET_PeerIdentity pid; |
1019 | struct GNUNET_TIME_Absolute dt; | ||
1020 | struct GNUNET_HELLO_Message *nh; | ||
1019 | struct Peer *peer; | 1021 | struct Peer *peer; |
1020 | uint16_t size; | 1022 | uint16_t size; |
1021 | 1023 | ||
@@ -1034,17 +1036,36 @@ consider_for_advertising (const struct GNUNET_HELLO_Message *hello) | |||
1034 | peer = GNUNET_CONTAINER_multihashmap_get (peers, | 1036 | peer = GNUNET_CONTAINER_multihashmap_get (peers, |
1035 | &pid.hashPubKey); | 1037 | &pid.hashPubKey); |
1036 | if (peer == NULL) | 1038 | if (peer == NULL) |
1037 | peer = make_peer (&pid, hello, GNUNET_NO); | 1039 | { |
1040 | peer = make_peer (&pid, hello, GNUNET_NO); | ||
1041 | } | ||
1042 | else if (peer->hello != NULL) | ||
1043 | { | ||
1044 | dt = GNUNET_HELLO_equals (peer->hello, | ||
1045 | hello, | ||
1046 | GNUNET_TIME_absolute_get()); | ||
1047 | if (dt.value == GNUNET_TIME_UNIT_FOREVER_ABS.value) | ||
1048 | return; /* nothing new here */ | ||
1049 | } | ||
1038 | #if DEBUG_TOPOLOGY | 1050 | #if DEBUG_TOPOLOGY |
1039 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1051 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1040 | "Found `%s' from peer `%s' for advertising\n", | 1052 | "Found `%s' from peer `%s' for advertising\n", |
1041 | "HELLO", | 1053 | "HELLO", |
1042 | GNUNET_i2s (&pid)); | 1054 | GNUNET_i2s (&pid)); |
1043 | #endif | 1055 | #endif |
1044 | size = GNUNET_HELLO_size (hello); | 1056 | if (peer->hello != NULL) |
1045 | GNUNET_free_non_null (peer->hello); | 1057 | { |
1046 | peer->hello = GNUNET_malloc (size); | 1058 | nh = GNUNET_HELLO_merge (peer->hello, |
1047 | memcpy (peer->hello, hello, size); | 1059 | hello); |
1060 | GNUNET_free (peer->hello); | ||
1061 | peer->hello = nh; | ||
1062 | } | ||
1063 | else | ||
1064 | { | ||
1065 | size = GNUNET_HELLO_size (hello); | ||
1066 | peer->hello = GNUNET_malloc (size); | ||
1067 | memcpy (peer->hello, hello, size); | ||
1068 | } | ||
1048 | if (peer->filter != NULL) | 1069 | if (peer->filter != NULL) |
1049 | GNUNET_CONTAINER_bloomfilter_free (peer->filter); | 1070 | GNUNET_CONTAINER_bloomfilter_free (peer->filter); |
1050 | setup_filter (peer); | 1071 | setup_filter (peer); |