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.9

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

Uploaded Source

Built Distributions

chiapos-1.0.9-cp310-cp310-win_amd64.whl (255.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

chiapos-1.0.9-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.9-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.9-cp310-cp310-macosx_11_0_arm64.whl (194.2 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

chiapos-1.0.9-cp310-cp310-macosx_10_14_x86_64.whl (216.4 kB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

chiapos-1.0.9-cp39-cp39-win_amd64.whl (254.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

chiapos-1.0.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (333.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

chiapos-1.0.9-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (351.6 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

chiapos-1.0.9-cp39-cp39-macosx_11_0_arm64.whl (194.3 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

chiapos-1.0.9-cp39-cp39-macosx_10_14_x86_64.whl (216.5 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

chiapos-1.0.9-cp38-cp38-win_amd64.whl (255.0 kB view details)

Uploaded CPython 3.8 Windows x86-64

chiapos-1.0.9-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (333.6 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

chiapos-1.0.9-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (351.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

chiapos-1.0.9-cp38-cp38-macosx_10_14_x86_64.whl (216.4 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

chiapos-1.0.9-cp37-cp37m-win_amd64.whl (255.4 kB view details)

Uploaded CPython 3.7m Windows x86-64

chiapos-1.0.9-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (334.5 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

chiapos-1.0.9-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (352.5 kB view details)

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

chiapos-1.0.9-cp37-cp37m-macosx_10_14_x86_64.whl (215.8 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: chiapos-1.0.9.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.1 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.9.tar.gz
Algorithm Hash digest
SHA256 7a6107211ef84622032b4e1eb4effa1bbb63cd3b9f395978acb4566c4b108add
MD5 fdb0d9f622d0f4160ed6dc2fe9b02d7f
BLAKE2b-256 27b5cfc684a398db3c4d671b2baf9749cd589978252a04749962e1f1b1fae313

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.9-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 255.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 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.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3ca4e61734d4a745fb77778bc9cb536e0c9c6cc706e89f86d13b24830421f40d
MD5 9d72092bfdb97392da7caad82e6068c7
BLAKE2b-256 b5d3c3854218908462af6e70135401a13f9192bd9ae1a6f7813db1f4d6adc775

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2ddeecdb91e3f8ef972ef56a6143ea41aaca6b636da544138350c4b3b1b4716d
MD5 5b586517f2bd95ce8b42aa104173f9f5
BLAKE2b-256 c2f85fcbc280808be7e09410c4226426b7f33a35103beab5f61ec461602ab6ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.9-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 fe254d53a2ea2e3d85d6e31538661afc7316dc62a4ef92e717cdf5ac357299c7
MD5 4fd5c3d0fdb4788f47848cd75d5d25a0
BLAKE2b-256 4d81339e60ece3350fc06c86b05f0dd325a0374718aa9113d7ca9626b42f3866

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.9-cp310-cp310-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 194.2 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.10

File hashes

Hashes for chiapos-1.0.9-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4ed6f9d142aecb2a6789c73b4a825344b99d66a2e0216aa7345d2ba6286a87c1
MD5 8cd5d896fb8e7e960fa527b9c97c570d
BLAKE2b-256 56946c9245810808a59e2775f58700618ea59011170f651cfc2ba10844487f16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.9-cp310-cp310-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 216.4 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.1 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.9-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b7d9d479a6d6d71a78498d9e8924f25d749411bc634cfd14241169190cbea613
MD5 6df87422a1d6cd727ada11380b6f6524
BLAKE2b-256 42f108eaee9aa05c73b935028e7a4d999f4d70570950863f8eab59da98d2d6ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.9-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 254.5 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 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.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8d595109469a0c04188b826d3cc3c8459be582163ee64893bba166992c793204
MD5 58aee669c7bdf6b49327d0e87caeb5df
BLAKE2b-256 04066e62ba54c70f6bf93e195da72848e6c6fea73f783e8f3f87ddd28d13ce0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e9cb1e7f102c80d4f07c7e80cf9615eec273cf7a173fc72ed626b16f5fd5f8b9
MD5 30b1fc9cf409613d9e3de1a55a3c616a
BLAKE2b-256 a4f0f462679571e48f988cbc11c46f11a275c100b5c234b3a0c746e4aeba6f79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.9-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5dd7c141a6734ea8832dcd94e0249a91f223d8f03ff83f5a9acd196b2358107b
MD5 87ec439d6df77c1014600ec55648b947
BLAKE2b-256 b5df4d4eb66d0c24e5e5545d0fd93cda607badc3b103c03ba703a1cecb12b8d7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.9-cp39-cp39-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 194.3 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.10

File hashes

Hashes for chiapos-1.0.9-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 146dc9aed2c24138f3d6cda6216f857087a9f1fc043bb58f189cba753c28e594
MD5 7305d946098b81add05af1fd7aefa683
BLAKE2b-256 22e5affc44812f67f487f6d514c1331f84a529edec37f6620c04e30cb7bf7bc1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.9-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 216.5 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.1 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.9-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9c9817836f12b93e4a83bc0d3f0eb6ecabcf9d5a965737216c64b95fba1495dc
MD5 7363fcb8c443fafffe05e1df74496057
BLAKE2b-256 27080a516e6cdaccd83969b8543a4385e747dfb57a8e23f1f9519fe879e4fefb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.9-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 255.0 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 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.9-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 406a82f758bcd90ccc3b649a9900d8eddeb9118f310543dd5e6e1379395b44d0
MD5 bc6d57de97b106261f154128a9b32349
BLAKE2b-256 bf5d4a58b2f5b5f06f21922b2f4828eabe285ef8c595d48fd3deec12f9caac21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.9-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 98108f7fedf7154290182b8b518517c956a1a3975365e26010ae77b27fe9a35f
MD5 9f1324d5095dcff1d832f1ba53264cb5
BLAKE2b-256 9b706db2094c7fbba37dbee6a435d95fcb47932d5ea4ad4440b785e8a4ed3d7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.9-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 61d5b348a985d386cbacb6a5db0f2b2057e17afb8386e7ecea48da5c7923df35
MD5 030e01c60b3e19723680d00c8fe8a6af
BLAKE2b-256 31704347004bae9b5e8c562a3183a786767c500ab691275d32f8a320ef7002d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.9-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 216.4 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.1 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.9-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 c682e90fc9ed00bb42bdc181c6b4fddc5b7a838447c2f29704ed47f774d812f5
MD5 73a2b2c8b36e15bed79fa3a2ae0d62ec
BLAKE2b-256 1f3b659a816301b28997079f8de8ffaf826515d508cd911765ea9a9e6c854d6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.9-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 255.4 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 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.9-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 a1384b6a1adb82f53ea5a0763746fe5662b7e6194faa77b64d60321246ab6c76
MD5 83fabf3e798d05d1980347858404b27d
BLAKE2b-256 7196cb054491b73ca771119cdbe7cda3c0611fdff612cdaefe1eeaecceb14632

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.9-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 85662854431f2b9385421a50bc2742e522fe6c7b145cc27fd383be568f137b59
MD5 4ecc5ca4609aff7bad277ef203532636
BLAKE2b-256 65f080e7701c56b6b168ed67043b181f0c0211f810e9e21d73a1047e957d621b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.9-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e41b91fd755ba23f254234c959e3f2a85adae7f5f636ea50400b53249f7acd1c
MD5 0fd5adb5c2d4cbb6ecb710473080acea
BLAKE2b-256 905c3c3295ea136065da4e0644d263e6243af3bacadc01640e08702d3f031a96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.9-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 215.8 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.1 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.9-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6c520c271eeb219e57566b56bc0bd5434e9845dff6c929f733df0fd3262a48cb
MD5 3e153b2b313ad1c53cef0525fa1f8108
BLAKE2b-256 d7f5208838e66b57f958ca2b8df2253690d2fa6a384c566d0f488b8e4ff69609

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