EIP-1355 Ethash 1a

No call decision · Consensus & staking · EIP status Withdrawn · created 2018-08-26

A proposal to switch the DAG index hash function of the Ethash mining algorithm from fnv to fnv1a, aiming to neutralize ASIC miners.

Why it is needed

At the time, Ethereum was mined with GPUs, and the emergence of ASIC (application-specific integrated circuit) miners designed for the Ethash algorithm raised centralization concerns that mining power could concentrate around specific hardware manufacturers. Because ASICs are hardwired to perform operations in a fixed order, the idea was that simply changing the order of operations in the hash function used to compute DAG entry positions in the Ethash main loop could neutralize existing ASICs. At the same time, the change was kept minimal to limit the impact on GPU miners and the network as a whole, and to reduce the burden of analysis and testing.

What changes

Today

After EIP-1355

Who is affected

In depth

Definition of the fnv1a function

The new hash function fnv1a(v1, v2) is defined as ((v1 XOR v2) * FNV1A_PRIME) % 2**32. FNV1A_PRIME uses either 16777499 or 16777639. Compared with the existing fnv() function, the key difference is the order in which XOR and multiplication are applied.

Where it applies: the Ethash main loop

In Ethash's Main Loop, the fnv in the expression used to compute the DAG entry position, p = fnv(i XOR s[0], mix[i % w]) % (n // mixhashes) * mixhashes, is replaced with fnv1a. This single-line substitution is the only change in the entire specification.

ASIC-neutralization logic and the minimal-change principle

It explains that non-programmable ASICs are hardwired to perform operations in a specific order, so simply changing the order in which XOR and multiplication are applied, as in fnv1a, can neutralize the current generation of ASICs. At the same time, it states that minimizing changes to Ethash speeds up development, reduces the burden of analysis and testing, and lowers the risk of detuning existing GPUs.

No cryptographic implications

It states explicitly that changing fnv to fnv1a has no cryptographic significance; it is simply replacing one well-distributed hash function used to scramble DAG indexing with another. This is described as a risk-mitigation approach that reduces the need for rigorous cryptographic analysis.

Two candidate FNV primes

Two candidate values are presented for FNV1A_PRIME: 16777639 and 16777499. 16777639 satisfies all the FNV prime requirements laid out on Wikipedia. 16777499 is the value preferred by the original authors of FNV, but is explained as not being used in the reference implementation for historical reasons.

Proposal status

This EIP's status is Withdrawn. It was never actually adopted by the Ethereum network. The call records provided contain no fork-inclusion decision for this proposal.

Original EIP · ← EIPs