Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chfast/ethash
C/C++ implementation of Ethash and ProgPoW – the Ethereum Proof of Work algorithms
https://github.com/chfast/ethash
c cpp ethash ethereum hacktoberfest mining progpow proof-of-work
Last synced: 1 day ago
JSON representation
C/C++ implementation of Ethash and ProgPoW – the Ethereum Proof of Work algorithms
- Host: GitHub
- URL: https://github.com/chfast/ethash
- Owner: chfast
- License: apache-2.0
- Created: 2018-02-22T00:52:39.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-12T15:43:34.000Z (over 1 year ago)
- Last Synced: 2024-10-02T09:14:34.915Z (3 months ago)
- Topics: c, cpp, ethash, ethereum, hacktoberfest, mining, progpow, proof-of-work
- Language: C++
- Homepage:
- Size: 1.25 MB
- Stars: 142
- Watchers: 19
- Forks: 126
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Ethash
[![readme style standard](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![GitPOAP Badge](https://public-api.gitpoap.io/v1/repo/chfast/ethash/badge)](https://www.gitpoap.io/gh/chfast/ethash)> C/C++ implementation of Ethash – the Ethereum Proof of Work algorithm
## Table of Contents
- [Install](#install)
- [Usage](#usage)
- [Test vectors](#test-vectors)
- [Optimizations](#optimizations)
- [Maintainer](#maintainer)
- [License](#license)## Install
Build from source using CMake.
```sh
mkdir build
cd build
cmake ..
cmake --build .
```## Usage
See [ethash.hpp] for a list of exported functions and documentation.
## Optimizations
This section describes the optimizations, modifications 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 a sequence of keccak256 hashes applied the epoch number of times.
Time needed to compute seed hash is negligible compared 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 the 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].
[@chfast]: https://github.com/chfast
[Apache License, Version 2.0]: LICENSE
[ethash.hpp]: include/ethash/ethash.hpp
[Ethash reference implementation]: https://github.com/ethereum/wiki/wiki/Ethash