From d260058f64a235b2dd60d79682d8578ab59d1c60 Mon Sep 17 00:00:00 2001 From: Hussam Date: Mon, 18 Nov 2024 13:21:54 -0600 Subject: [PATCH] Change dataset cache sizes --- consensus/progpow/algorithm.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/consensus/progpow/algorithm.go b/consensus/progpow/algorithm.go index d98f8d391b..65578675d8 100644 --- a/consensus/progpow/algorithm.go +++ b/consensus/progpow/algorithm.go @@ -38,10 +38,10 @@ import ( ) const ( - datasetInitBytes = 1 << 30 // Bytes in dataset at genesis - datasetGrowthBytes = 1 << 23 // Dataset growth per epoch + datasetInitBytes = 1 << 32 // Bytes in dataset at genesis + datasetGrowthBytes = 1 << 26 // Dataset growth per epoch cacheInitBytes = 1 << 24 // Bytes in cache at genesis - cacheGrowthBytes = 1 << 17 // Cache growth per epoch + cacheGrowthBytes = 1 << 21 // Cache growth per epoch C_epochLength = math.MaxUint64 // Blocks per epoch mixBytes = 128 // Width of mix hashBytes = 64 // Hash length in bytes @@ -55,9 +55,6 @@ const ( // block number. func cacheSize(block uint64) uint64 { epoch := int(block / C_epochLength) - if epoch < maxEpoch { - return cacheSizes[epoch] - } return calcCacheSize(epoch) } @@ -76,9 +73,6 @@ func calcCacheSize(epoch int) uint64 { // block number. func datasetSize(block uint64) uint64 { epoch := int(block / C_epochLength) - if epoch < maxEpoch { - return datasetSizes[epoch] - } return calcDatasetSize(epoch) }