Skip to content

Commit

Permalink
Extend epoch and period for GoldenAge
Browse files Browse the repository at this point in the history
  • Loading branch information
Djadih committed Sep 27, 2024
1 parent 51291f7 commit 293287b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
23 changes: 12 additions & 11 deletions consensus/progpow/algorithm.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package progpow
import (
"encoding/binary"
"hash"
"math"
"math/big"
"reflect"
"runtime"
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion consensus/progpow/algorithm_progpow.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package progpow

import (
"encoding/binary"
"math"
"math/bits"

goLRU "github.com/hashicorp/golang-lru/v2"
Expand All @@ -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
)
Expand Down

0 comments on commit 293287b

Please sign in to comment.