Skip to main content

Module types

Module types 

Source
Expand description

Basic types used by the v1 client puzzle

Re-exportsยง

use crate::pk::HsBlindId; ๐Ÿ”’
use crate::pow::v1::err::SolutionErrorV1; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use tor_bytes::EncodeResult; ๐Ÿ”’
use tor_bytes::Readable; ๐Ÿ”’
use tor_bytes::Reader; ๐Ÿ”’
use tor_bytes::Writeable; ๐Ÿ”’
use tor_bytes::Writer; ๐Ÿ”’
use rand::prelude::*; ๐Ÿ”’

Macrosยง

impl_readable_writeable_newtype ๐Ÿ”’
Generate Readable and Writeable implementations for trivial newtype wrappers

Structsยง

Effort
Effort setting, a u32 value with linear scale
Instance
One instance of this proof-of-work puzzle
Nonce
Generated randomly by solvers and included in the solution
Seed
The random portion of a challenge, distributed through HsDir
SeedHead
A short seed prefix used in solutions to reference the complete seed
Solution
One potential solution to some puzzle Instance

Enumsยง

ParseSeedError
Error when converting a string to a Seed.

Constantsยง

NONCE_LEN
Length of the nonce value generated by clients and included in the solution
SEED_HEAD_LEN
Length of a seed prefix used to identify the entire seed
SEED_LEN
Length of the random seed generated by servers and included in HsDir