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.42b1.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

chiapos-0.12.42b1-cp39-cp39-win_amd64.whl (230.8 kB view details)

Uploaded CPython 3.9Windows x86-64

chiapos-0.12.42b1-cp39-cp39-manylinux2014_aarch64.whl (330.7 kB view details)

Uploaded CPython 3.9

chiapos-0.12.42b1-cp39-cp39-manylinux2010_x86_64.whl (335.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64

chiapos-0.12.42b1-cp39-cp39-macosx_10_14_x86_64.whl (215.2 kB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

chiapos-0.12.42b1-cp38-cp38-win_amd64.whl (231.9 kB view details)

Uploaded CPython 3.8Windows x86-64

chiapos-0.12.42b1-cp38-cp38-manylinux2014_aarch64.whl (330.6 kB view details)

Uploaded CPython 3.8

chiapos-0.12.42b1-cp38-cp38-manylinux2010_x86_64.whl (335.2 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

chiapos-0.12.42b1-cp38-cp38-macosx_10_14_x86_64.whl (215.1 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

chiapos-0.12.42b1-cp37-cp37m-win_amd64.whl (231.8 kB view details)

Uploaded CPython 3.7mWindows x86-64

chiapos-0.12.42b1-cp37-cp37m-manylinux2014_aarch64.whl (334.0 kB view details)

Uploaded CPython 3.7m

chiapos-0.12.42b1-cp37-cp37m-manylinux2010_x86_64.whl (337.3 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

chiapos-0.12.42b1-cp37-cp37m-macosx_10_14_x86_64.whl (214.6 kB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1.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.42b1.tar.gz
Algorithm Hash digest
SHA256 ee3d9a7c1f2b49138ef5384b406b895eea7fe4092051054c0ecf9a9d06ae0b5d
MD5 a465a26284dcb7f77c6a9dd452fc5249
BLAKE2b-256 27ec0d323708d1c766728596a8647e4d3914682f9c9161b5512ddc10979b704b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 230.8 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.42b1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f3c016bfffdb2613249b4e0db7e6bfd504499af6b2edf8361fc58ab332661a2a
MD5 616135d786de34837b186af8066c98b5
BLAKE2b-256 1cb79566b49f082b8526940a5cb743d55fc708a063cb632a0966e6858799073c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1-cp39-cp39-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 330.7 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.42b1-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bd77f831e644177b21fd8abddd4860f1d009229b7578ae606a286386d4f2b419
MD5 0db401b3f012b68749e636e5a2143dd8
BLAKE2b-256 8412e7ecfd4b80a44e4edd91ab6b3cf943c8977039a073eb489dc2898f40381a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1-cp39-cp39-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 335.4 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.42b1-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5415b56ce15b6666e89d0fb03da8885fc8150f172b333abb8a8fcbeafcda7eda
MD5 42cffc076b8c812b3a8c9b82aa767b1f
BLAKE2b-256 61740c9d718420ba861072c6ed05420f6038dd3701d78270436862c5906709ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 215.2 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.42b1-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b4e83d64c0d23d8daddd4df40f184c43708cceb6f3913bbeb3658f30e5c25d95
MD5 39eab7271fb59efd80d40931db351a1c
BLAKE2b-256 bc4caaaebbf3acf406d02c96ee9d3176b6cee074934c4a180bae27bf160ff186

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 231.9 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.42b1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f04a9abbb44a9f99fd64a2608b6a7e8c06f5542a68c8795e1e0c08df7374d503
MD5 1f48b33a99304ce8936066f51e8db0d4
BLAKE2b-256 5c147f5feb99c7fb0763504dfca84575a2530c9259cd053d7e8b124937242e0a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1-cp38-cp38-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 330.6 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.42b1-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d8391ef5f7097563f68cc46fb1ae604ebd0b274f618ce7fc3c97d4fc36426e9a
MD5 487e0065415f14642bc3055f6677139b
BLAKE2b-256 25a0f062f2766094f0a045a0fef9b13cf212cae489c472814333594be3ce4da1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 335.2 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.42b1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 aad96e79699d82fabbed72fc5e6d905acfdb560bf4d55f4bbaaf245a93b3af88
MD5 7e8844b8838cd52098bf36731fd67fc8
BLAKE2b-256 1c0dfb4e011ece8aa400efab6a8fafc5d390aa7aa82c710d0013b5e9c2c8845c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 215.1 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.42b1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 5cfba58504133b6b2cf586a0c686844dd05bbd89401cda182dcbee2568166ffe
MD5 faa496e3dc4bbb8788c550ea9a1b8678
BLAKE2b-256 037e127b0d574faeb569835521b8a66017a4fa15eec122537444f5d530fb1ba0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 231.8 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.42b1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 77b0aeebfa1acdf79c7acd65aded1c3b7d684d5b43ecce35c6d0bc0581419c7e
MD5 01e7ca06970476b87b6897411ac7e669
BLAKE2b-256 97b6170dd72db84329666095936b221f55874b20c7c02bfdfd8529bde6fd7935

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1-cp37-cp37m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 334.0 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.42b1-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 948cd947f36c6c74b648a03da335dcd2653d53fa49d54535ac15aa880a617cdb
MD5 6c110b17fb857e986321ac4b64fc4160
BLAKE2b-256 9a6bfcdb2abbe5a1e21923c2845ba61f0f0a9e1954d5c3e88751c66c8d651d44

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 337.3 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.42b1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 040879e85941465455358a8832dd76d7e3d4cf0f2fa9812e90c449ab0215478c
MD5 14d30df8156856f693095bed0fd02f0c
BLAKE2b-256 1890c7e0b8807c8881b458676fa2d1bfe47895ef91eb38453f2e431855254b1b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.42b1-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 214.6 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.42b1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 7954b9a0ba795e74b1d6df4ab5e2843318fd9e8b278af00cf8b961d7608cd208
MD5 9ce320895f4205a70f43f758fcf0abdb
BLAKE2b-256 c9c5ba44df70fd1edb580dfc7e2ffd6463fcf27fcde10bf69fe9f79d60fb9da0

See more details on using hashes here.

Supported by

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