Commit d38268a8 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Remove v0 hidden service statistics code.

The HSAuthorityRecordStats option was used to track statistics of overall
hidden service usage on the version 0 hidden service authorities. With the
version 2 hidden service directories being deployed and version 0
descriptors being phased out, these statistics are not as useful anymore.

Goodbye, you fine piece of software; my first major code contribution to
Tor.
parent 62c2a5a8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -83,6 +83,11 @@ Changes in version 0.2.2.6-alpha - 2009-11-19
    - Fix a memory leak on directory authorities during voting that was
      introduced in 0.2.2.1-alpha. Found via valgrind.

  o Removed features:
    - Remove the HSAuthorityRecordStats option that version 0 hidden
      service authorities could have used to track statistics of overall
      hidden service usage.


Changes in version 0.2.2.5-alpha - 2009-10-11
  Tor 0.2.2.5-alpha fixes a few compile problems in 0.2.2.4-alpha.
+0 −6
Original line number Diff line number Diff line
@@ -1197,12 +1197,6 @@ When this option is set in addition to \fBAuthoritativeDirectory\fP, Tor also
accepts and serves hidden service descriptors. (Default: 0)
.LP
.TP
\fBHSAuthorityRecordStats \fR\fB0\fR|\fB1\fR\fP
When this option is set in addition to \fBHSAuthoritativeDir\fP, Tor
periodically (every 15 minutes) writes statistics about hidden service
usage to a file \fBhsusage\fP  in its data directory. (Default: 0)
.LP
.TP
\fBHidServDirectoryV2 \fR\fB0\fR|\fB1\fR\fP
When this option is set, Tor accepts and serves v2 hidden service
descriptors. Setting DirPort is not required for this, because clients
+1 −5
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ static config_var_t _option_vars[] = {
  VAR("HiddenServiceAuthorizeClient",LINELIST_S,RendConfigLines, NULL),
  V(HidServAuth,                 LINELIST, NULL),
  V(HSAuthoritativeDir,          BOOL,     "0"),
  V(HSAuthorityRecordStats,      BOOL,     "0"),
  OBSOLETE("HSAuthorityRecordStats"),
  V(HttpProxy,                   STRING,   NULL),
  V(HttpProxyAuthenticator,      STRING,   NULL),
  V(HttpsProxy,                  STRING,   NULL),
@@ -3253,10 +3253,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
  if (options->AuthoritativeDir && options->ClientOnly)
    REJECT("Running as authoritative directory, but ClientOnly also set.");

  if (options->HSAuthorityRecordStats && !options->HSAuthoritativeDir)
    REJECT("HSAuthorityRecordStats is set but we're not running as "
           "a hidden service authority.");

  if (options->FetchDirInfoExtraEarly && !options->FetchDirInfoEarly)
    REJECT("FetchDirInfoExtraEarly requires that you also set "
           "FetchDirInfoEarly");
+0 −9
Original line number Diff line number Diff line
@@ -2950,18 +2950,9 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers,
        note_request("/tor/rendezvous?/", desc_len);
        /* need to send descp separately, because it may include NULs */
        connection_write_to_buf(descp, desc_len, TO_CONN(conn));
        /* report successful fetch to statistic */
        if (options->HSAuthorityRecordStats) {
          hs_usage_note_fetch_total(query, time(NULL));
          hs_usage_note_fetch_successful(query, time(NULL));
        }
        break;
      case 0: /* well-formed but not present */
        write_http_status_line(conn, 404, "Not found");
        /* report (unsuccessful) fetch to statistic */
        if (options->HSAuthorityRecordStats) {
          hs_usage_note_fetch_total(query, time(NULL));
        }
        break;
      case -1: /* not well-formed */
        write_http_status_line(conn, 400, "Bad request");
+0 −8
Original line number Diff line number Diff line
@@ -824,7 +824,6 @@ run_scheduled_events(time_t now)
  static time_t time_to_try_getting_descriptors = 0;
  static time_t time_to_reset_descriptor_failures = 0;
  static time_t time_to_add_entropy = 0;
  static time_t time_to_write_hs_statistics = 0;
  static time_t time_to_write_bridge_status_file = 0;
  static time_t time_to_downrate_stability = 0;
  static time_t time_to_save_stability = 0;
@@ -1165,12 +1164,6 @@ run_scheduled_events(time_t now)
    }
  }

  /** 10. write hidden service usage statistic to disk */
  if (options->HSAuthorityRecordStats && time_to_write_hs_statistics < now) {
    hs_usage_write_statistics_to_file(now);
#define WRITE_HSUSAGE_INTERVAL (30*60)
    time_to_write_hs_statistics = now+WRITE_HSUSAGE_INTERVAL;
  }
  /** 10b. write bridge networkstatus file to disk */
  if (options->BridgeAuthoritativeDir &&
      time_to_write_bridge_status_file < now) {
@@ -1979,7 +1972,6 @@ tor_free_all(int postfork)
  rend_cache_free_all();
  rend_service_authorization_free_all();
  rep_hist_free_all();
  hs_usage_free_all();
  dns_free_all();
  clear_pending_onions();
  circuit_free_all();
Loading