Skip to content

Commit

Permalink
Change dataset cache sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
Djadih committed Dec 4, 2024
1 parent c9b884f commit d260058
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions consensus/progpow/algorithm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}

Expand All @@ -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)
}

Expand Down

0 comments on commit d260058

Please sign in to comment.