Nick Mathewson
d25873ae9c
Use a digestmap_t to speed up router_get_by_digest, which was previously a bottleneck (~~27% CPU)
...
svn:r5280
2005-10-18 20:13:09 +00:00
Nick Mathewson
3347c1741d
Refactor routerlist access slightly: always use router_get_by_routerlist(); change its interface; add modifier functions to add/remove elements from the current routerlist (so we can add indices).
...
svn:r5276
2005-10-18 17:43:54 +00:00
Nick Mathewson
6101468cbe
Enable trivial "download by descriptor digest" functionality.
...
svn:r5250
2005-10-14 04:56:20 +00:00
Nick Mathewson
aac738d2be
When no descriptors changed, do not send a NEWDESC event.
...
svn:r5244
2005-10-12 19:41:16 +00:00
Nick Mathewson
972b7512c7
authorities do not replace server descriptors where nothing semantically relevant has changed since the last upload.
...
svn:r5240
2005-10-12 18:25:25 +00:00
Nick Mathewson
fd9bfef13b
Funny. I could have sworn it compiled this morning when I checked it in.
...
svn:r5239
2005-10-12 17:16:25 +00:00
Nick Mathewson
a7ca56b537
More work towards a sane digest-based liveness testing.
...
svn:r5238
2005-10-12 13:49:13 +00:00
Nick Mathewson
2b3a7b818f
Add an as-yet-unused "EXTENDED" flag to SETEVENTS to indicate that the client can handle extra labeled info in its events. Add moreinfo to the "what is ready for downloading" msg so we can investigate digest-related download rules
...
svn:r5237
2005-10-12 04:31:44 +00:00
Nick Mathewson
08e4f132a8
add some docs; if warn_if_unnamed is 0, really do not warn.
...
svn:r5234
2005-10-11 01:57:28 +00:00
Nick Mathewson
d7b04a8788
do not try to download a routerdesc if we would immediately reject it as obsolete.
...
svn:r5225
2005-10-07 22:00:09 +00:00
Nick Mathewson
cc35e1720f
Using RAND_pseudo_bytes instead of RAND_bytes is an accident waiting to happen, and does not really speed us up much when we do it. So stop doing it.
...
svn:r5210
2005-10-06 22:18:01 +00:00
Nick Mathewson
56be5a9706
I *knew* something was wrong here. Flip some comparison operators and make download-rate-limiting sane again.
...
svn:r5201
2005-10-05 22:36:18 +00:00
Nick Mathewson
1ebbaf5c3a
improve INFO-level logging for directory downloads. This is still too chatty, but it will help us analyze things.
...
svn:r5197
2005-10-05 20:45:18 +00:00
Nick Mathewson
370e4abdc9
replace former relaunches of directory downloads with reset of failure count and relaunch of status downloads. Fix memory leak in trusted_dir_server_t. Reset "last download attempted" time when resetting failure counts.
...
svn:r5195
2005-10-05 05:03:52 +00:00
Nick Mathewson
509de69a7e
reset warning flags on SIGHUP. arma: is this everything?
...
svn:r5192
2005-10-05 02:20:46 +00:00
Nick Mathewson
8434595584
Fix verbose compiler warnings, including one in routerlist.c that would have been an actual error. Normalize whitespace. Enforce convention that "address" is a hostname and "addr" is an IPv4 address.
...
svn:r5190
2005-10-05 02:06:36 +00:00
Nick Mathewson
0924094042
resolve some directory-related XXXXs; downgrade naming conflict messages from WARN to INFO for non-authorities; do not repeat naming conflict messages.
...
svn:r5189
2005-10-05 01:53:44 +00:00
Nick Mathewson
1223310b69
Downgrade noisy log messages in preparation for an alpha release.
...
svn:r5188
2005-10-05 01:27:08 +00:00
Nick Mathewson
61ea516885
Check for named servers when looking them up by nickname;
...
warn when we'recalling a non-named server by its nickname;
don't warn twice about the same name.
Fix a bug in routers_update_status_from_networkstatus that made nearly
all clients never update routerinfo_t.is_named.
Try to list MyFamily elements by key, not by nickname.
Only warn about names that we generated ourself, or got from the local
user.
On TLS handshake, only check the other router's nickname against its
expected nickname if is_named is set.
svn:r5185
2005-10-04 22:23:31 +00:00
Nick Mathewson
2d203fdcf3
link nicknames to trusted directory servers; log these nicknames when mentioning servers; also, when we get a naming conflict; log which nicknames or keys are supposed to bind.
...
svn:r5184
2005-10-04 21:21:09 +00:00
Nick Mathewson
b10df0d595
cosmetic fix: only have one local to hold smartlist_len(downloadable), not too.
...
svn:r5183
2005-10-04 20:18:26 +00:00
Nick Mathewson
808e584a87
remove a never-used smartlist in routerlist.c
...
svn:r5176
2005-09-30 21:38:45 +00:00
Nick Mathewson
23864ad423
Try to hunt down a few more leaks
...
svn:r5172
2005-09-30 21:22:25 +00:00
Nick Mathewson
5333a3b838
fix a small filename leak
...
svn:r5170
2005-09-30 21:11:22 +00:00
Nick Mathewson
8408006318
fix a memory leak on exit in routerlist.c
...
svn:r5169
2005-09-30 21:04:52 +00:00
Nick Mathewson
fc3c0197f9
Resolve several DOCDOCs. Make non-mirrors only launch routerdesc downloads when they have more than 16 router descriptors to download, or when 10 minutes have passed since the last download.
...
svn:r5166
2005-09-30 20:04:55 +00:00
Roger Dingledine
8fc9330686
fix typo
...
svn:r5151
2005-09-29 23:03:34 +00:00
Nick Mathewson
abb8576538
But, of course, mirrors should get the most up-to-date server in any case.
...
svn:r5135
2005-09-23 21:33:59 +00:00
Nick Mathewson
b726507d36
Log even less verbosely. Also, do not download old (frequently-updating) servers more than once every 2 hours.
...
svn:r5134
2005-09-23 21:25:29 +00:00
Nick Mathewson
18a0a0e458
Oops. It looks like some old GCCs dislike #if inside a macro argument.
...
svn:r5131
2005-09-23 20:31:07 +00:00
Nick Mathewson
c345dab3bd
Fix logic error (people who ask authorities should never split; others should always split). Also, fix timing error in main.c so retries really happen.
...
svn:r5127
2005-09-23 18:17:37 +00:00
Nick Mathewson
a1f1c4bf6b
Re-enable autosplitting, but authorities and mirrors should not do it, and make the cutoff higher than 1.
...
svn:r5126
2005-09-23 18:08:31 +00:00
Nick Mathewson
f995edd516
Fix at least one overzealous download bug. (tor_malloc_zero new local_routerstatus_t objs); add a pile of logs back in; probe every 10sec; never autolaunch on failure. Let us see if this works better.
...
svn:r5125
2005-09-23 18:05:14 +00:00
Nick Mathewson
9050480339
Fix some compiler warnings
...
svn:r5124
2005-09-23 17:11:20 +00:00
Roger Dingledine
2d6b36a001
get rid of a noisy debug log
...
svn:r5111
2005-09-22 20:51:45 +00:00
Nick Mathewson
cdc912714e
I love the smell of C in the morning. Make router-download rules smarter (download more so long as we dont duplicate existing requests; relaunch at staggered intervals); relaunch one a minute or on failure; reset 60 minutes; always open 3 requests if we can; add authority opinion to networkstatus; make naming rule correct. There is a remaining bug where we retry servers too quickly; We need to look at that harder.
...
svn:r5110
2005-09-22 06:34:29 +00:00
Nick Mathewson
6693031947
Use a separate type for "local view of router status". Also, even though I told arma there was no need, replace an ugly O ( n lg n ) algorithm with a nice O ( n ) algorithm when stepping through servers. Some ugliness is just too bad to stand.
...
svn:r5109
2005-09-22 01:51:14 +00:00
Nick Mathewson
72915546cd
Only check versions from versioning authdirs.
...
svn:r5101
2005-09-21 02:38:51 +00:00
Nick Mathewson
20b9111266
Implement new version handling code.
...
svn:r5100
2005-09-21 00:41:06 +00:00
Nick Mathewson
837b223c8c
remove some debugging garbage
...
svn:r5092
2005-09-18 04:32:58 +00:00
Nick Mathewson
283032960d
Make give-up-on-failure actually work: it seems the servers gave me a real test case.
...
svn:r5091
2005-09-18 04:15:39 +00:00
Nick Mathewson
d118d5069a
Prevent a "try forever to download an unobtainable descriptor" bug. Still remaining: the "give up forever" bug.
...
svn:r5090
2005-09-18 02:51:12 +00:00
Nick Mathewson
87f6d526fe
Refactor new directory code a bit. Keep a big list of rolled-up router status info, including # of download failures (not yet used). Update this list from networkstatuses when they arrive, then update routers from this list. Only download 128 routers at a time, to avoid gargantuan URLs.
...
svn:r5089
2005-09-18 02:24:42 +00:00
Nick Mathewson
1fbe499bfe
Remove a bunch of #if0d code that I no longer need to look at.
...
svn:r5083
2005-09-16 16:47:20 +00:00
Nick Mathewson
6d15a73548
Resolve/expand some XXXXs and improve a log message or two
...
svn:r5082
2005-09-16 16:41:45 +00:00
Nick Mathewson
538740e362
Fix the never-marked-anything-as-running bug. Now Tor builds circuts again. Woo.
...
svn:r5080
2005-09-16 04:53:28 +00:00
Nick Mathewson
1a786a297f
Fix the confusing bug where we were downloading only the first n/2-1 of the servers we actually wanted.
...
svn:r5078
2005-09-16 04:43:21 +00:00
Nick Mathewson
05bab28c7d
Add some (notice, for now) log messages that imply confusing things are happening.
...
svn:r5076
2005-09-15 21:11:48 +00:00
Nick Mathewson
e72e76cad6
Make authdirs smarter. Reject/invalidate by key and IP. Remember that not every authdir has to be a naming authdir.
...
svn:r5074
2005-09-15 14:39:05 +00:00
Nick Mathewson
ed21abfe87
And some documentation before bed.
...
svn:r5073
2005-09-15 06:15:31 +00:00