23e9d4de57b24475131e6e26445565ac0e7f0ea5
[oweals/gnunet.git] / TODO
1 PHASE #1: (Goal: settle key design questions)
2
3 TRANSPORT:
4 * Make sure that the service does not go bezerk
5   on all plugins and all sessions on disconnects,
6   specifically, whenever disconnect_neighbour is called.
7   (We may have other sessions, in particular through other transports,
8    that are active for the same peer; clearly we should
9    not immediately discard all messages and stop all
10    plugins); the call is fine in the various places where it is; but except in the
11    timeout case, we should check the status of the other plugins before killing all.
12
13 * "Another peer saw us using..." messages for TCP
14   use the (random, high) sender port instead of the
15   adjusted port; this will be confusing to users...
16
17 ==9033== Invalid read of size 8
18 ==9033==    at 0x4042FA: plugin_env_receive (gnunet-service-transport.c:2058)
19 ==9033==    by 0x7287643: disconnect_session (plugin_transport_tcp.c:831)
20 ==9033==    by 0x7289539: disconnect_notify (plugin_transport_tcp.c:1919)
21 ==9033==    by 0x524BE24: ??? (server.c:645)
22 ==9033==    by 0x524C040: ??? (server.c:752)
23 ==9033==    by 0x5245734: ??? (network.c:810)
24 ==9033==    by 0x5245881: ??? (network.c:850)
25 ==9033==    by 0x524A497: ??? (scheduler.c:425)
26 ==9033==    by 0x524A77A: GNUNET_SCHEDULER_run (scheduler.c:520)
27 ==9033==    by 0x524FF5C: GNUNET_SERVICE_run (service.c:1326)
28 ==9033==    by 0x4054F4: main (gnunet-service-transport.c:2644)
29 ==9033==  Address 0x6edaec0 is 24 bytes inside a block of size 64 free'd
30 ==9033==    at 0x4C2130F: free (vg_replace_malloc.c:323)
31 ==9033==    by 0x523453A: GNUNET_xfree_ (common_allocation.c:109)
32 ==9033==    by 0x403DC8: disconnect_neighbour (gnunet-service-transport.c:1885)
33 ==9033==    by 0x4042EE: plugin_env_receive (gnunet-service-transport.c:2057)
34 ==9033==    by 0x7287643: disconnect_session (plugin_transport_tcp.c:831)
35 ==9033==    by 0x7289539: disconnect_notify (plugin_transport_tcp.c:1919)
36 ==9033==    by 0x524BE24: ??? (server.c:645)
37 ==9033==    by 0x524C040: ??? (server.c:752)
38 ==9033==    by 0x5245734: ??? (network.c:810)
39 ==9033==    by 0x5245881: ??? (network.c:850)
40 ==9033==    by 0x524A497: ??? (scheduler.c:425)
41 ==9033==    by 0x524A77A: GNUNET_SCHEDULER_run (scheduler.c:520)
42 ==9033==
43
44
45 ==9033== Invalid write of size 4
46 ==9033==    at 0x404308: plugin_env_receive (gnunet-service-transport.c:2061)
47 ==9033==    by 0x7287643: disconnect_session (plugin_transport_tcp.c:831)
48 ==9033==    by 0x7289539: disconnect_notify (plugin_transport_tcp.c:1919)
49 ==9033==    by 0x524BE24: ??? (server.c:645)
50 ==9033==    by 0x524C040: ??? (server.c:752)
51 ==9033==    by 0x5245734: ??? (network.c:810)
52 ==9033==    by 0x5245881: ??? (network.c:850)
53 ==9033==    by 0x524A497: ??? (scheduler.c:425)
54 ==9033==    by 0x524A77A: GNUNET_SCHEDULER_run (scheduler.c:520)
55 ==9033==    by 0x524FF5C: GNUNET_SERVICE_run (service.c:1326)
56 ==9033==    by 0x4054F4: main (gnunet-service-transport.c:2644)
57 ==9033==  Address 0x6edaed8 is 48 bytes inside a block of size 64 free'd
58 ==9033==    at 0x4C2130F: free (vg_replace_malloc.c:323)
59 ==9033==    by 0x523453A: GNUNET_xfree_ (common_allocation.c:109)
60 ==9033==    by 0x403DC8: disconnect_neighbour (gnunet-service-transport.c:1885)
61 ==9033==    by 0x4042EE: plugin_env_receive (gnunet-service-transport.c:2057)
62 ==9033==    by 0x7287643: disconnect_session (plugin_transport_tcp.c:831)
63 ==9033==    by 0x7289539: disconnect_notify (plugin_transport_tcp.c:1919)
64 ==9033==    by 0x524BE24: ??? (server.c:645)
65 ==9033==    by 0x524C040: ??? (server.c:752)
66 ==9033==    by 0x5245734: ??? (network.c:810)
67 ==9033==    by 0x5245881: ??? (network.c:850)
68 ==9033==    by 0x524A497: ??? (scheduler.c:425)
69 ==9033==    by 0x524A77A: GNUNET_SCHEDULER_run (scheduler.c:520)
70 ==9033==
71
72
73
74 CORE:
75 * fails non-deterministically with empty /tmp directory
76
77
78
79 Util:
80 * improve disk API [Nils] (Nils, is this done? -Christian)
81 * Windows: use events instead of pipes to signal select()s [Nils]
82 * only connect() sockets that are ready (select()) [Nils]
83   [On W32, we need to select after calling socket before
84    doing connect etc.]
85
86 TESTCASES WANTED:
87 For these functions, it would be nice if we had testcases ("make check")
88 that would cause them to be executed and check that they are working:
89 * gnunet-service-peerinfo:
90   - change_host_trust / flush_trust 
91   - remove_garbage / 
92   - discard_hosts_helper / cron_clean_data_hosts
93 * gnunet-service-transport:
94   - try_unvalidated_addresses
95   - lookup_address_callback
96   - lookup_hello_callback
97   - plugin_env_lookup_address
98   - notify_clients_disconnect
99   - list_validated_addresses
100   - cleanup_validation
101   - disconnect_neighbour
102   - handle_set_quota
103 * plugin_transport_tcp.c:
104   - tcp_plugin_cancel
105   - tcp_plugin_address_pretty_printer / append_port
106   - tcp_plugin_set_receive_quota
107   - delayed_done
108 * transport_api:
109   - GNUNET_TRANSPORT_set_qutoa / send_set_quota
110   - hello_wait_timeout 
111   - transmit_ready
112   - transmit_timeout
113   - remove_from_any_list / remove_neighbour
114   - GNUNET_TRANSPORT_notify_transmit_ready_cancel
115 * core_api:
116   - timeout_request
117   - solicit_traffic / copy_and_free
118   - GNUNET_CORE_peer_configure / produce_configure_message
119 * gnunet-service-core:
120   - update_window
121   - find_client
122   - handle_client_request_configure
123   - set_key_retry_task
124   - align_and_deliver
125   - handle_transport_notify_disconnect
126 * hostlist (everything)
127 * topology (everything)
128
129
130
131 PHASE #2: (Goal: recover basic file-sharing functionality)
132
133 Datastores:
134 * implement sqlite-based sqstore/datastore service
135   + implement service (datastore + talks to plugin)
136   + implement library (talks to service)
137   + implement sqlite plugin (talks to DB)
138   + fix testcases (make them use CPS, complete their inner workings...)
139 * implement sqlite-based dstore services
140   + design API
141   + implement library (talks to service)
142   + implement service (talks to plugin)
143   + implement sqlite plugin (talks to DB)
144
145 Applications:
146 * DHT, DV
147 * FS / fs-libs
148
149
150
151 PHASE #3: (Goal: ready for pre-release) [completion-goal: end of 2009]
152
153 * testing
154 * setup
155 * gtk, qt GUIs
156 * tbench
157 * tracekit
158 * vpn
159
160 Transports:
161 * UDP backend (need LIBRARY to support (de)fragmentation!)
162 * HTTP backend
163 * Testing:
164   + Testcases for set_quota, timeouts, disconnects, transmit_ready_cancel
165   + Better coverage of gnunet-service-transport (HELLO validation)
166   + direct test of plugins compliance to plugin API
167
168 Databases:
169 * sqlite, mysql & postgres backend
170
171
172
173 Minor TODO items:
174 * UTIL:
175   - crypto_hash: use libgcrypt (supports SHA-512 since 2003)
176   - container_bloomfilter: improve efficiency (see FIXME)
177 * SERVER:
178   - inefficient memmove
179 * TRANSPORT:
180   - transport_api: support forcing disconnects through low quotas!
181     (required for working F2F support!)
182   - API: consider having core provide deadline information for each message
183     (likely important for DV plugin which wants to loop back!)
184   - implement transport API to pretty-print transport address 
185     + transport_api extension (API extension!)
186     + service-transport extension (protocol extension)
187   - add calls to statistics in various places
188   - implement gnunet-transport (transport configurator / tester)
189   - UPnP-based IP detection
190     (Note: build library always, build service when libxml2/etc. are available)
191   - instantly filter addresses from *other* peers that 
192     are *equal* to our own address + port (i.e., localhost:2086).  We 
193     no longer filter those for outgoing (helps with loopback testing
194     and keeps the code clean), but we should filter strictly *impossible*
195     incoming addresses!  This is for efficiency, not correctness.
196   - We currently are happy to take any address told to us in a WELCOME
197     to our set of addresses; we should have some minimal threshold-based
198     scheme, limiting both the total number of addresses that we accept 
199     this way as well as requiring multiple confirmations; also, we
200     should possibly try to confirm that the given address works for
201     us ourselves (loopback-style) before adding it to the list
202     [SECURITY issue]
203     + we may be able to simplify WELCOME messages (no need to add 
204       addresses there anymore, but may help to learn them there anyway...).
205     + we probably want some kind of voting/counting for learning IP addresses
206       (maybe including IP addresses in ads proportional to how often others
207        report them? we at least need some protection against >64k HELLOs!),
208     + provide a way to give the user a list of "learned" IP addresses and
209       a way to easily "veto" addresses off the list!
210       => If MiM attacker uses vetoed address, blacklist the specific IP for
211          the presumed neighbour!
212   - not sure current way of doing ACKs works well-enough 
213     with unreliable transports where the ACK maybe lost;
214     the "is_new" check would then possibly prevent future
215     ACKs to be delivered, all while we're happily 
216     receiving messages from that peer!  Worse, the other
217     peer won't generate another ACK since it thinks we're
218     connected just fine...
219     Key questions:
220     + How necessary is ACKing in the first place? (alternatives?)
221     + Should we transmit ACKs in response to every HELLO? (would that 
222       fully address the problem?)
223   - latency measurements implemented in the transport
224     plugins makes it only work for bi-di transports
225     and results in code replication
226   - should latency be included in the ReceiveCallback and
227     NotifyConnect or passed on request?
228   - FIXME's with latency being simply set to 0 in a few places
229 * SETUP:
230   - auto-generate "defaults.conf" using gnunet-setup from "config.scm"
231   - integrate all options into "config.scm"
232   - change config-file writing to exclude options set to default values
233 * ARM:
234   - implement exponential back-off for service restarts
235   - better tracking of which config changes actually need to cause process restarts by ARM.
236   - have way to specify dependencies between services (to manage ARM restarts better)
237   - client-API is inefficient since it opens a TCP connection per service that is started
238     (instead of re-using connections).
239 * CORE: 
240   - code currently notifies clients about "encrypted" connections being up well before
241     we get the encrypted PONG; sometimes this may be OK (for topology killing
242     unwanted connnections), but of course not in general.  I suspect we want
243     to signal on PONG and have topology hook directly into transport to
244     kill plaintext connections before they have a chance to become encrypted
245     (may require minor hack in transport API)
246 * PEERINFO:
247   - have gnunet-peerinfo print actual host addresses again
248   - add option to gnunet-peerinfo to modify trust value
249 * POSTGRES-DB:
250   - finish postgres implementation; simplify other SQLs using new stats
251 * HTTPS transport
252   - PolariSSL for MHD?
253   - https integration
254 * GAP improvements:
255   - active reply route caching design & implementation of service,
256     gap extension!
257 * HOSTLIST:
258   - implement advertising of hostlist URL
259   - implement learning of hostlist URLs
260
261
262
263 => PRE-RELEASE
264
265 PHASE #4: [completion-goal: mid 2010]
266 * Documentation
267 * new webpage
268
269
270
271
272 Stuff to remember:
273 * Features eliminated from util:
274   - threading (goal: good riddance!)
275   - complex logging features [ectx-passing, target-kinds] (goal: good riddance!)
276   - complex configuration features [defaults, notifications] (goal: good riddance!)
277   - network traffic monitors (goal: eliminate)
278   - IPC semaphores (goal: d-bus? / eliminate?)
279   - second timers
280   - DNS lookup (goal: have async service; issue: still need synchronous resolution in places, current code may not be portable)
281   => code shrunk from 61 files to 34, 22k LOC to 15k LOC, 470k to 330k (with symbols)
282 * New features in util:
283   - scheduler
284   - service and program boot-strap code
285 * Major changes in util:
286   - more expressive server (replaces selector)
287 * Open questions: 
288   - how to integrate scheduler with GTK event loop!
289
290
291
292 Test coverage:
293 * UTIL      : 78.7%
294 * HELLO     : 93.7%
295 * ARM       : 69.9%
296 * RESOLVER  : 60.4%
297 * STATISTICS: 82.8%
298 * PEERINFO  : 71.5%
299 * TRANSPORT : 70.9%
300 * CORE      : 65.8%
301 ===================
302 * TOTAL     : 74.9%
303
304 Not yet tested:
305 * HOSTLIST  :  0.0%
306 * TOPOLOGY  :  0.0%