Skip to content
forked from chfast/ethash

C/C++ implementation of Ethash and ProgPoW – the Ethereum Proof of Work algorithms

License

Notifications You must be signed in to change notification settings

yalexis-eth/ethash

 
 

Repository files navigation

Ethash

readme style standard

C/C++ implementation of Ethash – the Ethereum Proof of Work algorithm

Table of Contents

Install

Build from Source using CMake.

mkdir build
cd build
cmake ..
cmake --build .

Usage

See ethash.hpp for list of exported function and documentation.

Optimizations

This section describes the optimizations, modification and tweaks applied in this library in relation to Ethash reference implementation.

The library contains a set of micro-benchmarks.Build and run the ethash-bench tool.

Seed hash is computed on the fly.

Seed hash is sequence of keccak256 hashes applied the epoch number of times. Time needed to compute seed hash is negligible comparing to time needed to build light cache. Computing seed hash for epoch 10000 takes ~ 5 ms, building light cache for epoch 1 takes ~ 500 ms.

Dataset size is computed on the fly

Computing the size of full dataset and light cache requires finding the largest prime number given an upper bound. For similar reasons as with seed hash, this is computed on the fly. The procedure used is quite naive and forks well only up to 40-bit number, so some additional improvement can be done in the future.

Maintainer

Paweł Bylica @chfast

License

Licensed under the Apache License, Version 2.0.

About

C/C++ implementation of Ethash and ProgPoW – the Ethereum Proof of Work algorithms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 65.8%
  • CMake 21.3%
  • C 9.2%
  • Python 3.2%
  • Shell 0.5%