nim-ethash/README.md

37 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2018-09-05 04:00:14 +00:00
# ethash
2018-02-15 10:23:42 +00:00
2018-09-05 04:00:14 +00:00
[![License: Apache](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
![Stability: experimental](https://img.shields.io/badge/stability-experimental-orange.svg)
2022-04-07 15:06:37 +00:00
![Github action](https://github.com/status-im/nim-ethash/workflows/CI/badge.svg)
2018-02-15 10:23:42 +00:00
2018-05-28 05:26:38 +00:00
# Introduction
A pure-Nim implementation of Ethash, the Ethereum proof of work
2018-02-15 10:23:42 +00:00
2018-09-05 04:00:14 +00:00
Implementation is based on the [spec revision 23 (2017-08-03)](https://github.com/ethereum/wiki/wiki/Ethash).
2018-02-15 10:23:42 +00:00
2018-05-28 05:26:38 +00:00
# Mining
2018-02-27 10:29:46 +00:00
An unoptimized mining CPU backend is available through the compile-time flag ``-d:ethash_mining``.
It requires compilation through the C++ backend.
2018-05-28 05:26:38 +00:00
# Optimizations
For maximum speed, compile Ethash with `-d:release -d:march_native -d:openmp`.
2018-05-28 05:26:38 +00:00
This will compile Ethash in Nim release mode, with all supported CPU extensions (especially AVX2) and with OpenMP multiprocessing. On MacOS, OpenMP requires installing GCC-7 and can be done through Homebrew.
2018-05-28 05:26:38 +00:00
# Original implementation
2018-02-15 10:23:42 +00:00
Original Ethereum implementation is available [here](https://github.com/ethereum/ethash).
**Warning ⚠ - License notice**: the original implementation is under GPLv3 or LGPLv3 and must not be used in this project.
2018-09-05 04:00:14 +00:00
## License
2018-09-05 18:47:14 +00:00
Licensed and distributed under either of
* MIT license: [LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT
2019-01-02 14:04:24 +00:00
or
* Apache License, Version 2.0, ([LICENSE-APACHEv2](LICENSE-APACHEv2) or http://www.apache.org/licenses/LICENSE-2.0)
2018-09-05 04:00:14 +00:00
2019-01-02 14:04:24 +00:00
at your option. This file may not be copied, modified, or distributed except according to those terms.