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-1.0.12b16.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-1.0.12b16-cp311-cp311-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.11Windows x86-64

chiapos-1.0.12b16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b16-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b16-cp311-cp311-macosx_11_0_arm64.whl (207.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

chiapos-1.0.12b16-cp311-cp311-macosx_10_14_x86_64.whl (236.3 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

chiapos-1.0.12b16-cp310-cp310-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.10Windows x86-64

chiapos-1.0.12b16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b16-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b16-cp310-cp310-macosx_11_0_arm64.whl (207.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

chiapos-1.0.12b16-cp310-cp310-macosx_10_14_x86_64.whl (236.3 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

chiapos-1.0.12b16-cp39-cp39-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.9Windows x86-64

chiapos-1.0.12b16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b16-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b16-cp39-cp39-macosx_11_0_arm64.whl (207.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

chiapos-1.0.12b16-cp39-cp39-macosx_10_14_x86_64.whl (236.5 kB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

chiapos-1.0.12b16-cp38-cp38-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.8Windows x86-64

chiapos-1.0.12b16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b16-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b16-cp38-cp38-macosx_11_0_arm64.whl (207.0 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

chiapos-1.0.12b16-cp38-cp38-macosx_10_14_x86_64.whl (236.3 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

chiapos-1.0.12b16-cp37-cp37m-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.7mWindows x86-64

chiapos-1.0.12b16-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

chiapos-1.0.12b16-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARM64

chiapos-1.0.12b16-cp37-cp37m-macosx_10_14_x86_64.whl (235.6 kB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

File details

Details for the file chiapos-1.0.12b16.tar.gz.

File metadata

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

File hashes

Hashes for chiapos-1.0.12b16.tar.gz
Algorithm Hash digest
SHA256 6adea057815bc3210958bc3f10ffd65e7d65b481356b36aaee6a35aa7cb2ebfd
MD5 cf3c1f275863f2adcf5a2daf2a08fe08
BLAKE2b-256 c735c39ee519118f58d793c58cc9cb855c04b22e6426fbc9fca11552526ed059

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 074b147b478b2e5bd08710c90122e89216ced62db26fbd9a2749a542730219da
MD5 0851ca3f3282b880c8fbcc64f11dff0e
BLAKE2b-256 9b4ca4ba7458736eb02bcb6a6443447acc616d2c32165619593ed9d3779d1ab3

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8cb1d87cb7073f0c0b17501c39fcf1425ba413cfefdc853a590563ac9df6198f
MD5 54f134ab8292885bfc1fa82752ea58c8
BLAKE2b-256 4655a9415afd6474b9fc7c25fc9210e5b36fc77bf21231408e3b0cb5e78502e9

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 613dd42e968a7dd62a52bf063ec2519470310c900a4a8a071b04847da591a438
MD5 b17ec6d5396c2ed4407512ab9104cdeb
BLAKE2b-256 f731ecbd0b74836fa3bf5f0e2086b7d5c797d363cc3fe528c6969cc011c301d5

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2e1a0650d64d9e2e5cca500100c4aebf7a6c954ec85f97786229d43c7924081a
MD5 7e7f11079f409a1e360f3bc92c80a4e8
BLAKE2b-256 ca2a2ac013835ec66349ccba1b17de015dbcb95771310f82915920476ceb8b7b

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 30c97ac6765d48f84dc14c182da3d2e6e03582efb1ef8aced7b72b430e60a01e
MD5 406e0ea1886e1f0f903c0f3e53bcd53e
BLAKE2b-256 137d77fc415ec633e15b210f715319106a6b81ab7971e3bdb9937b864eb7ba51

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 52ff9cb4dd6a7245e424def9caeb1a558fd9eea5beadd5e8642c19317906ec25
MD5 f005257877d0db033203432615a5bdf5
BLAKE2b-256 87bd349c9ebd0ba0de535d1aed4c25c69336ea8c167eda0bc87a6a84cd619447

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b9a86a73f09f76a375fa89344d7eb696dd62b0b2259c945ee3e21776e780926c
MD5 f2ca8f4a18e98da34d78f332b3af61d5
BLAKE2b-256 abcb26f46c83a330857b953608f7adcf2e7333992ea2866de022035e96793daf

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 be62f1ca21a88ab8ff66f32258cb1ef0a5fd82e6b2cc3472d57c833512b6b98f
MD5 4e04892e50b4a13a36e9be142b815c40
BLAKE2b-256 b828ee53c48633859f32b8ee4fd50d31b7c194a2168e7679a1f89e8a9a75f4aa

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 487f14a0456f0355803f5de1f2d88aa3bd8e45ec8b8e3709e905576806e018f7
MD5 620ba292304085def56b07d0fcd8d9bd
BLAKE2b-256 a39e335ee1cf97f75ff956d1fb4e2dd2cf9ceb51064907719ffb2004808040a8

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 4fa543ba082314ee9a1a2dda3138fc8b9aea4def41a6fe42e79bdc73b2042022
MD5 170f950947b7743e819825057a18c01f
BLAKE2b-256 02929b46fa704ae388ef54b6539a4c6f22faa3086342cb6915e3d9a7c329a711

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp39-cp39-win_amd64.whl.

File metadata

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

File hashes

Hashes for chiapos-1.0.12b16-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0c6d7d47939b871272b387bca8e98db242a4a506d154b5704c9d99b6d7125269
MD5 a16e3d49f78756f0a3073ca014d9d2c7
BLAKE2b-256 915bd07c4976b1239d675bad38c37e11fe07a2fbbb60ea4108fd3f7465dd92b1

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f3a0fe50b0bddfe6465cc6232207a1a9f934e8055fb85a93e0600da25cb1405b
MD5 547efaaca73fb7ce00c6124408947393
BLAKE2b-256 19df6e2a3749a43e2fd8c351d1b9ef5bd05bc21b61f3a2e4c3eabf30d0548473

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 090aab12901bfd576385805c1d62a2793e8e38eda4f5f9652d7b861fe14e1f33
MD5 d00c1d0d866f576a9c2fee61ca0a3103
BLAKE2b-256 8b335b78c874db8a2710f2afe735b8251e5871d62d4eb39d51eb323e83b98949

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb6cbd6b28b9f0818573ad6ee9039fd3355d797956ebb9476067495065c8391e
MD5 c0ac3955046a1ea686723d733734971d
BLAKE2b-256 1c60e610960901de93c3ca95b6083d87609a46c0cd462343fcc9687eb5949685

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 8f0d17d474dcb1151b343c71cf30a3b8408aaf44e580013ceabbc0c19d503d89
MD5 16018a2f614434091744ae1f50fdd183
BLAKE2b-256 592f937cacf3179980f065e16996908cd6a9f7cb1b961714e5b39d90f13efa91

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp38-cp38-win_amd64.whl.

File metadata

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

File hashes

Hashes for chiapos-1.0.12b16-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 721b4ab244baa526b878be52aa64cd3309da3e3f9d1c3f0bbde882ba86e6be58
MD5 ec8bbdc7d5bd1688e7acc4d403683174
BLAKE2b-256 25c5c93789da93ad2fee0aa99fbb0fcd4ecb92ebedfec007c5300aecc509e0ef

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 35465ba4d0715e82bbe46055461120b6d579e6f0de5480e99584b94328b321f9
MD5 932465abe82e835d3db40d75657014b2
BLAKE2b-256 c4cfdedc3d2c32f433085d6c70be7b908a175664f848bfb0c69d192963ed8c55

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cd6972a6b983e5d70009438bc47c38b5526bd80c66f2c8c0904a9d2d26a6a2e8
MD5 2de043aae4e3168d3a83f14993a62758
BLAKE2b-256 4cdb59c0f9ec1757b26c79a1f38f738fbfadb768225faa7737c31152e7524829

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d926b4b47549f8da25392a7e41317cbba4f9e0b8e7e4b305d34c13b34b67a42b
MD5 6ec81d5dc27fc5582726936823aa7f50
BLAKE2b-256 ac0714115bc91f2c24a97fc0cd90996294d0671a36145edab65d60fba10792b9

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 3c1b7214fb5b55ed5f3fca5af7646a565f9becc8c5e6b2820231e726b0634af3
MD5 96175bbd79eb3071e8f967bf78d28d0e
BLAKE2b-256 08110d8c138879bac04103a275089f36a565a38b779754c9c1617fa531507626

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: chiapos-1.0.12b16-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for chiapos-1.0.12b16-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 b5eab5307f0ef048a211852bd53b3a0db2d4e063ac1a3725ae1f509a31ade51e
MD5 a43de3ed9862385392f6d359c9423c19
BLAKE2b-256 0223e84145fc6f961e4047a2bb3020965c3d4e046fd4ab767d2c4e521be2aa3b

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 06aaf7052a92674631f7893bfd493238dee2bf297db7228d99b56977f61d8a49
MD5 7fc7ad3c359c0671df07e8cd79bc8533
BLAKE2b-256 5c5cc250c2ea078c43a9f39e0f6e8831b21d49f9d378d90f0f71cf9ae23db495

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4cdf05cab1b1513a4e1976753de9db59a7931e2fac467d6f1f39f020f7bc8fa4
MD5 266186de7ce8662597dd2f70ab899a2b
BLAKE2b-256 72d4171b8381d5431018e351a675a45a16cec418a77e834d72cdf383becc864c

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b16-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b16-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 c7727961f79b855d3bd37efbdea365c695e1ca03179f9ddfde0a20915708ee2b
MD5 047d54a11a41d150deb8422baa109d77
BLAKE2b-256 ea75214e3a7564e16af85ef987cf9dd00ce47a267a81d6673ef52bb2a385d014

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