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.0b5.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

chiapos-2.0.0b5-cp311-cp311-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.11 Windows x86-64

chiapos-2.0.0b5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

chiapos-2.0.0b5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

chiapos-2.0.0b5-cp311-cp311-macosx_11_0_arm64.whl (314.3 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

chiapos-2.0.0b5-cp311-cp311-macosx_10_14_x86_64.whl (369.6 kB view details)

Uploaded CPython 3.11 macOS 10.14+ x86-64

chiapos-2.0.0b5-cp310-cp310-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.10 Windows x86-64

chiapos-2.0.0b5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

chiapos-2.0.0b5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

chiapos-2.0.0b5-cp310-cp310-macosx_11_0_arm64.whl (314.3 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

chiapos-2.0.0b5-cp310-cp310-macosx_10_14_x86_64.whl (369.6 kB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

chiapos-2.0.0b5-cp39-cp39-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.9 Windows x86-64

chiapos-2.0.0b5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

chiapos-2.0.0b5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

chiapos-2.0.0b5-cp39-cp39-macosx_11_0_arm64.whl (314.4 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

chiapos-2.0.0b5-cp39-cp39-macosx_10_14_x86_64.whl (369.8 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

chiapos-2.0.0b5-cp38-cp38-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

chiapos-2.0.0b5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

chiapos-2.0.0b5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

chiapos-2.0.0b5-cp38-cp38-macosx_11_0_arm64.whl (314.2 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

chiapos-2.0.0b5-cp38-cp38-macosx_10_14_x86_64.whl (369.5 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

chiapos-2.0.0b5-cp37-cp37m-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

chiapos-2.0.0b5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

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

chiapos-2.0.0b5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

chiapos-2.0.0b5-cp37-cp37m-macosx_10_14_x86_64.whl (368.9 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

Details for the file chiapos-2.0.0b5.tar.gz.

File metadata

  • Download URL: chiapos-2.0.0b5.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.0b5.tar.gz
Algorithm Hash digest
SHA256 56ba9d8686d9d058bafc2dbb0fd1dc4f0a14f849f64e8da1568702c499221779
MD5 ecc8b2daf6c320bcbce34de3e1b0b707
BLAKE2b-256 19c50934f3d042ef19d01eee1e448a7f7bbd48c0c51f4f77c4821bd61f12c10a

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 91bd9cafaa668a2cdcfa4cc823dda1f88cc4a8e5fd1f1b348bd7403f52911608
MD5 8a4297dc24a70cb3424b21eea4be3e07
BLAKE2b-256 bc8fe0f7f906843ee4a43e24865966db79adca67e11f9431dc15812e7b68911e

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c8b6f992f15f481516f42214de97847dae0def23295ec9f4c032b3a138f76fba
MD5 f49feb01e419285fcc10ea66bf0524dc
BLAKE2b-256 903450c798589a2dbd2ab0c045520786026b5904c045b6863795b296e6130181

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1766fb2eb10802f84baa677bc1c10e7da836ad66868aa9c4cde4f0896b013299
MD5 577ab26a59c0507d80fe9aa288893551
BLAKE2b-256 23590172257477c204509af1b6bd813458ad483f98ed28411aaaf5570a1a918e

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 43bd50eace7b1e71943b6099afbc261d7f99d9407534ed80a92898117186a569
MD5 6d6943663f4a0e1e24cfe883da7823b9
BLAKE2b-256 af260b61109a0ba70344d90e7af4f694609ed8a0cb7e8dae7508df8b4d107bc6

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 e09f6e77778e33afbb284201efb421b16cfe3d802e03dd8eb821841d90947d52
MD5 d9debf80c17efbba05e27d493afd07ab
BLAKE2b-256 c5485ef940f699748cb8dfa1e7f182228391b515d9103020e24109fc39ae6c3f

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 96a9ed6af007457da931afc3fb178ea991e7cf08fd5a16f6629fa44d82938954
MD5 96d5ed6a908e6acc8743af63301a22b7
BLAKE2b-256 35034926be302ede8b525ce49187fdc535ab8b3bb3bcb9dabb6b4287c23e4dcc

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 842e34b1dcc1965e5d2fbfccf8ace7fb4c561d5c0027d58852cb4535e3be6ee7
MD5 dc9cd9a8d2fcc596598a08f3769e5fc6
BLAKE2b-256 38fc709ab159a9095b3afe421bcbd8f35f075143b92e40d8f2832913c3979ddb

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f08f2384957877b25316b2e703a807ea63fa132cce092c265c5844610b6cb62c
MD5 e216603148886dcc7264bc9ab3d4e43e
BLAKE2b-256 e2e7231f496bfc5b1a58e973a1133dd47cbe00b91409926da91964dccc41086d

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3745859d70288efb3b18969fe5fd1490d4f84e4847de606c9c3ab6efe5a375bc
MD5 d9110ab3c4de54682ed82678ba85cbc9
BLAKE2b-256 a1e1346f79d350d4c41b001f3366bc2e274722906c256f02a2c259d076b0aad8

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6915023bfd4fe847cd844110b48f43def6b448d1bc8e3071c6412ff27e8e5c19
MD5 ef5ea72ac2f1b85941b02b8f7cf7e4c8
BLAKE2b-256 2d1e99df4787d2f7b8406e534f72a7f7304b48b4a301b0597a87c3808666645b

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.0b5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.6 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.0b5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c67994073b7b6217ba5a43608da3bf16327dbb22cabbfb836e1942499c08efc9
MD5 a7b0edeacb41fc3c00bfb40f90b762c5
BLAKE2b-256 ad9f4b8a8ab72b431ca8ad272b3c03e1e69802a90f2087de2a5a9f3abc1a3b1e

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b3944d2d9c83e1c3b757a4b06d1ff0117c4914f88300d6b17958dc1ef132b73
MD5 fd6136234eb8b64d57c0b932a3531dea
BLAKE2b-256 53e28e618bddd3d31a0625695b2c22aa2b8e59a6ddfacb525b3998fdb37e075a

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6d363a3d8abd8d7be59d9f76d5c10eda7aec2d311e05f95f6cf75715d410ba4e
MD5 d2b91998e345d95da8c5c3c01f4739be
BLAKE2b-256 fcb81353a1de7003898ef8ff9bc558e642f739d63cfd72c7358cba9be412ffc4

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bfa75313141785a3c2303ae45b06059c46c7d1b7a8c426d9dc620e6deec563be
MD5 938f761bd1b61b4089c933b108c0f421
BLAKE2b-256 f553d1b5f424503d82eccdf307b24159474b09516e8908afa1777354f913b0a9

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a24a1e8a86cb90972387fc563fb7ee2582ac07afa0179c88384486914c4fffa3
MD5 d09eac29cb5fa27b9a54e24614b10216
BLAKE2b-256 ee7c0d317bb3244a216127dbae9865087df8dd4a81e8a313bd44ce27e5d2dc68

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.0b5-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.6 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.0b5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e78a5a02afdff619a99ae3274ebe72dbf7a9de1278b6417bc5a9c5824bc21756
MD5 c572f752f742cfb1f4a735ead2b4ba05
BLAKE2b-256 227e9819c85cd494ae4f23386f1a08cb5ccdf932501bd97b92fa86b2f99ae085

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e7b1ff6c2b178532f20027380c9f321a0f40ee98e370256850d51b7ccd5bd1cf
MD5 985281021d76e344c1b991bd17d50e44
BLAKE2b-256 f72966cd09e09e47650d87d0920244aa0fceedeaf575619207b5cfcb3ba5e94e

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0762a0c59cfa9d755df6a97bdc283460a6510dd5a5830b618a45a1f693433580
MD5 e2da67d5b2b518c561e84c094c7bfe2a
BLAKE2b-256 3d328159cf2a5460aff79f9e4cb20dc98a6dd8febc2dbaa11ec01bf7d6403cb1

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 00d33f46b1099f7bc37fd7a2ba4a6220d56e3f58caf5fe0f76728da932fcdb53
MD5 cc579d82a72b70c251189a9c84d16007
BLAKE2b-256 95283ee09e7c8f74e430a967e297c807b1c832d151993234e7b24c83d8ac7f02

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 fcaab478fd026d863dd1450f834b41478665bc4277e2a8a8ac54809a51eaae49
MD5 c683b2601c7f1ea6957978d960e99c84
BLAKE2b-256 cf24df606251607137a6195f1c253b8894a890798a7a1ce8ff6b321cb169a690

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 6ac7ab0492f1919f11e475f4a990f7f91d85ed3c3e041e769dd86329e21951d2
MD5 9e0f9a21ac11e40298d79eb7560e5051
BLAKE2b-256 3ec193b9439dc40e9d2b01c4cf4c9cc4dce9179f7c716246a41b89acc7c4fc51

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0faedeebe8ce5d2e0a17f64d6b6dbccd685b77de84c7c6b6b880877e732c0955
MD5 7c544eb870c467b1c9de7652e8dc7313
BLAKE2b-256 f819b3ffc203c3c7876399a3b7cf318c034d1ec147c5f67ceef0dd95b476ce4b

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3a6c83d9089a33e2702a0acd37b356e7ee3a6cb3002974448b327d5c142af4e0
MD5 ecd9543c52d1a864fccaca48604bc13e
BLAKE2b-256 684def39f036510a4a55f4a41e5c28eaab3fdc3487437dea541faa18325511fd

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b5-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b5-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 ca60fb2b52c9ad9e17b20906be543d46a344d2fef2372603ef763ce3bd7ff84c
MD5 7d7586e7106119decfc1a403358715d8
BLAKE2b-256 6d4262e0ae03c12912ccaff0876c9ddfcd478cb3aaf944e16ed43da7feef60f1

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