mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-20 19:11:08 +03:00
enhance comment describing how a pow is hashed (#3623)
Integrate feedback from Tromp Some more feedback from Tromp readability improvement
This commit is contained in:
parent
09c90fc257
commit
cccaf98493
1 changed files with 5 additions and 2 deletions
|
@ -318,8 +318,11 @@ impl ProofOfWork {
|
||||||
///
|
///
|
||||||
/// The hash of the `Proof` is the hash of its packed nonces when serializing
|
/// The hash of the `Proof` is the hash of its packed nonces when serializing
|
||||||
/// them at their exact bit size. The resulting bit sequence is padded to be
|
/// them at their exact bit size. The resulting bit sequence is padded to be
|
||||||
/// byte-aligned.
|
/// byte-aligned. We form a PROOFSIZE*edge_bits integer by packing the PROOFSIZE edge
|
||||||
///
|
/// indices together, with edge index i occupying bits i * edge_bits through
|
||||||
|
/// (i+1) * edge_bits - 1, padding it with up to 7 0-bits to a multiple of 8 bits,
|
||||||
|
/// writing as a little endian byte array, and hashing with blake2b using 256 bit digest.
|
||||||
|
|
||||||
#[derive(Clone, PartialOrd, PartialEq, Serialize)]
|
#[derive(Clone, PartialOrd, PartialEq, Serialize)]
|
||||||
pub struct Proof {
|
pub struct Proof {
|
||||||
/// Power of 2 used for the size of the cuckoo graph
|
/// Power of 2 used for the size of the cuckoo graph
|
||||||
|
|
Loading…
Reference in a new issue