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