https://github.com/vapory-legacy/vapash
C/C++ implementation of Vapash – the Vapory Proof of Work algorithm
https://github.com/vapory-legacy/vapash
dataset optimizations test-vectors vapash
Last synced: about 1 year ago
JSON representation
C/C++ implementation of Vapash – the Vapory Proof of Work algorithm
- Host: GitHub
- URL: https://github.com/vapory-legacy/vapash
- Owner: vapory-legacy
- License: apache-2.0
- Created: 2021-02-13T05:27:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-14T07:34:29.000Z (over 5 years ago)
- Last Synced: 2025-01-21T01:43:25.028Z (over 1 year ago)
- Topics: dataset, optimizations, test-vectors, vapash
- Language: C++
- Homepage:
- Size: 1.11 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Vapash
[](https://github.com/RichardLitt/standard-readme)
> C/C++ implementation of Vapash – the Vapory 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 list of exported function and documentation.
## Test vectors
- [ProgPoW test vectors](test/unittests/progpow_test_vectors.hpp)
## Optimizations
This section decscribes 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 `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 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