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

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.2.tar.gz (1.3 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.2-cp39-cp39-win_amd64.whl (231.3 kB view details)

Uploaded CPython 3.9Windows x86-64

chiapos-1.0.2-cp39-cp39-manylinux2014_aarch64.whl (331.9 kB view details)

Uploaded CPython 3.9

chiapos-1.0.2-cp39-cp39-manylinux2010_x86_64.whl (338.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64

chiapos-1.0.2-cp39-cp39-macosx_10_14_x86_64.whl (210.5 kB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

chiapos-1.0.2-cp38-cp38-win_amd64.whl (232.3 kB view details)

Uploaded CPython 3.8Windows x86-64

chiapos-1.0.2-cp38-cp38-manylinux2014_aarch64.whl (331.8 kB view details)

Uploaded CPython 3.8

chiapos-1.0.2-cp38-cp38-manylinux2010_x86_64.whl (337.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

chiapos-1.0.2-cp38-cp38-macosx_10_14_x86_64.whl (210.5 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

chiapos-1.0.2-cp37-cp37m-win_amd64.whl (232.3 kB view details)

Uploaded CPython 3.7mWindows x86-64

chiapos-1.0.2-cp37-cp37m-manylinux2014_aarch64.whl (336.2 kB view details)

Uploaded CPython 3.7m

chiapos-1.0.2-cp37-cp37m-manylinux2010_x86_64.whl (339.4 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

chiapos-1.0.2-cp37-cp37m-macosx_10_14_x86_64.whl (210.0 kB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: chiapos-1.0.2.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for chiapos-1.0.2.tar.gz
Algorithm Hash digest
SHA256 65c1b29e4019c7d010e5d6206628bf3429d2def45d6c63ff586cb39c6a92bc26
MD5 c43736ba12578b06168333f2a271bc5c
BLAKE2b-256 e8028dc308a992b034ad7c2e8c5b7bccd41da9de571f21c2b255d8063bbc5673

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 231.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for chiapos-1.0.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f2f701ee6a25d28a4ac0685082cfc4c8b4cc7f7fd90de0272358e826920bdb6f
MD5 e98d9cb0d88381f2df26d2834775f11b
BLAKE2b-256 389abe587ff6eb9922b15742f7d632866f970d422f377e9493bc7289d0518be2

See more details on using hashes here.

File details

Details for the file chiapos-1.0.2-cp39-cp39-manylinux2014_aarch64.whl.

File metadata

  • Download URL: chiapos-1.0.2-cp39-cp39-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 331.9 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for chiapos-1.0.2-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7eb31595b2b6480e32623aa25487d2a5256dddd7fc20c8b3c365aeada58a3e7a
MD5 5be6b95b81b14dd0dec14466917cea9a
BLAKE2b-256 e797ba990f64468065e698fcf3afde53bd541d67c39a6bff5d72b5f1b6bc9f82

See more details on using hashes here.

File details

Details for the file chiapos-1.0.2-cp39-cp39-manylinux2010_x86_64.whl.

File metadata

  • Download URL: chiapos-1.0.2-cp39-cp39-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 338.0 kB
  • Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for chiapos-1.0.2-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 fc4cf7bd9048f1c8ef6e8912bb9063aae8222fcad2715fb4d80f343abb941ae2
MD5 41a427605ed8c76bbd74d3c4647e1dca
BLAKE2b-256 6bcf2a7eaef326e4e2bbfd1ddb6d6b8d1100c2dfb2563ee2057e22f88d2a7c3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.2-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 210.5 kB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for chiapos-1.0.2-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 cf39937eddb066702bd1ae578fd7361c9b3443d5f86405b4e3ba9863f2a3a8a9
MD5 807635ec41d66eb7a83ef15906d7e89e
BLAKE2b-256 700e41e27295c997f40bc4de358f60139f2ec6960b362b04216e87f050410d0f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 232.3 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for chiapos-1.0.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4f4f59a4b6a0f174f8582c78b7a2d539210844e195ea27f7fb79514f1c1a5e18
MD5 4a55b1843a086488613881536cb3559f
BLAKE2b-256 a87ae851bc8f89c3131420a6643997951632bcfe03872f30bb86cbf04c86a7cc

See more details on using hashes here.

File details

Details for the file chiapos-1.0.2-cp38-cp38-manylinux2014_aarch64.whl.

File metadata

  • Download URL: chiapos-1.0.2-cp38-cp38-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 331.8 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for chiapos-1.0.2-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2f4ee3fe928568ac4e708fd0479e96d9ecd604db9a64f279edb191e08aefbd50
MD5 9765b0ce5f1fc3f401f370eb58cc628f
BLAKE2b-256 468915d251dff39d8c4f76f16e35f0c8dfd0066ecbc2ffcb5ed0bf05ad456e9a

See more details on using hashes here.

File details

Details for the file chiapos-1.0.2-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: chiapos-1.0.2-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 337.9 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for chiapos-1.0.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 39a7dd06a0ce89cbafb05e5326341688ae8f3ffb7c256ce2b6b9d344c71ca3c6
MD5 b404345fad4447165066b9ce65c9c06b
BLAKE2b-256 929b57b36d6baa0c2d6a9521a6cd6ebcd25989cc90d31917f208b0e4e3f5e82d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.2-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 210.5 kB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for chiapos-1.0.2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 56aeb2e79048dfb939a53895890aa26ca6b4a7dc03c5b068ef45efb113e0814d
MD5 4c4017b19195b3b8949d09396d73a71e
BLAKE2b-256 8ef776206e142b4aad1fae363463b6fdf5a76ac14836c8ad769b998cfd7924e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 232.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for chiapos-1.0.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 82b13b2afd49edcb2adfb07f9680f66ae340913879129904092ea286f2b97234
MD5 88c3a55399ca70f0e307b27627a3559f
BLAKE2b-256 650c279bb2059ff5108aadd5e6dab8d8d76485102e1fe6a045bf93d3e8c00bda

See more details on using hashes here.

File details

Details for the file chiapos-1.0.2-cp37-cp37m-manylinux2014_aarch64.whl.

File metadata

  • Download URL: chiapos-1.0.2-cp37-cp37m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 336.2 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for chiapos-1.0.2-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 895f9fa1388d38072b75682af0c1f81dbea142996242e86a5e16f1e9eed48746
MD5 56a9727b02df25df057ff4eb0c53a281
BLAKE2b-256 7bb9c59be0a6f6791aee1f54f131784aefb972d888dd2fc36cc103e800a111a0

See more details on using hashes here.

File details

Details for the file chiapos-1.0.2-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: chiapos-1.0.2-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 339.4 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for chiapos-1.0.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3d68b3d72e23d9c198bcb2f05a8098853db1f69267acf5b51b403998e7650aa9
MD5 c828f1b3626484260563c0e5bd76ff1a
BLAKE2b-256 c22d6c301d1d50d5d4ddb0b6fe6f76ed7d01f3021ddf4bb7c121f672b0dda9b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.2-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 210.0 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for chiapos-1.0.2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 2c5dc6ee040b55d856b0f0df8f52d8250bbb9deb4e5925f3c86c4a4e867acd3f
MD5 72486e888cfb7d1875af06bfc61f820c
BLAKE2b-256 748d50d75e59676ca5d7879599f08c8dfea792a96ee6d75a87c264cfa2f24357

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