Skip to main content

Chia proof of space plotting, proving, and verifying (wraps C++)

Project description

Chia Proof of Space

Build PyPI PyPI - Format GitHub

Total alerts Language grade: Python Language grade: C/C++

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 master 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 master/release version in preparation for a new chia-blockchain release. Please branch or fork master and then create a pull request to the master branch. Linear merging is enforced on master 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

chiapos-0.12.42b2.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

chiapos-0.12.42b2-cp39-cp39-win_amd64.whl (232.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

chiapos-0.12.42b2-cp39-cp39-manylinux2014_aarch64.whl (330.8 kB view details)

Uploaded CPython 3.9

chiapos-0.12.42b2-cp39-cp39-manylinux2010_x86_64.whl (335.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

chiapos-0.12.42b2-cp39-cp39-macosx_10_14_x86_64.whl (215.1 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

chiapos-0.12.42b2-cp38-cp38-win_amd64.whl (233.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

chiapos-0.12.42b2-cp38-cp38-manylinux2014_aarch64.whl (330.7 kB view details)

Uploaded CPython 3.8

chiapos-0.12.42b2-cp38-cp38-manylinux2010_x86_64.whl (335.5 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

chiapos-0.12.42b2-cp38-cp38-macosx_10_14_x86_64.whl (215.0 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

chiapos-0.12.42b2-cp37-cp37m-win_amd64.whl (233.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

chiapos-0.12.42b2-cp37-cp37m-manylinux2014_aarch64.whl (333.9 kB view details)

Uploaded CPython 3.7m

chiapos-0.12.42b2-cp37-cp37m-manylinux2010_x86_64.whl (337.4 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

chiapos-0.12.42b2-cp37-cp37m-macosx_10_14_x86_64.whl (214.5 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

Details for the file chiapos-0.12.42b2.tar.gz.

File metadata

  • Download URL: chiapos-0.12.42b2.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for chiapos-0.12.42b2.tar.gz
Algorithm Hash digest
SHA256 14d00f60f54cdaca7b8119d1a8e733d91a2a395ee0ca48bcbbe41e3ed2271650
MD5 de51d5025fdd54547e07d37b80fb015b
BLAKE2b-256 ef51e33aee71999c51c4e7dbe98da6e743f6dec176856e82f54dfe6d964ffd40

See more details on using hashes here.

File details

Details for the file chiapos-0.12.42b2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: chiapos-0.12.42b2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 232.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for chiapos-0.12.42b2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bac80bf73895bdf2e5d0003bf3aa8c5ef5dedfc95276fea9fb4c664e37def80f
MD5 39c8e6db1922e751e207c4ecebb976bf
BLAKE2b-256 576023ac8389096a5d013bdac3cb35fb0cf384f339ce88b49d696c24b0be75c3

See more details on using hashes here.

File details

Details for the file chiapos-0.12.42b2-cp39-cp39-manylinux2014_aarch64.whl.

File metadata

  • Download URL: chiapos-0.12.42b2-cp39-cp39-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 330.8 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for chiapos-0.12.42b2-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fa97f871d82b69bd857105ead2dc8d2d4433dec29e840c6d34623dee8a4989f4
MD5 eb1e2869176f7259967fe9dc892165cb
BLAKE2b-256 edad0587c3bbd8da79de13fb5849f72ecf788e10cb59cdb42a1875cc0c1d5e4d

See more details on using hashes here.

File details

Details for the file chiapos-0.12.42b2-cp39-cp39-manylinux2010_x86_64.whl.

File metadata

  • Download URL: chiapos-0.12.42b2-cp39-cp39-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 335.8 kB
  • Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for chiapos-0.12.42b2-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 eda83a788f5440ba5e58d1f8079224ad2c00444d50f373019b1f2addfeeceba0
MD5 1f1d519b75fb5e1cce9593d76e1d9599
BLAKE2b-256 88da7f81e30512b115f60f53588bde93c8c2de1777a0a8043ea974d276e8dc31

See more details on using hashes here.

File details

Details for the file chiapos-0.12.42b2-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: chiapos-0.12.42b2-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 215.1 kB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for chiapos-0.12.42b2-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 e166022ba58b94758ea406671c51c7a31a6172f95f039bae0ce6699fea33370f
MD5 6c28b0592d966c099169671e1d12c440
BLAKE2b-256 5a65676d2b7bf5c5df5d9a3e83eddec3d7dae0cac026f55003e9c1245aa21cd0

See more details on using hashes here.

File details

Details for the file chiapos-0.12.42b2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: chiapos-0.12.42b2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 233.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for chiapos-0.12.42b2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 656f8cc63a7617c007781be1e225d2ee8b7300742ebf3267c5958f8f5ee4ddb4
MD5 eaa65cc690c97c92e805df38e5d7aa8e
BLAKE2b-256 92b4b9a3d31c996407e5857141368b3bcaf28e237d30f920a58c2685c58d95e9

See more details on using hashes here.

File details

Details for the file chiapos-0.12.42b2-cp38-cp38-manylinux2014_aarch64.whl.

File metadata

  • Download URL: chiapos-0.12.42b2-cp38-cp38-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 330.7 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for chiapos-0.12.42b2-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9171393101c5ca73571ab520950ae1207b28959b2c0478aa7825af06e98de97b
MD5 ba131353074c5f091bc17f76391eb35c
BLAKE2b-256 41f66d902be5291169a3d9f7129c739324396c995579fe75c06b5583bfc38494

See more details on using hashes here.

File details

Details for the file chiapos-0.12.42b2-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: chiapos-0.12.42b2-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 335.5 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for chiapos-0.12.42b2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ef60a0e0581a9aa31df9b67862bab0c130920026a686737788d02b34462ece61
MD5 8eb76553ffb31f2995536bbc0da4bdf5
BLAKE2b-256 147ab18ef8fa0159818a809b0cfd793660e17160101b9d3886e4d125d0873ab3

See more details on using hashes here.

File details

Details for the file chiapos-0.12.42b2-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: chiapos-0.12.42b2-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 215.0 kB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for chiapos-0.12.42b2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 2fd99e9b907212dddcaea95fc2937e0724ed419f14d347d4800bba000b6f1b57
MD5 c696f6adfda3cceddecbc4f390c0b513
BLAKE2b-256 336c06dfe55b47cb97f2a048e16e805f2d80a8a0dfa7b5f356c096016e2ef258

See more details on using hashes here.

File details

Details for the file chiapos-0.12.42b2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: chiapos-0.12.42b2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 233.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for chiapos-0.12.42b2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 855a5c71acfca363744dd7db4aae89409df4a001ff505f621eb7b1a74c5585d6
MD5 aed276a8c7df7bfe71a5fbb5d1c6229d
BLAKE2b-256 12019b7cba7a0f405314173e4d6f89601b94e33da370a378763e4763644d7de5

See more details on using hashes here.

File details

Details for the file chiapos-0.12.42b2-cp37-cp37m-manylinux2014_aarch64.whl.

File metadata

  • Download URL: chiapos-0.12.42b2-cp37-cp37m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 333.9 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for chiapos-0.12.42b2-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5261b95a79dc1f8d92d36f570aa73527690c0e5d762bccede32c3b8628197272
MD5 f8e0c53f1373a1b073bf2bf80f74d28d
BLAKE2b-256 b326494af2627510ef10b7ced5ce40fc048d6ece99cf67f8bed1dd280cfda158

See more details on using hashes here.

File details

Details for the file chiapos-0.12.42b2-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: chiapos-0.12.42b2-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 337.4 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for chiapos-0.12.42b2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 7968fbf402039bebf822412803bd9dc26f1cb9e8bc8ea5a7c6c2c59f8f9078c6
MD5 3e0f200c70853f5f43214ed737ed597a
BLAKE2b-256 0b80f888957e3cf206c1e75d9e44f426011e55119cf2f4e9973ed86dd23675c8

See more details on using hashes here.

File details

Details for the file chiapos-0.12.42b2-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: chiapos-0.12.42b2-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 214.5 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for chiapos-0.12.42b2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 38c8c5a89e63705ac34a689997399dd220b602ff99c3afd6566f5a3af9ddf461
MD5 c4ce5c20131d3e261b4fef2e1646b64a
BLAKE2b-256 a67ae14ecc3e4a24c16c2f0fc3a9636fcb22a0e1139542753bafcde3f1c5d08e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page