Structs§
- Cache
Builder - PowComputer
- Proof
OfWork Config - Proof
OfWork Problem - Proof
OfWork Solution - Target
Difficulty Manager - This is a data structure to cache the computed target difficulty of a adjustment period. Each element is indexed by the hash of the upper boundary block of the period.
Enums§
Constants§
Traits§
Functions§
- boundary_
to_ difficulty - Convert boundary to its original difficulty. Basically just
f(x) = 2^256 / x
. - compute_
inv_ x_ times_ 2_ pow_ 256_ floor - Compute [2^256 / x], where x >= 2 and x < 2^256.
- difficulty_
to_ boundary - Convert difficulty to the target boundary. Basically just
f(x) = 2^256 / x
. - nonce_
to_ lower_ bound - pow_
hash_ to_ quality - pow_
quality_ to_ hash - This should only be used in tests.