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

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

chiapos-2.0.2.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

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

chiapos-2.0.2-cp311-cp311-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.11Windows x86-64

chiapos-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

chiapos-2.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

chiapos-2.0.2-cp311-cp311-macosx_11_0_arm64.whl (314.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

chiapos-2.0.2-cp311-cp311-macosx_10_14_x86_64.whl (370.0 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

chiapos-2.0.2-cp310-cp310-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.10Windows x86-64

chiapos-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

chiapos-2.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

chiapos-2.0.2-cp310-cp310-macosx_11_0_arm64.whl (314.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

chiapos-2.0.2-cp310-cp310-macosx_10_14_x86_64.whl (370.1 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

chiapos-2.0.2-cp39-cp39-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.9Windows x86-64

chiapos-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

chiapos-2.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

chiapos-2.0.2-cp39-cp39-macosx_11_0_arm64.whl (314.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

chiapos-2.0.2-cp39-cp39-macosx_10_14_x86_64.whl (370.2 kB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

chiapos-2.0.2-cp38-cp38-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.8Windows x86-64

chiapos-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

chiapos-2.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

chiapos-2.0.2-cp38-cp38-macosx_10_14_x86_64.whl (369.9 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

File details

Details for the file chiapos-2.0.2.tar.gz.

File metadata

  • Download URL: chiapos-2.0.2.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for chiapos-2.0.2.tar.gz
Algorithm Hash digest
SHA256 618ec63e089f30c787c655bdb0803eca8ba3f974ccbbdccd0c178fe61479b146
MD5 91962bce9e5d4ee1708d44fce50c6d2f
BLAKE2b-256 f00ffc03916aa05181cccf04f27026f2f297a119549ad6825e392a8d9bac7109

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for chiapos-2.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 efa856d29419857a251ab32b6cf2f3094d2b950ec02a37255a8a4fb0105f5714
MD5 8922aab1e9ad61549873f805a04a7487
BLAKE2b-256 85f2877b58a405e547547903e8e7158150d785395a5d2913f7e62add1da93cc6

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e7f35dd1fe4ed10b6227d7dfad2b15d135c5570c69036f580a9e22e695fd96e3
MD5 e25efb2fcf20256e9e291d787e39c6e6
BLAKE2b-256 7c54d98406accc237cb77080724dd11c5dbda0539d630db8d86f2f56cdec4926

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a06653037b01df02ce6827e8a510f4d44e84259ef9279bd71bc50accff502bc3
MD5 c60a4bf5bcf94096ab5cc1563c1366ef
BLAKE2b-256 7037314854d4c47dfe610c9dab2d84080d44b2a68e8d6ebcbe2145768edaf32c

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a8b26c74898beb4b7fcf55ba0f3ad57b1f71d7c7e048d168f93ab1a86d3e3c0b
MD5 d97c2d6febc9a6c10fbed0a79b6e7cfb
BLAKE2b-256 dbc046893303826b32834eb989b90fc3000ee98caeb3a0efac04e3cdc6bbc4b1

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 5e6cb5548534983f210d3d88230ed89ecfa86da5cd20d6dd31705c642de3c501
MD5 abf880aaab0235c717b68d01b6ccdc49
BLAKE2b-256 233775b3b597d968b5eccaebc5d734ad5bea48d18c476a4edfdd00280752d334

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for chiapos-2.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 16918ed5d80d7b492b50bbc06d1799e87f13d992587a39d5a37df1443f0c2526
MD5 acb697e122db12de28fc636607ec9b59
BLAKE2b-256 fc49e5d1c93c9d2aa22ecbae2108cebf7969b2e5bc2548433c81145f63b57f98

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c36f8a1f7c3b9a995e967c3ff3a1f372c0b6058b34e1fe85b0c0de1debe3436b
MD5 7aeb66da9cb7da2e802a06faf336cc5e
BLAKE2b-256 cb2f7472c404eab6f92680dab94b7faf2686a339b084eb8c2061f166914f1bb2

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 09d2329c359621bcd768b4b19003c3953ff38bd48036e66788849bef9b5ced92
MD5 c7c34b1e21b04d0ecd884c5fcedfeb74
BLAKE2b-256 51b5ba1f7c6a153a55f3012dcb036851fdcbdebaa53c666dcc26fc2c7c0564c3

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 60b6991cd1d2e38a722ce7d75a8cd466598b59b565cd598a0818753ee2dea4a1
MD5 bf90a2d651a1834a6e207b73535c727d
BLAKE2b-256 1856af2e25543ddff112da41638ebdcb0841a3bf833864be113c69352ce21c98

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 16ede96b3866312e62de301978ec5056d661ddd291b6b948cd2fef9d60ccec47
MD5 6de6820e45a7a56f455f987fd3d52e69
BLAKE2b-256 ded952b384ef379acca2666894fc81addbdd6c3e83843d4d62680196476175b4

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for chiapos-2.0.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 45ea0c00cc7759a12740ce0d74d7d2913f13049088ea52a1b6ac459e2aca1c21
MD5 3b1f6ff303bfbb65a15b06cd7d294819
BLAKE2b-256 6eecf01a66ff57e791045e8e825d6762d161480f97c72a440874336a6709d28d

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fb9859f0b5a9336ba3e233b0ff29d20c6d8b59d8ed2116542951b86da9d39c48
MD5 c76de99c71a24f6e335ad57bef709f27
BLAKE2b-256 a6e6a934d7047004182fed4debc658a17a15ad540ef9ac3c3dec4ad09dac3c99

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1047fc8efef7b84ea8bd4c8a2cbc25b01dde8861dd95d1a88164305a665ee1f5
MD5 b2a15e7f554c3dad0774404c79874d3a
BLAKE2b-256 4349dab7f1b9b24933881388509b9ee9e889c5f2ddb037ecd02c530f459078d9

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c9a516e1749099f93d393fe1d0fa5a62cb455b926d32756044aaf67c654e8e8e
MD5 68aad8846c50a7185ceb36217e212125
BLAKE2b-256 d8d8d8dab895b9ee81949dbe94367084a2842e8e442d3269747276d0586e39f6

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 91cca13c8caabe5f3cdf9c499edea6f7195ed31b1fe2bec4e4cf853413e04c4b
MD5 dd9874f5fc3e5e16083299e4318c8511
BLAKE2b-256 8642925fc30c8e5122b6a730dca95d3bdab65ecceb51a425de44d1d35762db76

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for chiapos-2.0.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b8386c34785f1b7b6d2a7b18f3d0e20a25dd80226b4cadd3c2d83b4c6537941c
MD5 f333f6eb6c184e4e3ac264239a5233b3
BLAKE2b-256 44f417187f657290ed7456b24d89a829bba24647052f3fcdf2137e6344169d3e

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5a6e218217e5dd2c72b0f48e58567482b0fe9b291e913d8007bf5f4249de8d6e
MD5 a8cbc87ed1757d2b5a428049e960be28
BLAKE2b-256 02afb6772576d00a24a324ef8b656dd67f164dba439be68fecc02e007a7c625f

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 764130e1178942e608db02d0a38b6c06b0b0a26e57535674a7621265500d93a1
MD5 17a898596bf1b589f60a0217663f3462
BLAKE2b-256 1fa60aa893630ca36f4a88dd522d3d9d5caaee45d108801938b0f15f96bad1b4

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 47e69e81bbb3db7d609c803254c25d9fe5faa6b50ef0b7071e33b8a43b38a8dd
MD5 7474f939dd5c2476bdebd4007af45a0b
BLAKE2b-256 e0038ee8f36e7b74a8071c9afae932366876e25814f82806f172648ba067aa42

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