Expand description
Implement the v1 schemeβs challenge string format
This is a packed byte-string which encodes our puzzleβs parameters as inputs for Equi-X. We need to construct challenge strings both to solve and to verify puzzles.
Re-exportsΒ§
use crate::pow::v1::err::SolutionErrorV1;πuse crate::pow::v1::types::Effort;πuse crate::pow::v1::types::Instance;πuse crate::pow::v1::types::NONCE_LEN;πuse crate::pow::v1::types::Nonce;πuse crate::pow::v1::types::SEED_LEN;πuse crate::pow::v1::types::Seed;πuse arrayvec::ArrayVec;πuse arrayvec::CapacityError;πuse blake2::Blake2b;πuse blake2::Digest;πuse blake2::digest::consts::U4;π
StructsΒ§
- Challenge π
- A fully assembled challenge string, with some access to inner fields
ConstantsΒ§
- CHALLENGE_
LEN π - Total length of our Equi-X challenge string
- EFFORT_
LEN π - Packed length of an
Effort, in bytes - EFFORT_
OFFSET π - Location of the
Effortwithin aChallenge - ID_LEN π
- Length of the HsBlindId
- NONCE_
OFFSET π - Location of the
Noncewithin aChallenge - P_
STRING π - Algorithm personalization string (P)
- P_
STRING_ πLEN - Length of the personalization string, in bytes
- SEED_
OFFSET π - Location of the
Seedwithin aChallenge