- Define fnv1a() as
where
def fnv1a(v1, v2): return ((v1 ^ v2) * FNV1A_PRIME) % 2**32
FNV1A_PRIME
is 16777499 or 16777639.` - Change the hash function that determines the DAG item index in Ethash algorighm from fnv() to new fnv1a().
In Main Loop change
to
p = fnv(i ^ s[0], mix[i % w]) % (n // mixhashes) * mixhashes
p = fnv1a(i ^ s[0], mix[i % w]) % (n // mixhashes) * mixhashes
Created
August 26, 2018 21:05
-
-
Save chfast/e0e3768928ff2b62b09755fe8b9c5d43 to your computer and use it in GitHub Desktop.
Ethash 1a
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fnv is used in both search and DAG gen. Worth mentioning?