Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
cmake/ | H | 14-Dec-2018 | - | |||
include/ethash/ | H | 14-Dec-2018 | - | |||
lib/ethash/ | H | 14-Dec-2018 | - | |||
test/ | H | 03-May-2022 | - | |||
.bumpversion.cfg | H A D | 14-Dec-2018 | 440 | |||
.clang-format | H A D | 14-Dec-2018 | 1,003 | |||
.gitignore | H A D | 14-Dec-2018 | 29 | |||
LICENSE | H A D | 14-Dec-2018 | 11.1 KiB | |||
README.md | H A D | 14-Dec-2018 | 1.9 KiB | |||
appveyor.yml | H A D | 14-Dec-2018 | 957 | |||
circle.yml | H A D | 14-Dec-2018 | 7.2 KiB | |||
codecov.yml | H A D | 14-Dec-2018 | 125 |
README.md
1# Ethash 2 3[![readme style standard](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) 4 5> C/C++ implementation of Ethash – the Ethereum Proof of Work algorithm 6 7 8## Table of Contents 9 10- [Install](#install) 11- [Usage](#usage) 12- [Test vectors](#test-vectors) 13- [Optimizations](#optimizations) 14- [Maintainer](#maintainer) 15- [License](#license) 16 17 18## Install 19 20Build from source using CMake. 21 22```sh 23mkdir build 24cd build 25cmake .. 26cmake --build . 27``` 28 29## Usage 30 31See [ethash.hpp] for list of exported function and documentation. 32 33 34## Test vectors 35 36- [ProgPoW test vectors](test/unittests/progpow_test_vectors.hpp) 37 38 39## Optimizations 40 41This section decscribes the optimizations, modification and tweaks applied 42in this library in relation to [Ethash reference implementation]. 43 44The library contains a set of micro-benchmarks. Build and run `bench` tool. 45 46### Seed hash is computed on the fly. 47 48Seed hash is sequence of keccak256 hashes applied the epoch number of times. 49Time needed to compute seed hash is negligible comparing to time needed to build 50light cache. Computing seed hash for epoch 10000 takes ~ 5 ms, building light 51cache for epoch 1 takes ~ 500 ms. 52 53### Dataset size is computed on the fly 54 55Computing the size of full dataset and light cache requires finding the largest 56prime number given an upper bound. For similar reasons as with seed hash, this 57is computed on the fly. The procedure used is quite naive and forks well only 58up to 40-bit number, so some additional improvement can be done in future. 59 60 61## Maintainer 62 63Paweł Bylica [@chfast] 64 65## License 66 67Licensed under the [Apache License, Version 2.0]. 68 69 70[@chfast]: https://github.com/chfast 71[Apache License, Version 2.0]: LICENSE 72[ethash.hpp]: include/ethash/ethash.hpp 73[Ethash reference implementation]: https://github.com/ethereum/wiki/wiki/Ethash 74