Skip to content

ethash algorithm consts

Source (upstream pre-purge) Current
File consensus/ethash/algorithm.go algorithm.go
Symbol datasetInitBytes datasetInitBytes
Ref dde2da0ef~1 etc/v1.17.3-full-node

datasetInitBytes, datasetGrowthBytes, cacheInitBytes, cacheGrowthBytes, epochLengthDefault, epochLengthECIP1099, mixBytes, hashBytes, hashWords, datasetParents, cacheRounds, loopAccesses, maxEpoch

3-way merge — purge → getc ← upstream

pre-purgecore-geth
const (
datasetInitBytes = 1 << 30 // Bytes in dataset at genesis
datasetGrowthBytes = 1 << 23 // Dataset growth per epoch
cacheInitBytes = 1 << 24 // Bytes in cache at genesis
cacheGrowthBytes = 1 << 17 // Cache growth per epoch
epochLengthDefault = 30000 // Default epoch length (blocks per epoch)
epochLengthECIP1099 = 60000 // Blocks per epoch if ECIP-1099 is activated
mixBytes = 128 // Width of mix
hashBytes = 64 // Hash length in bytes
hashWords = 16 // Number of 32 bit ints in a hash
datasetParents = 256 // Number of parents of each dataset element
cacheRounds = 3 // Number of rounds in cache production
loopAccesses = 64 // Number of accesses in hashimoto loop
maxEpoch = 2048 // Max Epoch for included tables
core-geth validation — **Identical** ✅ | | | |---|---| | File | [`algorithm.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/consensus/ethash/algorithm.go) | | Symbol | `datasetInitBytes` | | Ref | `v1.12.20` |

← Consensus & Ethash