onflow / atree

Atree provides scalable arrays and scalable ordered maps.
https://onflow.org
Apache License 2.0
39 stars 16 forks source link

Add extra comment to typicalRandomConstant #259

Closed fxamacker closed 2 years ago

fxamacker commented 2 years ago

Description

Add extra comment in case // DO NOT MODIFY is ignored or missed.

Before:

    // typicalRandomConstant is a 64-bit value that has qualities
    // of a typical random value (e.g. hamming weight, number of
    // consecutive groups of 1-bits, etc.) so it can be useful as
    // a const part of a seed, round constant inside a permutation, etc.
    typicalRandomConstant = uint64(0x1BD11BDAA9FC1A22) // DO NOT MODIFY

After:

    // typicalRandomConstant is a 64-bit value that has qualities
    // of a typical random value (e.g. hamming weight, number of
    // consecutive groups of 1-bits, etc.) so it can be useful as
    // a const part of a seed, round constant inside a permutation, etc.
    // CAUTION: We only store 64-bit seed, so some hashes with 64-bit seed like
    // CircleHash64f don't use this const.  However, other hashes such as
    // CircleHash64fx and SipHash might use this const as part of their
    // 128-bit seed (when they don't use 64-bit -> 128-bit seed expansion func).
    typicalRandomConstant = uint64(0x1BD11BDAA9FC1A22) // DO NOT MODIFY

Closes #258