2

When I was started to explore the ethash algorithm then I found this-
FNV was used to provide a data aggregation function which is (i) non-associative, and (ii) easy to compute. A commutative and associative alternative to FNV would be XOR.
What does this means?

3

FNV = Fowler–Noll–Vo hash function.

From the main Ethash page (which contains a link to Wikipedia):

We use an algorithm inspired by the FNV hash in some cases as a non-associative substitute for XOR.

At the risk of defining what perhaps you already know...

Associativity:

Within an expression containing two or more occurrences in a row of the same associative operator, the order in which the operations are performed does not matter as long as the sequence of the operands is not changed. That is, rearranging the parentheses in such an expression will not change its value.

Commutativity:

In mathematics, a binary operation is commutative if changing the order of the operands does not change the result

I can't immediately see in the Ethash algorithm where you'd need to negate these two types of operations by using FNV. People who are more familiar with the algorithm might want to comment further.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.