Documentation
¶
Index ¶
- type Config
- type DAG
- func (d *DAG) CacheSize(epoch uint64) uint64
- func (d *DAG) CalcEpoch(height uint64) uint64
- func (d *DAG) DatasetSize(epoch uint64) uint64
- func (dag *DAG) GetCache(epoch uint64) *cache
- func (dag *DAG) NewLookupFunc1024(c *cache, epoch uint64) LookupFunc
- func (dag *DAG) NewLookupFunc2048(c *cache, epoch uint64) LookupFunc
- func (dag *DAG) NewLookupFunc512(c *cache, epoch uint64) LookupFunc
- func (d *DAG) SeedHash(height uint64) []byte
- type LookupFunc
- type LookupTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Name string Revision int StorageDir string // size variables DatasetInitBytes uint64 // Bytes in dataset at genesis DatasetGrowthBytes uint64 // Dataset growth per epoch CacheInitBytes uint64 // Bytes in cache at genesis CacheGrowthBytes uint64 // Cache growth per epoch // lookup tables DatasetSizes *LookupTable CacheSizes *LookupTable // algorithm variables DatasetParents uint32 EpochLength uint64 SeedEpochLength uint64 // ETC uses a different seed epoch length // cache variables CacheRounds int CachesCount int // Maximum number of caches to keep before eviction (only init, don't modify) CachesLockMmap bool // L1 variables L1Enabled bool L1CacheSize uint64 L1CacheNumItems uint }
type DAG ¶
type DAG struct { Config // contains filtered or unexported fields }
func (*DAG) DatasetSize ¶
func (*DAG) NewLookupFunc1024 ¶
func (dag *DAG) NewLookupFunc1024(c *cache, epoch uint64) LookupFunc
func (*DAG) NewLookupFunc2048 ¶
func (dag *DAG) NewLookupFunc2048(c *cache, epoch uint64) LookupFunc
func (*DAG) NewLookupFunc512 ¶
func (dag *DAG) NewLookupFunc512(c *cache, epoch uint64) LookupFunc
type LookupFunc ¶
type LookupTable ¶
type LookupTable struct {
// contains filtered or unexported fields
}
func NewLookupTable ¶
func NewLookupTable(table []uint64, maxEpoch uint64) *LookupTable
Click to show internal directories.
Click to hide internal directories.