Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement PRIVCOUNT_HSDIR_CACHE_STORE and counters #336

Closed
teor2345 opened this issue Jun 5, 2017 · 2 comments
Closed

Implement PRIVCOUNT_HSDIR_CACHE_STORE and counters #336

teor2345 opened this issue Jun 5, 2017 · 2 comments
Assignees

Comments

Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
@teor2345
Copy link
Collaborator

@teor2345 teor2345 commented Jun 5, 2017

We can produce the following statistics without storing HS addresses in RAM.
This is safer and simpler (because we don't need to decide on rotation periods).

  • How many descriptors uploaded per HSDir?
  • How many bytes ~~~/cells~~~ per descriptor? (Histogram)
  • How many descriptor bytes ~~~/cells~~~ per HSDir?
  • How many intro points per descriptor? (Histogram, HSv2 only)
  • How many failed descriptor uploads per HSDir?

Less interesting:

  • Circuit counts
  • Circuit lifetimes
  • Ratios? Connections? (No Client IPs)

Advanced (needs circuit info):
Like Tor trac #13792:

  • Upload time: Time of service upload

Advanced (needs storage in RAM?):

  • How many descriptor versions per HSDir? (Histogram, needs storage for HSv2)
  • What is the delay between version uploads?
  • Is the same version ever uploaded twice? Are there gaps between versions?
  • What is the inter-upload delay time?
  • How many uploads per hidden service? (Histogram)
  • Tor trac #13195:
    • How many unique hidden services are uploaded? (Histogram?)
  • Tor trac #15272, #13208, #13792:
    • What is the intro point churn rate?
    • How often do we change our IPs from service-side? How long do we keep a typical IP?
    • How often do we re-upload?

Research (needs to be turned into a series of statistical questions):

@teor2345 teor2345 added this to the 1.2.0/2.0.0 - Onion Service Stats milestone Jun 5, 2017
@teor2345 teor2345 self-assigned this Jun 5, 2017
@teor2345 teor2345 added this to the 1.2.0 - HSDir Upload Stats milestone Jun 5, 2017
@teor2345 teor2345 removed this from the 1.3.0 - More Onion Service Stats milestone Jun 5, 2017
@teor2345
Copy link
Collaborator Author

@teor2345 teor2345 commented Jun 7, 2017

It is not easy to find the circuit used to upload a particular descriptor. So we won't have any cell counts.

HSv2 descriptors do not have a version number: instead, they have a creation timestamp. So we can't do version histograms for v2 without storing descriptor creation times, and then creating our own order.

It also requires some work to produce a hidden service address from a v2 descriptor: the address is in the descriptor, but not parsed by existing code. Maybe we should leave it that way, and use the descriptor ID instead. I'll document the differences.

@teor2345 teor2345 changed the title Implement HSDir upload statistics Implement HSDir descriptor cache addition statistics Jun 7, 2017
@teor2345 teor2345 changed the title Implement HSDir descriptor cache addition statistics Implement HSDir descriptor cache add statistics Jun 7, 2017
teor2345 added a commit to teor2345/tor-old that referenced this issue Jun 7, 2017
teor2345 added a commit to teor2345/tor-old that referenced this issue Jun 7, 2017
teor2345 added a commit to teor2345/tor-old that referenced this issue Jun 7, 2017
This event is emitted when a HS descriptor is uploaded to a v2 or v3 HSDir.
It contains the descriptor ID (v2) or blinded public key (v3), intro point
count (v2 only), times, sizes, and caching and validation information.

It does not contain the hidden service address, or any circuit information.

Part of privcount/privcount#336.
teor2345 added a commit to teor2345/tor-privcount that referenced this issue Jun 8, 2017
This event is emitted when a HS descriptor is uploaded to a v2 or v3 HSDir.
It contains the descriptor ID (v2) or blinded public key (v3), intro point
count (v2 only), times, sizes, and caching and validation information.

It does not contain the hidden service address, or any circuit information.

Part of privcount/privcount#336.
teor2345 added a commit to teor2345/tor-old that referenced this issue Jun 8, 2017
This event is emitted when a HS descriptor is uploaded to a v2 or v3 HSDir.
It contains the descriptor ID (v2) or blinded public key (v3), intro point
count (v2 only), times, sizes, and caching and validation information.

It does not contain the hidden service address, or any circuit information.

Part of privcount/privcount#336.
teor2345 added a commit to teor2345/tor-old that referenced this issue Jun 8, 2017
This event is emitted when a HS descriptor is uploaded to a v2 or v3 HSDir.
It contains the descriptor ID (v2) or blinded public key (v3), intro point
count (v2 only), times, sizes, and caching and validation information.

It does not contain the hidden service address, or any circuit information.

Part of privcount/privcount#336.
teor2345 added a commit to teor2345/tor-old that referenced this issue Jun 8, 2017
This event is emitted when a HS descriptor is uploaded to a v2 or v3 HSDir.
It contains the descriptor ID (v2) or blinded public key (v3), intro point
count (v2 only), times, sizes, and caching and validation information.

It does not contain the hidden service address, or any circuit information.

Part of privcount/privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 8, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 9, 2017
teor2345 added a commit to teor2345/tor-old that referenced this issue Jun 9, 2017
teor2345 added a commit to teor2345/tor-old that referenced this issue Jun 9, 2017
teor2345 added a commit to teor2345/tor-old that referenced this issue Jun 9, 2017
This event is emitted when a HS descriptor is uploaded to a v2 or v3 HSDir.
It contains the onion address (v2) or blinded public key (v3), intro point
count (v2 only), client auth flag, times, sizes, and caching and validation
information.

It does not contain any circuit information.

Part of privcount/privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 9, 2017
teor2345 added a commit to teor2345/tor-old that referenced this issue Jun 14, 2017
This event is emitted when a HS descriptor is uploaded to a v2 or v3 HSDir.
It contains the onion address (v2) or blinded public key (v3), intro point
count (v2 only), client auth flag, times, sizes, and caching and validation
information.

It does not contain any circuit information.

Part of privcount/privcount#336.
teor2345 added a commit to teor2345/tor-old that referenced this issue Jun 14, 2017
This event is emitted when a HS descriptor is uploaded to a v2 or v3 HSDir.
It contains the onion address (v2) or blinded public key (v3), intro point
count (v2 only), client auth flag, times, sizes, and caching and validation
information.

It does not contain any circuit information.

Part of privcount/privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 14, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 14, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 14, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 14, 2017
These counters count:
* descriptor stores
* intro point counts (HSv2 only)
* descriptor and intro point bytes
* descriptor upload delays (HSv2 only), and
* descriptor revisions (HSv3 only).

In the following categories:
* cache add/reject,
* cache new/existing,
* cache action reason,
* client auth/no client auth (HSv2 only),

Requires a PrivCount Tor Patch that supports
EVENT_PRIVCOUNT_HSDIR_CACHE_STORED.

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 14, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 22, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 22, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 22, 2017
teor2345 added a commit to teor2345/tor-old that referenced this issue Jun 23, 2017
This event is emitted when a HS descriptor is uploaded to a v2 or v3 HSDir.
It contains the onion address (v2) or blinded public key (v3), intro point
fingerprints and count (v2 only), client auth flag, times, sizes, and caching
and validation information.

It does not contain any circuit information.

Part of privcount/privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
Using tagged fields for new counters is part of privcount#256.

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
These counters count:
* descriptor stores
* intro point counts (HSv2 only)
* descriptor and intro point bytes
* descriptor upload delays (HSv2 only), and
* descriptor revisions (HSv3 only).

In the following categories:
* cache add/reject,
* cache new/existing,
* cache action reason,
* client auth/no client auth (HSv2 only).

Requires a PrivCount Tor Patch that supports
EVENT_PRIVCOUNT_HSDIR_CACHE_STORE.

Creating counter variants from template strings is part of privcount#229.

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
Add privcount/tools/add_counter.sh for initial counter configs.
(Bins for multi-bin counters need to be added manually.)

Fix the counter match tests for template counters, update to privcount#347.

Update test documentation and comments for HSDirStore counters.

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
With fingerprints, HS Store events can be up to 1kB long.
So we now warn at 2kB, reject at 20kB.
(Was warn at 1.6kB, reject at 16kB.)

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
Using tagged fields for new counters is part of privcount#256.

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
These counters count:
* descriptor stores
* intro point counts (HSv2 only)
* descriptor and intro point bytes
* descriptor upload delays (HSv2 only), and
* descriptor revisions (HSv3 only).

In the following categories:
* cache add/reject,
* cache new/existing,
* cache action reason,
* client auth/no client auth (HSv2 only).

Requires a PrivCount Tor Patch that supports
EVENT_PRIVCOUNT_HSDIR_CACHE_STORE.

Creating counter variants from template strings is part of privcount#229.

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
Add privcount/tools/add_counter.sh for initial counter configs.
(Bins for multi-bin counters need to be added manually.)

Fix the counter match tests for template counters, update to privcount#347.

Update test documentation and comments for HSDirStore counters.

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
With fingerprints, HS Store events can be up to 1kB long.
So we now warn at 2kB, reject at 20kB.
(Was warn at 1.6kB, reject at 16kB.)

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 23, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 29, 2017
Using tagged fields for new counters is part of privcount#256.

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 29, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 29, 2017
These counters count:
* descriptor stores
* intro point counts (HSv2 only)
* descriptor and intro point bytes
* descriptor upload delays (HSv2 only), and
* descriptor revisions (HSv3 only).

In the following categories:
* cache add/reject,
* cache new/existing,
* cache action reason,
* client auth/no client auth (HSv2 only).

Requires a PrivCount Tor Patch that supports
EVENT_PRIVCOUNT_HSDIR_CACHE_STORE.

Creating counter variants from template strings is part of privcount#229.

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 29, 2017
Add privcount/tools/add_counter.sh for initial counter configs.
(Bins for multi-bin counters need to be added manually.)

Fix the counter match tests for template counters, update to privcount#347.

Update test documentation and comments for HSDirStore counters.

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 29, 2017
With fingerprints, HS Store events can be up to 1kB long.
So we now warn at 2kB, reject at 20kB.
(Was warn at 1.6kB, reject at 16kB.)

Part of privcount#336.
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 29, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jun 29, 2017
@teor2345
Copy link
Collaborator Author

@teor2345 teor2345 commented Jun 29, 2017

This was closed in ffebb3a, remaining work is in #367.

@teor2345 teor2345 closed this Jun 29, 2017
teor2345 added a commit to teor2345/privcount that referenced this issue Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment