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

This version

1.0.8

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

Uploaded Source

Built Distributions

chiapos-1.0.8-cp310-cp310-win_amd64.whl (254.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

chiapos-1.0.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (334.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

chiapos-1.0.8-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (351.5 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

chiapos-1.0.8-cp310-cp310-macosx_11_0_arm64.whl (193.8 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

chiapos-1.0.8-cp310-cp310-macosx_10_14_x86_64.whl (216.2 kB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

chiapos-1.0.8-cp39-cp39-win_amd64.whl (254.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

chiapos-1.0.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (333.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

chiapos-1.0.8-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (351.5 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

chiapos-1.0.8-cp39-cp39-macosx_11_0_arm64.whl (194.1 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

chiapos-1.0.8-cp39-cp39-macosx_10_14_x86_64.whl (216.4 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

chiapos-1.0.8-cp38-cp38-win_amd64.whl (254.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

chiapos-1.0.8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (333.7 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

chiapos-1.0.8-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (351.3 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

chiapos-1.0.8-cp38-cp38-macosx_10_14_x86_64.whl (216.3 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

chiapos-1.0.8-cp37-cp37m-win_amd64.whl (255.2 kB view details)

Uploaded CPython 3.7m Windows x86-64

chiapos-1.0.8-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (334.4 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

chiapos-1.0.8-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (352.1 kB view details)

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

chiapos-1.0.8-cp37-cp37m-macosx_10_14_x86_64.whl (215.6 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: chiapos-1.0.8.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for chiapos-1.0.8.tar.gz
Algorithm Hash digest
SHA256 64529b7f03e9ec0c1b9be7c7c1f30d4498e5d931ff2dbb10a9cc4597029d69f0
MD5 7a7bed12615b16e42287c4a3f2e416e6
BLAKE2b-256 3a6b829161105128be69efdce127be57aea1c28105d76c5c30a1c753caed0a4d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.8-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 254.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for chiapos-1.0.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2d7af845875fce1814fe491d0e5015cbf6228f5b2d121b14fbff1a493b05b61e
MD5 22f80073179886c07a1fde329e492c87
BLAKE2b-256 fabd2f0fae25c77747bdde0b6f9a09b73943a6d3fa96349e2c65aac6e5739426

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 14ec727b5997a8b6e5e7500638d3f966b5d8fc6f804a44c1728f310bf7107341
MD5 e64cadf82eb6c4f655a1791f31a61792
BLAKE2b-256 abe753a0d189cd103e2bb770501eeaee6de4d0e5cc62651e2a5f2c277130ed37

See more details on using hashes here.

File details

Details for the file chiapos-1.0.8-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.8-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a2b9922b775f9b1c4ef1a963828f49b954249a647176e683ad490f77d92c62d2
MD5 4b9e0c09d37470f7edce572f1abd3df3
BLAKE2b-256 5f6b949cfa96067422f7d7e15d212c6dbc910b23862ca042bde5418bcdec3ad4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.8-cp310-cp310-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 193.8 kB
  • Tags: CPython 3.10, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.9

File hashes

Hashes for chiapos-1.0.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 853a5dcaf7c213020b6aca01405aaaa68647f7c3e02944335055c25a6ae527df
MD5 d258285a9f680b1bc64d937dc5a6626a
BLAKE2b-256 bec845029ec79b5c18ec56dbe02a5b46065cd002b32f261f87e6f193d051cc34

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.8-cp310-cp310-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 216.2 kB
  • Tags: CPython 3.10, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for chiapos-1.0.8-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 8b7b81a4bba2ef48d089f79f9532e63e81c07ec51ae44f5cccee916ae5294410
MD5 116815debe00734f5d0bef4d7d8da26a
BLAKE2b-256 51975c08b47e4378ee87be5e64740a0dbc155a57e52bdd74fcc54b2eb81a3380

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.8-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 254.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for chiapos-1.0.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 be0c2f262b2473a3dffae5a9ce17868fb36ec01a45d04ae99cbaf714d61e3baf
MD5 6e89abb0b9983655adeb2d1336793bb0
BLAKE2b-256 d04a9019c16c1def29fe0da45994f6f729dcba8ed218793f1276f6f2418509c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0b20d466a8bec078b3875036c3732b5492b34db8cd3642913519d3284cd44c13
MD5 16cef31688ee13972cb2652b9646eeeb
BLAKE2b-256 87bdd3957e03faa7b10f5221a16b3a410d32d17bbb5650276768f44631e074b1

See more details on using hashes here.

File details

Details for the file chiapos-1.0.8-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.8-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 94930ca0a42e5592bbae9a24786f804346dd5860b4dc60e942306caab17d8eab
MD5 6b5dffbd3e008985d54c8e8cfb8ff8df
BLAKE2b-256 c0ff33a69590ae8514052342f02b51775b20445ff5552a12f4e2b4837252abc9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.8-cp39-cp39-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 194.1 kB
  • Tags: CPython 3.9, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.9

File hashes

Hashes for chiapos-1.0.8-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 087cceab57405ac7b9b21fd73ddbd98a59aefb9713636a9821b8c1c435ee1121
MD5 2d512ff0e38e79a1de80d9a0ec025d84
BLAKE2b-256 c8ea8e25d0154b682c37391fce0cc3f40e853cac57dec72518d9f248d4d5d1b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.8-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 216.4 kB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for chiapos-1.0.8-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 7eb145040b2c11aa5b5b8c3533578d2cfc8a507c9c9894a3b09e0872f2556eea
MD5 09b591df73b465b61821b8e9cda9939c
BLAKE2b-256 92da03273ee7f7a3ea0740942309ceca7e7f1f5c1d9439c5beebe52c1817057f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.8-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 254.9 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for chiapos-1.0.8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 cbb7accdd65fce803eb217f9d24ace908eecd0478ecf78232c0a6d7785e4e393
MD5 4f0aa7b4afadb3893458aff7da640ef6
BLAKE2b-256 3bc3f35d87687b58b8b4052c76a0d1faa2b547af8f2f9dd3739218edd6db3313

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e8e1426860d2d3490fe7a464d7856e4e3a5224720d731334b99085826c134423
MD5 689268922503b0c82592920fe35fe3a0
BLAKE2b-256 33f4a14e308c948e91b4bdc09ec4615f87133a8eeb188445b16a7aecccf8183c

See more details on using hashes here.

File details

Details for the file chiapos-1.0.8-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.8-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4cc936507bf733b9d73da67f7629f5b67e3dd6f8ea83ee08e771426e8be6f815
MD5 68f27f011e1272a9a73725e3548081f6
BLAKE2b-256 403e543e0cd98d22694922e8fc7046a19bbc9e62d5587288a0465acde39a6559

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.8-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 216.3 kB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for chiapos-1.0.8-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 5b4eeaffea82c6e15776230829568a930ed9b46be09d6b7ba1733c0bfe041298
MD5 b0c684daa9f56f371c7c0762a9a24384
BLAKE2b-256 667cf4a879ea39a18d642d30a1e5d0b2a2fee3be016f3013a753c0682921128c

See more details on using hashes here.

File details

Details for the file chiapos-1.0.8-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: chiapos-1.0.8-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 255.2 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for chiapos-1.0.8-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 87dfd73c46076ed8d5f344582029b65a39797987c338446d730adca6511b676c
MD5 8d158910f7fcf00a167ba39e00f38c4e
BLAKE2b-256 428b1ca63fd6a16479ad6be97d901fe3e0aad18fd7c5971c64a6b5b80fa5734f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.8-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e0bf47ba216f5ed5dcfd28b64e72938c4210b15843fcca005a558b655b8453f9
MD5 ade8f0c6f8d64558957cfedd0421e08d
BLAKE2b-256 993936695f486273a2ec2290ca2a0144ff723494cdc7d5d047d3ab6554e3a25f

See more details on using hashes here.

File details

Details for the file chiapos-1.0.8-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.8-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a7cca036e85193ee9ac497ec36ffa3a8fdf87e9531883d2ee0ca32e6eee41d8d
MD5 afb6ae8474835f5cc06687ce88fcf044
BLAKE2b-256 83e45eb73c910d06e020d8dad553438175fbbc02f510ecaba20c54e39f24f498

See more details on using hashes here.

File details

Details for the file chiapos-1.0.8-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: chiapos-1.0.8-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 215.6 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for chiapos-1.0.8-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 31c3bbc02f1df559c0369152a79ca81e8e86c5d74c12e0cc3b485222f8ab6a9c
MD5 e3f11c3872c3e342a15961c237e1fbd5
BLAKE2b-256 634caa47eb888f59716f0b9ee2aeaae675b3ee11d5c9efac0749e54d3a2fb13a

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