Skip to main content

Module pow

Module pow 

Source

Structs§

PoWChallenge
Proof-of-Work Challenge
PoWSolution
Proof-of-Work Solution

Enums§

PowError
Error from the bounded / capped PoW solver (H3).

Constants§

MAX_CLIENT_POW_DIFFICULTY
Client-side cap on the PoW difficulty it will attempt to solve (H3). An unauthenticated HelloRetryRequest carries difficulty verbatim; without a cap an injected difficulty = 255 would make the client spin ~2^255 hashes forever. 24 sits strictly above every difficulty an honest server issues (load-tier max 16, ReputationTracker::MAX_DIFFICULTY 20, the frozen difficulty: 20 wire vector) yet is a sub-second solve (~2^24 hashes).
MAX_SOLVE_ITERATIONS
Hard iteration bound for PoWChallenge::solve (H3) — 2^32, ~2^8 expected attempts of headroom over the worst in-cap difficulty (2^24), so a legitimate solve effectively never spuriously fails while an infeasible one still terminates.