104-short-descriptors.txt 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. Filename: 104-short-descriptors.txt
  2. Title: Long and Short Router Descriptors
  3. Version: $Revision$
  4. Last-Modified: $Date$
  5. Author: Nick Mathewson
  6. Created:
  7. Status: Open
  8. Overview:
  9. This document proposes moving unused-by-clients information from regular
  10. router descriptors into a special "long form" router descriptor.
  11. It presents options; it is not yet a complete proposal.
  12. Proposal:
  13. Some of the costliest fields in the current directory protocol are ones
  14. that no client actually uses. In particular, the "read-history" and
  15. "write-history" fields are used only by the authorities for monitoring the
  16. status of the network. If we took them out, the size of a compressed list
  17. of all the routers would fall by about 60%. (No other disposable field
  18. would save more than 2%.)
  19. One possible solution here is that routers should generate and upload a
  20. short-form and long-form descriptor. Only the short-form descriptor should
  21. ever be used by anybody for routing. The long-form descriptor should be
  22. used only for analytics and other tools. (If we allowed people to route
  23. with long descriptors, we'd have to ensure that they stayed in sync with
  24. the short ones somehow. So let's not do that.) We can ensure that the
  25. short descriptors are used by only recommending those in the network
  26. statuses.
  27. Another possible solution would be to drop these fields from descriptors,
  28. and have them uploaded as a part of a separate "bandwidth report" to the
  29. authorities. This could help prevent the mistake of using long descriptors
  30. in the place of short ones. It could also be generalized later to be an
  31. overall status report, to include sanitized GeoIP information and whatever
  32. else comes up.
  33. Other disposable fields:
  34. Clients don't need these fields, but removing them doesn't help bandwidth
  35. enough to be worthwhile.
  36. contact (save about 1%)
  37. fingerprint (save about 3%)
  38. We could represent these fields more succinctly, but removing them would
  39. only save 1%. (!)
  40. reject
  41. accept
  42. (Apparently, exit polices are highly compressible.)
  43. [Does size-on-disk matter to anybody? Some clients and servers don't
  44. have much disk, or have really slow disk (e.g. USB). And we don't
  45. store caches compressed right now. -RD]
  46. Issues:
  47. Indexing long descriptor or bandwidth reports presents an issue: right now
  48. the way to make sure you have the same copy of a descriptor as everyone
  49. else is to request the descriptor by its digest, and to make sure that
  50. the digest you request is the one that the authorities like.
  51. Authorities should presumably list the digests of short descriptors, since
  52. that's what most everybody will be using. Including a second digest for
  53. long descriptors/bandwidth reports in the networkstatus would only bloat it
  54. with information nobody wants.
  55. Possible solutions are:
  56. 1) Drop the property that you can be sure of having the same long
  57. descriptor as others. This seems unoptimal, but if nobody caches
  58. long descriptors so you have to go to the authority to get them,
  59. maybe it's not so bad.
  60. 2) Have a separate extra-information-status that also gets generated by the
  61. authorities; use it to tell which long descriptors others have. Also a
  62. pain.
  63. 3) Have short descriptors include a hash of the corresponding long
  64. descriptor/extra-info. This would keep the same order of magnitude
  65. performance increase (~59.2% savings as opposed to 61% savings.)
  66. This would require longdesc/extra-info downloaders to fetch
  67. router data before they could know which longdescs/extra info to fetch.
  68. 4) Have each authority make a signed concatenated "extra info" document,
  69. and hope we never need to reconcile them.
  70. 5) ????
  71. Migration:
  72. For long/short descriptor approach:
  73. * First:
  74. * Authorities should accept both, now, and silently drop short
  75. descriptors.
  76. * Routers should upload both once authorities accept them.
  77. * There should be a "long descriptor" url named
  78. /tor/server/fp-detailed/ and the current "normal" URL.
  79. Authorities should serve long descriptors from both URLs.
  80. There's no such thing as asking for a long descriptor by
  81. its digest.
  82. * Once tools that want long descriptors support fetching them from the
  83. "long descriptor" URL:
  84. * Have authorities remember short descriptors, and serve them from the
  85. 'normal' URL.
  86. These tools include:
  87. lefkada's exit.py script.
  88. tor26's noreply script and general directory cache.
  89. https://nighteffect.us/tns/ for its graphs
  90. and check with or-talk for the rest, once it's time.
  91. For bandwidth info approach:
  92. * First:
  93. * Rename it; it won't be just bandwidth forever.
  94. * Authorities should accept bandwidth info
  95. * Routers should upload bandwidth info once authorities accept it.
  96. * There should be a way to download bandwidth info
  97. * Once tools that want bandwidth info support fetching it:
  98. * Have routers stop including bandwidth info in their router
  99. descriptors.