Expand description
Code implementing version 1 proof-of-work for onion service hosts.
Spec links:
Structs§
- PowManager 🔒
- This is responsible for rotating Proof-of-Work seeds and doing verification of PoW solves.
- PowManager
State 🔒Record - On-disk record of
PowManager
state. - Rend
Request 🔒OrdBy Effort - Wrapper around
RendRequest
that implementsstd::cmp::Ord
to sort byEffort
. - Rend
Request 🔒Receiver - Implements
Stream
for incomingRendRequest
s, using a priority queue system to dequeue high-Effort
requests first. - Rend
Request 🔒Receiver Inner - Inner implementation for
RendRequestReceiver
. - Seeds
ForTime 🔒Period - Information about the current and previous
Seed
for a givenTimePeriod
. - State 🔒
- Internal state for
PowManager
.
Enums§
- Internal
PowError 🔒 - Internal error within the PoW subsystem.
- PowSolve
Error 🔒 - A PoW solve was invalid.
Constants§
- EXPIRATION_
TIME_ 🔒MINS_ MAX - Maximum seed expiration time in minutes. See: https://spec.torproject.org/hspow-spec/v1-equix.html#parameter-descriptor
- EXPIRATION_
TIME_ 🔒MINS_ MIN - Minimum seed expiration time in minutes. See: https://spec.torproject.org/hspow-spec/v1-equix.html#parameter-descriptor
- PUBLISHER_
UPDATE_ 🔒QUEUE_ DEPTH - Depth of the queue used to signal the publisher that it needs to update a given time period.
- SEED_
EARLY_ 🔒ROTATION_ TIME - How soon before a seed’s expiration time we should rotate it and publish a new seed.