open class EthHash
(source)
Implementation of EthHash utilities for Ethereum mining algorithms.
EthHash()
Implementation of EthHash utilities for Ethereum mining algorithms. |
static var ACCESSES: Int
number of accesses in hashimoto loop |
|
static var CACHE_BYTES_GROWTH: Long
cache growth per epoch |
|
static var CACHE_BYTES_INIT: Long
bytes in cache at genesis |
|
static var CACHE_MULTIPLIER: Int
Size of the DAG relative to the cache |
|
static var CACHE_ROUNDS: Int
number of rounds in cache production |
|
static var DATASET_BYTES_GROWTH: Long
dataset growth per epoch |
|
static var DATASET_BYTES_INIT: Long
bytes in dataset at genesis |
|
static var DATASET_PARENTS: Int
number of parents of each dataset element |
|
static var EPOCH_LENGTH: Int
blocks per epoch |
|
static var FNV_PRIME: Int |
|
static var HASH_BYTES: Int
hash length in bytes |
|
static var MIX_BYTES: Int
width of mix |
|
static var WORD_BYTES: Int
Bytes in word. |
open static fun calcDatasetItem(cache: Array<UInt32>, index: Int): Bytes
Calculate a data set item based on the previous cache for a given index |
|
open static fun epoch(block: Long): Long
Calculates the EthHash Epoch for a given block number. |
|
open static fun getCacheSize(block_number: Long): Int
Provides the size of the cache at a given block number |
|
open static fun getFullSize(block_number: Long): Long
Provides the size of the full dataset at a given block number |
|
open static fun mkCache(cacheSize: Int, block: Long): Array<UInt32>
Generates the EthHash cache for given parameters. |