HomeEIPs
EIPsEIP-1355
EIP-1355

Ethash 1a

WithdrawnStandards Track: Core
Created: 2018-08-26
Paweł Bylica (@chfast), Jean M. Cyr (@jean-m-cyr)
DiscussionsOriginal linkEdit
1 min read

EIP-1355 proposes an update to the Ethash algorithm used for mining Ethereum. The update, called Ethash 1a, aims to improve the efficiency and security of the mining process. It introduces a new hash function and changes the way the DAG (Directed Acyclic Graph) is generated, which should make it more resistant to ASIC mining. The proposal also includes changes to the way the difficulty is calculated, which should make it more stable and predictable. Overall, the goal of EIP-1355 is to make mining more accessible and fair, while also improving the security of the Ethereum network.

Video
Anyone may contribute to propose contents.
Go propose
Original

Motivation

Provide minimal set of changes to Ethash algorithm to hinder and delay the adoption of ASIC based mining.

Specification

  1. Define hash function fnv1a() as
    def fnv1a(v1, v2): return ((v1 ^ v2) * FNV1A_PRIME) % 2**32
    where FNV1A_PRIME is 16777499 or 16777639.
  2. Change the hash function that determines the DAG item index in Ethash algorithm from fnv() to new fnv1a(). In Main Loop change
    p = fnv(i ^ s[0], mix[i % w]) % (n // mixhashes) * mixhashes
    to
    p = fnv1a(i ^ s[0], mix[i % w]) % (n // mixhashes) * mixhashes

Rationale

The usual argument for decentralization and network security.

Unless programmable, an ASIC is hardwired to perform sequential operations in a given order. fnv1a changes the order in which an exclusive-or and a multiply are applied, effectively disabling the current wave of ASICS. A second objective is minimize ethash changes to be the least disruptive, to facilitate rapid development, and to lower the analysis and test requirements. Minimizing changes to ethash reduces risk associated with updating all affected network components, and also reduces the risk of detuning existing GPUs. It's expected that this specific change would have no effect on existing GPU performance.

Changing fnv to fnv1a has no cryptographic implications. It is merely an efficient hash function with good dispersion characteristics used to scramble DAG indexing. We remain focused on risk mitigation by reducing the need for rigorous cryptographic analysis.

FNV Primes

The 16777639 satisfies all requirements from Wikipedia.

The 16777499 is preferred by FNV authors but not used in the reference FNV implementation because of historical reasons. See A few remarks on FNV primes.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Further reading
Anyone may contribute to propose contents.
Go propose
Adopted by projects
Anyone may contribute to propose contents.
Go propose

Not miss a beat of EIPs' update?

Subscribe EIPs Fun to receive the latest updates of EIPs Good for Buidlers to follow up.

View all
Serve Ethereum Builders, Scale the Community.
Resources
GitHub
Supported by