Module v1

Source
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.
PowManagerStateRecord 🔒
On-disk record of PowManager state.
RendRequestOrdByEffort 🔒
Wrapper around RendRequest that implements std::cmp::Ord to sort by Effort.
RendRequestReceiver 🔒
Implements Stream for incoming RendRequests, using a priority queue system to dequeue high-Effort requests first.
RendRequestReceiverInner 🔒
Inner implementation for RendRequestReceiver.
SeedsForTimePeriod 🔒
Information about the current and previous Seed for a given TimePeriod.
State 🔒
Internal state for PowManager.

Enums§

InternalPowError 🔒
Internal error within the PoW subsystem.
PowSolveError 🔒
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.