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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.11 Windows x86-64

chiapos-2.0.0b3-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.0b3-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.0b3-cp311-cp311-macosx_11_0_arm64.whl (314.4 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

chiapos-2.0.0b3-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.0b3-cp310-cp310-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.10 Windows x86-64

chiapos-2.0.0b3-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.0b3-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.0b3-cp310-cp310-macosx_11_0_arm64.whl (314.4 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

chiapos-2.0.0b3-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.0b3-cp39-cp39-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.9 Windows x86-64

chiapos-2.0.0b3-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.0b3-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.0b3-cp39-cp39-macosx_11_0_arm64.whl (314.5 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

chiapos-2.0.0b3-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.0b3-cp38-cp38-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

chiapos-2.0.0b3-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.0b3-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.0b3-cp38-cp38-macosx_11_0_arm64.whl (314.3 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

chiapos-2.0.0b3-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.0b3-cp37-cp37m-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

chiapos-2.0.0b3-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.0b3-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.0b3-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.0b3.tar.gz.

File metadata

  • Download URL: chiapos-2.0.0b3.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.0b3.tar.gz
Algorithm Hash digest
SHA256 509e9754c9cf09cb2e611d366bfc4828763a58b1adfaf1595887d54ff78c3744
MD5 b3f2cec9c8474565b84cff4af42fbe4f
BLAKE2b-256 3a0f46e4071ff81eb6bda75b32300eba9349d9ac43df14ee3396a52dda90a91c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b17d2adf8b6e9432f814fa30c4553c3c687d524eb530d9d9c2e87474216ff18c
MD5 910513cf22f69348b4e87673cf53b21f
BLAKE2b-256 0e6843173d58452239916837ac7df55c7ddb7f46d64578125e8ac6c39ba98168

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26d13e382011babfc8532e40a6c1c849823d7ee1141382beedfb07b06bc588a4
MD5 9e042c28eddfbca98ca12789923cc00a
BLAKE2b-256 b25b214f444c818c6ed27192c77d898409fd94f2fc4bd727b4e5b4827a07be59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2d501ce702772505a8b85082abbd994c92c2b1d700ec4a0517252be4b7167a76
MD5 6370135d21767f269bbdf18ab83049ec
BLAKE2b-256 1f8a17ef7616cc98d829c60baf9da7b9ce27210f84816df126f752ebca6f2f47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3d6ac9197378fc72c5a7b29522199bfdcc410c37b7981ff0c58c856c7deacca
MD5 967902e8de9a5f6c7388fb88525ed43e
BLAKE2b-256 8971e1e39dab9c86f2094c56e8aa576919f50d0f8891190f224f4d627a543945

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 4a0858d06fe47590607cee189255807268d3d4398154a495f74bf8bf538ba521
MD5 937f2089906a26bf6b731d9d5f46cdc2
BLAKE2b-256 cf815f2e649ca22b4be0e0da6758f6fd0a47af12422d936bca3497e453fca3c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 71bbd36cede0206bfa58ae73bfbd5955316e5aa522457a1b980a2678a3b5f526
MD5 4b1e7d7099f6f9cb0c8423cf81dea29e
BLAKE2b-256 cb7e382bd94e2425c347b723c31f3ff2c58e74ca6c1e4fa61c607cdb5cf079b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 29efd4bd7ea5cadb80216664dae4d2d75b8c9db239c043e60cf6aa82a1294b84
MD5 eaf7af2181ea1096b995a3512ffa6916
BLAKE2b-256 91a6a58778d5dddde7fbae31c0413e43159559cfe86b6bacacc05bf6ce2653d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 048043561495613d530f372dc43ab44cdc0e688adecb7c2be54d2021c841ac08
MD5 c47056168df0af349f66986ec010a84c
BLAKE2b-256 b5697c67a67c39230054bcc6085793306e12e6c3e9ee598a33968758d79f5173

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0a3a53c156bef9ccff3030f3cd93c0a4a9bd21eea7dacf5a5defbb432b40ee10
MD5 7c5161213d96f5c47a9e0382fbc7696a
BLAKE2b-256 c3dafef0930d6014cf85253fba6d4c99552f820b93019e459ed184f6ce5ea43b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 49f6af3a94d9f9cdb87e5b735fbc2cc35f47b3cd4708ad2d1f5c641ec2463962
MD5 db7a5b70ec3ba914e84831845ca8d54b
BLAKE2b-256 ce8cc86f21b4f843c949d09718730c6d37a0da64abf5d00a47f185f844aedc12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.0b3-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.0b3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a2036432a5d6b99e99e364dda9829dae5f2cd615e18340b74d829f261f8f0c79
MD5 cba62d2f951fcc97df6d42d7be3b5f85
BLAKE2b-256 880912602961136e3af0d3a87b6f3ea4971d72147c94a1ed58601436997f54dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4344086acd121cca9de0cd9cfd37f2d0db098231f0de7ab7d31e75e02ff4b34f
MD5 8d296a1f3ec09c1acece018fd582d5a3
BLAKE2b-256 504cb986f2d2522480a210da7e4d609b7aae2fd62b075f74f4a761ddf2c692f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e6ba135b931503c8660e7bbb2518967d743a1015f65f90e8d0437552d8e64dec
MD5 63a3fc12bb0543082df1ced04c3e41d0
BLAKE2b-256 84dc38a85340a5ef7941ba8eb7f665c99248d3fa8b7a37f1be616a13da75ca30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d4e305228222362af7c6ee1b966cc523a0eabffa297cde085552d8e2c8211948
MD5 8b66091b3dd5e928c87520c10d6e1d66
BLAKE2b-256 4e802031f736836e8e85c04d8796776c4e55935855e9c0fd7b213d9da0af7e27

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 8e97311a09ba1bfb7e01e121e8e4f78af4466322693cd3f30db344c174f7d7a0
MD5 5ec881463973b98e7dd9922cfc0c3596
BLAKE2b-256 3050011f53e8ddf5ab8a14f76c864444fce205213c05d1a5f0028d6152c990d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.0b3-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.0b3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e80528c92390db16fc0fcef19a84d91499380c52d90ff1bbad25729c0b73ae36
MD5 f9f98cf801ce89d27e17aa1431579afe
BLAKE2b-256 8882eb6571ec36d67c67ac77992888b433d1f8d0cc823496c8afc3d712cc8d18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 601b06bcbe6394f3c2690cbd9977b9b15fa754f7fe2307e821da0d1b4d2706c0
MD5 0800a099c421a721fb0fe8812df155b6
BLAKE2b-256 9b6c1b15f2935c9b217e7a48b0fa470c05692f56c50c2a6a75b30e85a774f403

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 472494ee3a87bbd41ab1a8dec27d2e2cd6cf68ff1b1588793dae7119ca4e9a69
MD5 dd60154e7baff91fc988d268f7af5c95
BLAKE2b-256 a0781c9e37f6a7fa7fe17ce9bf0bd1abc47ea657b1fe49669f6c91079983c4e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4a1d70f883f992813cf6d9a774e156aea6161dc364341007042125917abf73fc
MD5 c0d68185a88a15247640674bafef66d8
BLAKE2b-256 5df5b2361e28ed764e0f0c0e5c83e1bf5dc4a6e4127a6728fa6973d5ad03fa2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 025de4a7a10f264739ba5cfc746846bd2ea8644cbc07f5a9c3cafe7b228de209
MD5 78cc8a5e1e56d7d233aa389b602fff3b
BLAKE2b-256 3168d266d3ce818a376ed872407bf8b9c4fbc7ad3292eab297cf892ee1c2b647

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 5c82e34b94dacd4c00a014738f9f9dd692f6c368db81e238e3fe1421ef35ebdb
MD5 b57d1bef7c8bd72c86a1e101e2079cb8
BLAKE2b-256 505c9de4af630ab72df3437d56f9461400c86d4d030267bd8fe302d5967d36d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 22559e5a9c2c73df804398c070c2e89544cf8decacd35192ecb21d4e33f89650
MD5 c8e44bf4df1984fd1de87d2a2c777ba4
BLAKE2b-256 3f748e680b91beb4c3cafb41bdee3c5b19e4c0b1a3a4cbdf4082c13bf7bd0887

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a48b07ab96feb0f1ea223eaec4f5850298242e5ae1fc53e9fe1c99f630888129
MD5 2a8da898a93fa9e792db3dac1c846c0f
BLAKE2b-256 b70e877bab327c367ae387ebd5f1fb1937e0b22f234186bd3c9bc67bf84cf42d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.0b3-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 3f52263a519561d6c64cf95020e435e3b3af020d36bca73954d0fda769060c5a
MD5 39693579c44927ad4ebe54dc44ccfba3
BLAKE2b-256 e7b4bd4845b362b9c958d94d2cd78ce9152c29eee0743c99f81906785eee0e30

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