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

Uploaded Source

Built Distributions

chiapos-1.0.12b6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (455.3 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (424.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b6-cp311-cp311-macosx_11_0_arm64.whl (558.5 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

chiapos-1.0.12b6-cp311-cp311-macosx_10_14_x86_64.whl (606.7 kB view details)

Uploaded CPython 3.11 macOS 10.14+ x86-64

chiapos-1.0.12b6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (425.0 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b6-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (424.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

chiapos-1.0.12b6-cp310-cp310-macosx_11_0_arm64.whl (558.6 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

chiapos-1.0.12b6-cp310-cp310-macosx_10_14_x86_64.whl (606.7 kB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

chiapos-1.0.12b6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (425.6 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (424.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

chiapos-1.0.12b6-cp39-cp39-macosx_11_0_arm64.whl (558.6 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

chiapos-1.0.12b6-cp39-cp39-macosx_10_14_x86_64.whl (606.8 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

chiapos-1.0.12b6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (425.2 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (424.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

chiapos-1.0.12b6-cp38-cp38-macosx_11_0_arm64.whl (558.5 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

chiapos-1.0.12b6-cp38-cp38-macosx_10_14_x86_64.whl (606.7 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

chiapos-1.0.12b6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (430.3 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (427.8 kB view details)

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

chiapos-1.0.12b6-cp37-cp37m-macosx_10_14_x86_64.whl (605.8 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: chiapos-1.0.12b6.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.12b6.tar.gz
Algorithm Hash digest
SHA256 4f913873631adf479ff36336cefb0702a8cf917e6f2d077fbbbfd8226fb7f1c3
MD5 e8d51717a113d2b115455aa7e49adaec
BLAKE2b-256 a56a304327e4789a884554f3c897090d0a60b115c10bff635fc26eb46658cf1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f5d4d629da6d5bb0fe3cd533afae408c8982e3b05535bf5de899a99bb49cf65f
MD5 aea4aab2942e297834d96c4f0c10bd88
BLAKE2b-256 688439c2bc463b74b0ddedd7bf71df8627137f95a7ee932bd9607e4d1f5d3e60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a76a77941dbe1f0ffebebdb4b363c6184d3f913a4971ba93a8ec1dce818a6ad9
MD5 42a573e14d83bd620644d0c096cd3907
BLAKE2b-256 380ce48f595328b4c83d7fe0cb1fba2e48f9c105e9264f2a9ccdfdb166cd74bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8d87c86396b48475b72406877294aee7465512f90ffb7fc4bd5c2ba31fd05901
MD5 c0ff3f354c9cf7e3582de2fe25461053
BLAKE2b-256 3d3f01a9772da6523c672acea29bbcc8c3ccf82a9a0dac6d0951b1cd17419425

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 e194af7516fa7533755d89e038d0e695c171de4f891e6be5f4e8c125a1face6f
MD5 f393a50cd8b9f30e7fcd540da02629ff
BLAKE2b-256 70becfcb67ae628e2f6b2a1cea0de27aa82cab2d1e3dbe0cba78d078a8a6af5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2f3eab11c7742fe666501fc7c709dde8a91a0919dafdf4356c386409b88c559b
MD5 37431f4b0fe4b7f017a813af89535e53
BLAKE2b-256 2611c85487e12756e02ae3854aee660160fc64f32dc60a8ad4c808c2c4896b4f

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b6-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4a33fe8e35f3c16cf56216cec4f223a643e15d36d5c4c459f4260296b367af36
MD5 1bfd7996bc8105e74388fdfd9bd000ff
BLAKE2b-256 f36005ee5ee01817707591b13971ea6b32e3f317acb71f52b1e98fc71b99dda6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3211fc06292362a3f91a0dc75c2ee325e443a2736cd4862fe429dbcd51b994cd
MD5 1e34d25d1972ae8475d16c063bc8ed69
BLAKE2b-256 e88b1d95eda0ab2efbc12df4eb5ff06c1459766ed257933b5b25abf59da75a55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 24c074263e3d8e03c4a70ed8c4f9b7e3995a147a82bb15316a8734d49a727071
MD5 7ee5dc93bfaa64d896f6255c633a323f
BLAKE2b-256 1fd3e6d756358204f00b3fa4eec47da992618753c328ba4a42dd8972ab36a885

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 22f7345c7c7a810bbd87b8d4ee424ced70f706682d9e1cddb95467c97025f9e3
MD5 4cbb45ca216e0155f8f2ed655eb542f5
BLAKE2b-256 85f0ba824ca55d0466b1a13b834a3bef465c6d754124dc376477f2b262f0bc27

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 682cde538a03213bdaaeb45e609ce3b306c834afb1ed7a108fb2e216c147de9f
MD5 b70b0b1e3be799cbbc88c4ea36f51101
BLAKE2b-256 e9e7a45ad21ffef0c4b6159338d4e149eee148543c6d93471d35350f11fb67a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ad67e6e54e5e3402d1f2f8d992769d891cfe449ed25ab2afbf677e256e43a09a
MD5 177a115d022604423898d8ccbcfb2822
BLAKE2b-256 daa7925a2db7fe6fa02aec803973cf1b8234f7036940ba84f019ce3f0203b942

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 5bbf8fbd2dcdefd7627ebaceb98bed2d6ef34db6492f1faf9aa962f1f84ba69e
MD5 729e97e330f2f2e37c52d1f646c3ee39
BLAKE2b-256 cb02a13100c34e804d5b393fa0c011e99344271800c0c6c70b0fbb282eb63ec1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 047f9e93beba9979571130e338537b1bfd0b347bc4db99dc9e3cb3ebcce753bc
MD5 a6ce3c4e5e8c98088152f90f06434160
BLAKE2b-256 dc9f78e634d33cda65b1c61ca3eff9b0305376ede16d73ab8b24070f0cea1fc2

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 12f1f566bf3f13dc21401c537bbb07679f6a1df87e8e624470e561994f353f65
MD5 1890265b65b26f1457cbe1bfa062866b
BLAKE2b-256 374ea3c9210c2226643bf20f72f01fbc789c1d37e57c056fd7721e0e94eb1f1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3eb8a4dbc307c84f29c58441cab58a0d9176857718ed687268f977b159b54fe
MD5 8d779c89a48178843f505f8e20ae7f79
BLAKE2b-256 389db55ac5e9ecd895df057c86dcb68fd2e137470aefc6228a6ec9e42bd51bd9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a21cfb5fec4b567f7cb10802467932f4adcb039884a64c207137646ff3b97551
MD5 d48c2d6b8cd5b2e204b91bf2a57fb6bf
BLAKE2b-256 1c34e41eac3081eef97ebd752f2500fb27f2eef167acb58557d701177e2fbe07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 be7d4b299e9eb76cb8c8e8175e62087965e8ab28d01c351bcc7d3a3e9e0c5cf6
MD5 254f00c992b390df4cd6939ac22d5304
BLAKE2b-256 79f12d98f977b4ff29891f8270be9ccd10c64fc296868de3d423241a5efe834f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 7f85fe50f8803fe7c0a811ea078041673d88cbe72901e9ad285f8438ac373aa0
MD5 2e252517bcaf72f1df36bb54cc66b810
BLAKE2b-256 bff1395bad361ef2e80982cc8ad72a64a6531ae3cb38dace8b736c00884757d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b6-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 c9da813c626d4d0c69def80f331ea85692cc7cea1f4a13fba6e62d29dbf82deb
MD5 bee41a038b9cff7c5a2300d1f635c5f4
BLAKE2b-256 0bda4fd62e0fa29d917bd19c75feca42afda63c2850bb3f600e61bcfc6985cdc

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