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.12b18.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.12b18-cp311-cp311-win_amd64.whl (415.9 kB view details)

Uploaded CPython 3.11Windows x86-64

chiapos-1.0.12b18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b18-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b18-cp311-cp311-macosx_11_0_arm64.whl (313.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

chiapos-1.0.12b18-cp311-cp311-macosx_10_14_x86_64.whl (371.2 kB view details)

Uploaded CPython 3.11macOS 10.14+ x86-64

chiapos-1.0.12b18-cp310-cp310-win_amd64.whl (415.8 kB view details)

Uploaded CPython 3.10Windows x86-64

chiapos-1.0.12b18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b18-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b18-cp310-cp310-macosx_11_0_arm64.whl (313.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

chiapos-1.0.12b18-cp310-cp310-macosx_10_14_x86_64.whl (371.2 kB view details)

Uploaded CPython 3.10macOS 10.14+ x86-64

chiapos-1.0.12b18-cp39-cp39-win_amd64.whl (415.8 kB view details)

Uploaded CPython 3.9Windows x86-64

chiapos-1.0.12b18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b18-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b18-cp39-cp39-macosx_11_0_arm64.whl (314.0 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

chiapos-1.0.12b18-cp39-cp39-macosx_10_14_x86_64.whl (371.2 kB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

chiapos-1.0.12b18-cp38-cp38-win_amd64.whl (415.8 kB view details)

Uploaded CPython 3.8Windows x86-64

chiapos-1.0.12b18-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b18-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b18-cp38-cp38-macosx_11_0_arm64.whl (313.7 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

chiapos-1.0.12b18-cp38-cp38-macosx_10_14_x86_64.whl (371.0 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

chiapos-1.0.12b18-cp37-cp37m-win_amd64.whl (416.0 kB view details)

Uploaded CPython 3.7mWindows x86-64

chiapos-1.0.12b18-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

chiapos-1.0.12b18-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARM64

chiapos-1.0.12b18-cp37-cp37m-macosx_10_14_x86_64.whl (370.4 kB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: chiapos-1.0.12b18.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.12b18.tar.gz
Algorithm Hash digest
SHA256 a2885b9de07a6c5eadcc774a9fd91082413b8c5703e2c44c36d0bad267f2ab8e
MD5 60acde2d8821732626b13dc5fff6fec8
BLAKE2b-256 8083e7a065efcf464c28626715321791d122976928856227358aa968496d68e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3329af912e6eba0a0cf7c706b51afecbf8bf552feecbe3b0229f2dc82750c5a3
MD5 8bf5f65a320ee780bbd4744afcb14de9
BLAKE2b-256 73c2336f4e1986e71ad415ba0bde804deca9badb3a4b5b5896b3c6bdca34275b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 68f2e7a4a94c6ce122561bf8965c98c0cf83eb7ea05b9926d67af89068cb4dd6
MD5 460c31f88e7306a2667657072a493fd3
BLAKE2b-256 193fb557dee54c8d014a96219923713b3aaecf6592f9c1469c730cd8304af7e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f9ab22bccfcd4bbde097012a53354a0d3ab6164925ca837799a9b8905aa5112a
MD5 cd6fc2ce0ecf132a6d2a80220f82a996
BLAKE2b-256 905a8e2d786362034a85b8e7178d84f60144d4ba5f2f922459625b263f01aee2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c138b89af22279df738c17bbe0e714fd8ab98c5f4005f707290efcdd0d14ac1
MD5 887005a3248fab9d925d2fed2d82826c
BLAKE2b-256 94b79c1a4d7a5f89500adbb185b5417777d63c1ec5a9900b0ea9a0057436d919

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 7d0673c775dfe46bbd1c6ed97d8257071d002195c13516a0e82ae8e3cae1bb93
MD5 e62247a70a14e608ffa416afa43620a5
BLAKE2b-256 b14423eb518664e818f3857015070f23ec72f1751f0cc539ee2a2ea1b8fec5f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6763d634bcbe53a25aae62d0e0054f87af6bd83171a0a647763fe82c4f9339df
MD5 5c06eeb6cd439c74754cd9fc9594d4d9
BLAKE2b-256 bcaf9c32879598c38d9e61987b844e386e0769d5c945b402e0fe2fca022d4255

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8b31a449396257c155f7f22410192fb4e8bac08def0fe1c2f0549f9198ec0f7e
MD5 17be4b6af848bd281692cc9849915cb1
BLAKE2b-256 7af7171ec4bacfb8b05ffb3c1216230d178a3d65905b9451deb571ea7a6a1364

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8814cf68fb7b33cc2ac69bd6d4b9e2f9ff463ecc1a2d9abe1ceee525fe349501
MD5 bf9a963b603c3a146a47d4ee63ee1478
BLAKE2b-256 75c212aabab4c400d69656ef35a79bba71b22fa0d49a597e6aef7f18dec227fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d881aff72b33de8d35983ca1e495028b71f58086c9271a6203070b964a64946b
MD5 64a416e58579b389b4dcd38efa49c4a6
BLAKE2b-256 2f9504542d709f1a04cda7b2fbd3cfc8e83617f13d0feab53edd9fa2726bc39f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 4c8a249648b8d36aef7dac88448854e94ad833cdb02844a092cc9c610e25108a
MD5 e22ff5c2a6ebd89e1f92af73f9376435
BLAKE2b-256 a20e1b585e27a2951e06859f03d9ecd0c11ffef07b05affcaa54f79e8f6b9958

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.12b18-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 415.8 kB
  • 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.12b18-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f5117d8480600bee858ad2da6430e2f561e8f3bd0e8795dd5b15dc29841c357e
MD5 5a3026b9f5f8710ba2f506281c13d4ac
BLAKE2b-256 c029eb9787eea5cb9f2cdbe6b7b32a344047accc779f57ad40ae2ffe848640ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 709eada3a16c32b7e514c9bfe684ebf9bf09698c66630b5ad117a2c4a580d550
MD5 5c7fcf7d728e5bb9d5522d4b8cf03dcf
BLAKE2b-256 4a87f78ed6b4d2fa51cbf667a3d3737586e7703f9f830ca27186f8fe727523c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 97c81343596f4bab507a81140d3781bd0be469077363720c5cb895ceb256ee43
MD5 9a4f8627edb2af911212fe42f03644d9
BLAKE2b-256 b361620ee6168f397c49643c5288bf9e4efc2ad47b36e189e522cf0d49dbd397

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ae1f2a22145a7d943fa943a7b7d0bee674a5de4ca8fa312ddc669eb3b874745f
MD5 074d523169d1efdb8c8caabf185ec523
BLAKE2b-256 772d52850fd249332b4e24abc07921bdac32a1ce1948fc55161fa700b3fc5645

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9cf51a8ac98202090117530a279e218723b06d0e5fe8067194b67de0f86ee673
MD5 68db318f0aa4524d93bb8c563a45a0c0
BLAKE2b-256 e73b5dea2ee2547a9f785682f2a5d8b84b7dd4f3231cd1e17f7ff66322ae97e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.12b18-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 415.8 kB
  • 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.12b18-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7a3db8fc5b9f53fc31823e3b4ca50ed5c733b6a61e2a250080d5341211f4b05e
MD5 79a339cd0328108446bb9bc13d720b61
BLAKE2b-256 a08430500ee661cb9de5279521e87d6bbdb81df60460f9f679aa59e3e96a6d95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 18062f3bcf4c6a8af7169d51fc147dda9e16449a89050a27fe8af4d6bbc95d71
MD5 83ff923a4997d85e01a92b5d1bc82875
BLAKE2b-256 de610feaef4cbaaeb81a8410fe1db79b563617c76ad4d65297af7ab5f49e0094

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d467fde8edc971545ec2ff0b4551b41f979a41464647b637fc9f68ff5f63ccd4
MD5 c8881f62f19e508dcf2391de49a74403
BLAKE2b-256 890e3e31ad2c2d78c3b2a909d38f61191724da59f3edbe085ea1ee81de619fb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 06f69ac681d1d8af04da27fb292fa5b7c37590c17127a42488d786b13534715f
MD5 b796982302b121838afe7e2ce924a055
BLAKE2b-256 8b0c8df9c182b9797fb9c8331cdc1533af157916cdd57403eba9ac2a755b7d8f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 4b149ea46eeb34c7898daa1a9447eb3cb730f5ea04ccb14f226974b0de002e01
MD5 afc38077fc5beb7d093bf9907f3b8e62
BLAKE2b-256 2174a1465cfe5de9b89eb3baa00fec867c43d9fe121462193dfadd3f1b2fd87c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.12b18-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 416.0 kB
  • 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.12b18-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2a768140116eb3937ab57f8aede646790d61428d4be196c1287751d2c37d3309
MD5 80f2398f6b27debbf2499a3aa75f0c39
BLAKE2b-256 bd8abf3191780bc633c90991eba2fb5162ae96a590346aee7af20f0d7ca1ae95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1bea9f440c4ebfbf7fdc786c9702f40803efce5d62741fb4f2ada40ddef013b5
MD5 de74b954f5a5f5eed1b31107c16e4205
BLAKE2b-256 24b2b3dbc6ad6e2d89792def5ba7e7c0f54d8fe5a83d77905715be3a7c0ad871

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c0ccd2c5f580b4979a31c747e30a130869cb677b42b06307ed71e10fab224d23
MD5 029fff2ecbda5ca7d10afb8431b5e336
BLAKE2b-256 311cec013eb3c0d0e3754fb8a29803e71f2d7c65442884ef151956f9353fe1c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b18-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 30bcac6258461bc16806fa7e21a71581fc886473665cdba3272a0b059d5c1291
MD5 e341b52a2e938ffe574b1aea5fdd6455
BLAKE2b-256 7857eddd8d6f4085d89a286911f847e8b0588fdab5b538a1b72fe54e1fdb6f90

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