EIP-3372 Adding 5 FNV primes for Ethash (5 FNV primes for ethash)
No call decision · Consensus & staking · EIP status Stagnant · created 2021-03-13
A proposal to increase the FNV hash constant inside the Ethash mining algorithm from one to five, making existing dedicated mining hardware (ASICs) unable to use it.
Why it is needed
Ethash is a proof-of-work (PoW) algorithm designed so that no particular mining hardware has an advantage. However, the emergence of dedicated mining hardware (ASICs) tailored to this algorithm made them far more efficient than ordinary graphics card (GPU) miners. The author believes that because ASIC devices cost thousands of dollars and their production is monopolized by a small number of companies, the entire Ethash mining network risks becoming dependent on a handful of firms. Also, while GPUs can easily move to other mining algorithms, ASICs are built exclusively for Ethash and become unusable if the algorithm changes. This EIP aims to increase the FNV hash constant inside Ethash from one to five, rendering existing ASIC devices unable to operate normally and shifting the mining network back toward GPUs.
What changes
Today
- Every stage of Ethash uses only one function, fnv (hereafter fnv0), and the constant 0x1000193.
- Dedicated mining hardware (ASICs) designed around this single constant operates efficiently.
After EIP-3372
- Once the block number reaches or exceeds ETHASH11_BLKNUM, the DAG item selection, DAG item mixing, and compression mixing stages each use different constants: fnvA, fnvB, fnvC, fnvD, and fnvE.
- fnv0 in the DAG generation stage remains unchanged.
- ASIC miners with the existing constant fixed in hardware may stop operating normally.
Who is affected
- PoW miners: GPU miners are largely unaffected, but ASIC miners with the FNV constant etched into hardware risk becoming inoperable.
- Client and mining software developers: Must reflect the new FNV constants and their application points in the Ethash implementation via a hard fork, in line with the ETHASH11_BLKNUM condition.
- The whole network: The goal is to diversify mining hardware and reduce the risk of centralization around a specific vendor's equipment.
In depth
Activation condition and ethash1.1
Once block.number reaches or exceeds ETHASH11_BLKNUM, the ethash1.1 algorithm version activates. Until then, the entire hashimoto function used only the single function fnv (hereafter fnv0), but starting with ethash1.1, five functions, fnvA, fnvB, fnvC, fnvD, and fnvE, are added, each using a different FNV constant.
5 new FNV constants
The existing constant is FNV_PRIME_0 = 0x1000193. The newly added constants are FNV_PRIME_A = 0x10001a7, FNV_PRIME_B = 0x10001ab, FNV_PRIME_C = 0x10001cf, FNV_PRIME_D = 0x10001e3, and FNV_PRIME_E = 0x10001f9. The selection criteria are explained as following the IETF's official FNV specification (draft-eastlake-fnv-14).
Application points within the hashimoto function
fnvA replaces fnv0 in the DAG item selection stage. fnvB replaces fnv0 in the DAG item mixing stage. In the compression mixing stage, the part that nested three calls as fnv0(fnv0(fnv0( changes to fnvC(fnvD(fnvE(, using a different constant at each nested stage. Meanwhile, the fnv0 used in the DAG generation stage remains unchanged.
Background (motivation) for the proposal
The author argues that ASICs are a threat that centralizes the Ethash mining network. He presents the price gap that after EIP-1559's introduction, small GPU miners will operate at a loss and quit mining, while ASIC devices cost over $10,000 compared to GPUs at under $1,000. He also cites as grounds that GPUs can switch to other mining algorithms, while ASICs are locked to Ethash and cannot switch.
Compatibility impact
The source text states that mining hardware with the FNV constant fixed directly into its circuitry cannot be changed after this update and may fail to operate normally.
Security assessment
The source text states that there are no known security issues with this change.
Proposal status
This EIP is currently in Stagnant status. The author explains that work was halted after receiving legal threats from an ASIC manufacturer during discussion of the prior proposal, EIP-969, and that this EIP was later resubmitted anonymously. The call records and debate materials provided contain no separate discussion of this EIP.