diff --git a/consensus/progpow/algorithm.go b/consensus/progpow/algorithm.go index 803c853fc..d98f8d391 100644 --- a/consensus/progpow/algorithm.go +++ b/consensus/progpow/algorithm.go @@ -19,6 +19,7 @@ package progpow import ( "encoding/binary" "hash" + "math" "math/big" "reflect" "runtime" @@ -37,17 +38,17 @@ import ( ) 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 - C_epochLength = 4320 // Blocks per epoch - mixBytes = 128 // Width of mix - hashBytes = 64 // Hash length in bytes - hashWords = 16 // Number of 32 bit ints in a hash - datasetParents = 512 // Number of parents of each dataset element - cacheRounds = 3 // Number of rounds in cache production - loopAccesses = 64 // Number of accesses in hashimoto loop + 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 + C_epochLength = math.MaxUint64 // Blocks per epoch + mixBytes = 128 // Width of mix + hashBytes = 64 // Hash length in bytes + hashWords = 16 // Number of 32 bit ints in a hash + datasetParents = 512 // Number of parents of each dataset element + cacheRounds = 3 // Number of rounds in cache production + loopAccesses = 64 // Number of accesses in hashimoto loop ) // cacheSize returns the size of the ethash verification cache that belongs to a certain diff --git a/consensus/progpow/algorithm_progpow.go b/consensus/progpow/algorithm_progpow.go index 63a77a159..d98417b7e 100644 --- a/consensus/progpow/algorithm_progpow.go +++ b/consensus/progpow/algorithm_progpow.go @@ -18,6 +18,7 @@ package progpow import ( "encoding/binary" + "math" "math/bits" goLRU "github.com/hashicorp/golang-lru/v2" @@ -32,7 +33,7 @@ const ( progpowDagLoads = 4 // Number of uint32 loads from the DAG per lane progpowCntCache = 11 progpowCntMath = 18 - progpowPeriodLength = 10 + progpowPeriodLength = math.MaxUint64 progpowCntDag = 64 progpowMixBytes = 256 )