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
Static Compilation With glibc
Statically compile ProofOfSpace
mkdir -p build && cd build
cmake -DBUILD_PROOF_OF_SPACE_STATICALLY=ON ../
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 Distributions
File details
Details for the file chiapos-2.0.3rc1.tar.gz
.
File metadata
- Download URL: chiapos-2.0.3rc1.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4f5a6cf085ffafe239c892553453b32759a65fd6f5d93a3971f10160ea83195 |
|
MD5 | 1f21742a0f06417db5739d07454d04c3 |
|
BLAKE2b-256 | d280ded0b6befba958bdc9a4b6490039f1dc5bfe94ea9ea907f52b48216e727f |
File details
Details for the file chiapos-2.0.3rc1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 9.0 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e337bbfd28bb7f44d6cac0517d6a7bcea80db14dba74f32e89c262b659a70fdb |
|
MD5 | 2405ee8f3b504a55a07ba9cc226b9350 |
|
BLAKE2b-256 | 12c87dd2112c12ac9888140480f11c1c4a933bf2d802796655dfddb0acf99e3d |
File details
Details for the file chiapos-2.0.3rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd214297519c914b83226c0e0c706577e518fde692bd631d506746adf3e91359 |
|
MD5 | 8fe743abe217d9a6f40b7203ab392a71 |
|
BLAKE2b-256 | 28e485a2c7ea19e8d3fcb594eca93e82bf50f6ba349f67c3a1c0d9b3817fd945 |
File details
Details for the file chiapos-2.0.3rc1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bffca8a6954e5bed6da7397f324da28619a5c276fe01da462b922bd8f43f8388 |
|
MD5 | c53b050072e1bfdd636853a0be8258a2 |
|
BLAKE2b-256 | 4106781a3118d8310e2360b290a6d2b90a1fbb1f50f8b893d4e7961db08d39b7 |
File details
Details for the file chiapos-2.0.3rc1-cp311-cp311-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp311-cp311-macosx_11_0_x86_64.whl
- Upload date:
- Size: 374.2 kB
- Tags: CPython 3.11, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d97e6e72a3cb112a0fa5baefaa3a821662d4293b8ccb6d7edb645ee4b5476e80 |
|
MD5 | 32fe85721a69a144e168715b003c377e |
|
BLAKE2b-256 | 2213cbe7e4d83bee2358d4c1ea3d0e9ba23a245e1b382537ee8a328c29976ec3 |
File details
Details for the file chiapos-2.0.3rc1-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 318.3 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66abfb014b62327db5b4e59277620889aa721988a1c723f47ca025beb585c60c |
|
MD5 | c396f8b680323173b8e9be037d5fea7a |
|
BLAKE2b-256 | a4952b6014e8e02cc3b5c72a6e27ca83d7e367ec8f56a9c302adb6e243d4c0b3 |
File details
Details for the file chiapos-2.0.3rc1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 9.0 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 015c5738d6d776a5d3c33d1d265a52719768dfc18db6353f800a047da17bda22 |
|
MD5 | 5c808f3e82cd4fa80e824f314686f7cd |
|
BLAKE2b-256 | 4ec1440f8faffe9be2d416a1259a4cf9c9ebaa91fa2c80372d219f603a6f9f8c |
File details
Details for the file chiapos-2.0.3rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89bbfd731a43bfa558effac0d1195f33f0c604ac4e17eb6b46e11505f58e9a32 |
|
MD5 | 86afd98ffc8de211918b9ba82299e1db |
|
BLAKE2b-256 | 7871d90c8ac4b50233b7e96d7d9db747ec156478911e506606d292f1f5060dcb |
File details
Details for the file chiapos-2.0.3rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e5cfac4a70d45b3dcfa462911a4181af9eeaa96e25a486c1841e30092183f74 |
|
MD5 | 8506965bce650af51cf893be48d0a719 |
|
BLAKE2b-256 | 2a6c2ae7f7e387d0305065fc30b2ad63244ccf981a3ed45a545aee23a46cd002 |
File details
Details for the file chiapos-2.0.3rc1-cp310-cp310-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp310-cp310-macosx_11_0_x86_64.whl
- Upload date:
- Size: 374.3 kB
- Tags: CPython 3.10, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c450f0448acd4476553f685fd54717d674a7ef0722fe1ac397a9b9d95313b653 |
|
MD5 | 9cb33a532dd05525a5cfe3a7594036f3 |
|
BLAKE2b-256 | 37d8033660a883befef3ce2db9adffa6c00622c3710548503ab140246c9dd799 |
File details
Details for the file chiapos-2.0.3rc1-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 318.4 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b76825ce1704f1850fc83b621afed488f4d98fbd30b346ad5a398af57af66cc6 |
|
MD5 | 6129636b0cdd561aa11a06adc250c8d5 |
|
BLAKE2b-256 | 5fd74af771406c2b17684864d787359e00d9cfd5e8edb7636a41e6036adbd0fb |
File details
Details for the file chiapos-2.0.3rc1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 9.0 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e5d2fde4527a9c827057c1a4a409d65587df458c7951b330b06b47786572908 |
|
MD5 | 6c1efc462cc03ac7df7079d0a8d42f3e |
|
BLAKE2b-256 | 1293b133c42965828c667b26400fb63b2bbc8397d84cf095fc2d057feaacc07f |
File details
Details for the file chiapos-2.0.3rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e69141957eb5cdd98864eee1403fb2085b3a181de1b53d44dfbf258134acd182 |
|
MD5 | f787a9993ce1887072be87b17e75b4a4 |
|
BLAKE2b-256 | dec18a9326469aa7b76146ab6899d49a67667f11328f54288689fb0050084cd0 |
File details
Details for the file chiapos-2.0.3rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 854a9e016980945a4529ad05592ca77135d7d1fc84009dc5dd8f84b023122b0f |
|
MD5 | 155334da2a5072cd9e8f6cd6000c57fb |
|
BLAKE2b-256 | 18e1bc7d8a764d46a2e7c3f3ac21a1e3036fc6821aaa7e4792104ee2704c021f |
File details
Details for the file chiapos-2.0.3rc1-cp39-cp39-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp39-cp39-macosx_11_0_x86_64.whl
- Upload date:
- Size: 374.4 kB
- Tags: CPython 3.9, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb78d7c87c029906754afb053a171eb7f3f00c38557ca1546f1f8531017d93d1 |
|
MD5 | 4726edcd9d943d0ba13b1b51dff6479b |
|
BLAKE2b-256 | 2fedfe891b5479d03169fcc3216288451cd212a20efb1f3e03f35f57012036cd |
File details
Details for the file chiapos-2.0.3rc1-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 318.4 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0e65395b00422ed0bda7fd9576d16fdd4a02cb0f0ae45394787d5bad1516526 |
|
MD5 | bde0b5868c16a40f8cce3ab690922cb1 |
|
BLAKE2b-256 | 410d7c18ebacb9bedcdf9daba891fc2c0b7f738f4ba4d5a73c67ccd06535d259 |
File details
Details for the file chiapos-2.0.3rc1-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 9.0 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29fcd731a74c17ace311d584464b2e0b71c53cf75337f7257f4d6f503625802f |
|
MD5 | 6cc9a4f285545edafa27994c8c182d68 |
|
BLAKE2b-256 | f9d7ab4b71bbafdbed0d379433d1d2d654bd26ea7300ad78e95fe9b14997b064 |
File details
Details for the file chiapos-2.0.3rc1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 714894189dd60b4857a5a4d8508a7ba9e32e6071fbee55c1abf8aa0290d6b0cc |
|
MD5 | 0c4c66867bd506cb946305290fd09e38 |
|
BLAKE2b-256 | 81634d94f31eb1a63d17ac0d20240989c8e565b03d4199d2eb70d4d57eeb6782 |
File details
Details for the file chiapos-2.0.3rc1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55c3dcdaa66c814f264266da5a545d41f8cc41bfad04abf12d2115342ace6a09 |
|
MD5 | 9b6fa9c1f23a19f2050d95487e5ad8bc |
|
BLAKE2b-256 | 9e799e84aaa054e894a0370824ea5f76c79d1012312fb3cb9686eb9282edf943 |
File details
Details for the file chiapos-2.0.3rc1-cp38-cp38-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: chiapos-2.0.3rc1-cp38-cp38-macosx_11_0_x86_64.whl
- Upload date:
- Size: 374.1 kB
- Tags: CPython 3.8, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ca97afdaef631ff4091f005f8d1bb2232ad5449a206a61add4700342a77eb39 |
|
MD5 | 7904f287f5994e14b7acc0522806708d |
|
BLAKE2b-256 | a6ae87b58ab4cd42b7f3f4ad14f367bfffdaedb8cb3ec2950bd79254dba43b48 |