Module: Ethereum::EthashRuby

Defined in:
lib/ethereum/ethash_ruby.rb,
lib/ethereum/ethash_ruby/cache.rb,
lib/ethereum/ethash_ruby/utils.rb,
lib/ethereum/ethash_ruby/hashimoto.rb

Defined Under Namespace

Modules: Utils Classes: Cache, Hashimoto

Constant Summary collapse

EPOCH_LENGTH =

blocks per epoch

30000
ACCESSES =

number of accesses in hashimoto loop

64
DATASET_BYTES_INIT =

bytes in dataset at genesis

2**30
DATASET_BYTES_GROWTH =

growth per epoch (~ 7GB per year)

2**23
DATASET_PARENTS =

number of parents of each dataset element

256
CACHE_BYTES_INIT =

size of the dataset relative to the cache

2**24
CACHE_BYTES_GROWTH =

size of the dataset relative to the cache

2**17
CACHE_ROUNDS =

number of rounds in cache production

3
WORD_BYTES =

bytes in word

4
MIX_BYTES =

width of mix

128
HASH_BYTES =

hash length in bytes

64
FNV_PRIME =
0x01000193

Class Method Summary collapse

Class Method Details

.get_cache(*args) ⇒ Object



32
33
34
# File 'lib/ethereum/ethash_ruby.rb', line 32

def get_cache(*args)
  ::Ethereum::Ethash::Cache.get(*args)
end

.hashimoto_light(*args) ⇒ Object



28
29
30
# File 'lib/ethereum/ethash_ruby.rb', line 28

def hashimoto_light(*args)
  ::Ethereum::Ethash::Hashimoto.new.light(*args)
end