Chia proof of space plotting, proving, and verifying (wraps C++)
Project description
Chia Proof of Space
Chia's proof of space is written in C++. Includes a plotter, prover, and verifier. It exclusively runs on 64 bit architectures. Read the Proof of Space document to learn about what proof of space is and how it works.
C++ Usage Instructions
Compile
# Requires cmake 3.14+
mkdir -p build && cd build
cmake ../
cmake --build . -- -j 6
Run tests
./RunTests
CLI usage
./ProofOfSpace -k 25 -f "plot.dat" -m "0x1234" create
./ProofOfSpace -k 25 -f "final-plot.dat" -m "0x4567" -t TMPDIR -2 SECOND_TMPDIR create
./ProofOfSpace -f "plot.dat" prove <32 byte hex challenge>
./ProofOfSpace -k 25 verify <hex proof> <32 byte hex challenge>
./ProofOfSpace -f "plot.dat" check <iterations>
Benchmark
time ./ProofOfSpace -k 25 create
Hellman Attacks usage
There is an experimental implementation which implements some of the Hellman Attacks that can provide significant space savings for the final file.
./HellmanAttacks -k 18 -f "plot.dat" -m "0x1234" create
./HellmanAttacks -f "plot.dat" check <iterations>
Python
Finally, python bindings are provided in the python-bindings directory.
Install
python3 -m venv .venv
. .venv/bin/activate
pip3 install .
Run python tests
Testings uses pytest. Linting uses flake8 and mypy.
py.test ./tests -s -v
ci Building
The primary build process for this repository is to use GitHub Actions to
build binary wheels for MacOS, Linux (x64 and aarch64), and Windows and publish
them with a source wheel on PyPi. See .github/workflows/build.yml
. CMake uses
FetchContent
to download pybind11. Building is then
managed by cibuildwheel. Further
installation is then available via pip install chiapos
e.g.
Contributing and workflow
Contributions are welcome and more details are available in chia-blockchain's CONTRIBUTING.md.
The main branch is usually the currently released latest version on PyPI. Note that at times chiapos will be ahead of the release version that chia-blockchain requires in it's main/release version in preparation for a new chia-blockchain release. Please branch or fork main and then create a pull request to the main branch. Linear merging is enforced on main and merging requires a completed review. PRs will kick off a GitHub actions ci build and analysis of chiapos at lgtm.com. Please make sure your build is passing and that it does not increase alerts at lgtm.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file chiapos1-1.0.3.dev16.tar.gz
.
File metadata
- Download URL: chiapos1-1.0.3.dev16.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7d5820a68e47ba2130faa13a7b54322c8d7a68d41e65900d1c4e0ef5bbff195 |
|
MD5 | 5985b4c077bd01030060306151334528 |
|
BLAKE2b-256 | 163ccabccfd3f0f7d4327a2df0695e95e7e8831718297751a572307967abc711 |
File details
Details for the file chiapos1-1.0.3.dev16-cp38-cp38-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: chiapos1-1.0.3.dev16-cp38-cp38-macosx_10_15_x86_64.whl
- Upload date:
- Size: 254.7 kB
- Tags: CPython 3.8, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83881ceb85735df9ec0ac1176b32bc756c05e9ed74bd70c8ca42d10bcac6b853 |
|
MD5 | 1206ecafda13c7bfb0bb069bc346100b |
|
BLAKE2b-256 | 3532bbd9734bd4082ce746040a79b2bef43d96f91f04eb63ccfd2ff3c170b812 |