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

Uploaded Source

Built Distributions

chiapos-2.0.2b1-cp311-cp311-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.11 Windows x86-64

chiapos-2.0.2b1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

chiapos-2.0.2b1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.7 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

chiapos-2.0.2b1-cp311-cp311-macosx_11_0_arm64.whl (314.7 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

chiapos-2.0.2b1-cp311-cp311-macosx_10_14_x86_64.whl (370.0 kB view details)

Uploaded CPython 3.11 macOS 10.14+ x86-64

chiapos-2.0.2b1-cp310-cp310-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.10 Windows x86-64

chiapos-2.0.2b1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

chiapos-2.0.2b1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

chiapos-2.0.2b1-cp310-cp310-macosx_11_0_arm64.whl (314.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

chiapos-2.0.2b1-cp310-cp310-macosx_10_14_x86_64.whl (370.1 kB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

chiapos-2.0.2b1-cp39-cp39-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.9 Windows x86-64

chiapos-2.0.2b1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

chiapos-2.0.2b1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

chiapos-2.0.2b1-cp39-cp39-macosx_11_0_arm64.whl (314.8 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

chiapos-2.0.2b1-cp39-cp39-macosx_10_14_x86_64.whl (370.2 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

chiapos-2.0.2b1-cp38-cp38-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.8 Windows x86-64

chiapos-2.0.2b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

chiapos-2.0.2b1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

chiapos-2.0.2b1-cp38-cp38-macosx_10_14_x86_64.whl (370.0 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

File details

Details for the file chiapos-2.0.2b1.tar.gz.

File metadata

  • Download URL: chiapos-2.0.2b1.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for chiapos-2.0.2b1.tar.gz
Algorithm Hash digest
SHA256 c93d6a2ef459a66f31b2245eaf68ce7e3aa5ae8a135c51d7140c92b67f423b85
MD5 0d625e39150715778d408e2c437f0ff8
BLAKE2b-256 a7c0f421fff9e0757e8913486027b7dc7fe01c7a099a4ddf7a8a67bc796ed75b

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3482fe1313f23031bd98a0c4163f7993f9f4cf9437e8e05e6b66511ce89560a5
MD5 34b68d919a57b777ba5bab5cad3b3ffa
BLAKE2b-256 e25bb01109d78e95c08ed7856d86d4fe1b061f0e682d5371e5e7e210aae88975

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0dadf587cabf0bd9af3410e7da9afd5b6684752c9f9b2ea5b63b30e00a964222
MD5 d7c21253098f1bcaacf68b0124e64c69
BLAKE2b-256 4203f24367b62e29cf696d74e7603753bd0859bca1fde1120d3c10cfbd14a935

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e404406affb86a67f3039fa307b87d856dabb89a872dd8048316c86d11011eac
MD5 fc4d003145bbfdfbb4738a6bb2fc4d5e
BLAKE2b-256 26aadd4ac4810dd47256aabb099bce428f139861b564c9db2c7855d491f38d89

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6cb3edd27247813ff953e8b3beda59ad6d215ee7e3b1b164e6bc8280ddfd15ee
MD5 76b3365fa46716e3df1c9cf891213ab8
BLAKE2b-256 e2374d474a156cbc0e902835066f18aabcbb3985b712d00b75112afa45793b29

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 0f581a16a88c55181b7156b14678cda22f22ed8f4e2ddfe72abf9ae9b4200a87
MD5 d6adaea8473d07118f955cbdc8f1ecc9
BLAKE2b-256 4bd134efbf6149493d93c388f819e384bf9030ab9bd8025bdf336511509cb43a

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 05046ff9bc35df44907f636c4affc0f04f10921347b4d6e3aa1d24b8c5e3a601
MD5 71987555362ba3a374f056fce82f314c
BLAKE2b-256 5eca7663341647cec8d6a38e45ac768be44144ac86bf33f76c9a095abe60aea7

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5a0015c845eb8e639cfbfe12a971c8985911725d967970ed97343ce6eac133a9
MD5 27af0a669ceba4c0afa4826313df26cc
BLAKE2b-256 e6a0047993771c3e862d2fdf3a23c26a08218fc15cce2f65bd6cfc761e80eae7

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 da6cdf104f0c2416d60479853b71821c7e55943e96556b5be1876dcc291151de
MD5 52d082d2d2bd89ed62785e6ef7cbf853
BLAKE2b-256 3a2d6d3dd0956e70f8004078a061434782ae0ffc08fff58f28ed38cbb631468c

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ad920be040b29afd326134ea5fb29216faf84fd4500c25a345ff889942153030
MD5 f87d9295d1f0d2d3c9925c1fedec76f1
BLAKE2b-256 320d073f5a6be9c7791e6003d97fd63a79857e65baec0149b3c3662ac03c6559

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 dfbc645031972a6ff3413d2edbb6f15fb6d97bb2ded619ea6773e3bb92328303
MD5 eac9dee718b0e0879ad2667842aeee09
BLAKE2b-256 105b12a09110b54dd085ed9cdb2c10485bac61e489980b6f0c77088b39783f4b

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.2b1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for chiapos-2.0.2b1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0ad3f68de412f806b99da961c33f1007c99c25dbb2c2495805b85a159ff1dd4a
MD5 3109cfa737961330e402ebc790712c71
BLAKE2b-256 c4405fe1ba2687e08c74fd502bd1109fb14eeed731f29e1b67da6726c31bde62

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c5dd069d43d8b896b83c4defa0cd2e8308b97195991cde9d44724adb9e176402
MD5 b0f736481c62b1f87ecffebc1840a825
BLAKE2b-256 fcc49cbcbb875833d55d68fe936da3ec583b916b672f429a6f3215a4f3d1f885

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8161f564eb00d05cda67bb7e4c10b1b845b622bf3568089065df4486e12ea13b
MD5 8bbfc94f09524c1230e11137cfa5b32b
BLAKE2b-256 6007fe701c9cd5933dbab3048a6e6ba85b06f8fac61fe40b4040a7a2e214772d

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 13d943b7877d61a3d05372aa81f959bd2aabdea95dae2ae991ef0b5fd24dc0b7
MD5 085e07e1e220b1847bbdd0601f3a6645
BLAKE2b-256 8eedd3b8b8ce3b3189a99773b3f289f954ad9563eac2de003ac99c3ea83a3d33

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b5b79287a84654ef73301c601fcd07d9eeca5f17ade02adb7225b7b377adacb3
MD5 0dbfcb0fcce647bde27d6e4d90d4bff6
BLAKE2b-256 94c17ccb2bca9d37e8b3c6acc8488c361a31fa5ba728ebe09892046100940460

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.2b1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for chiapos-2.0.2b1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 26bd3a586b058aeba475b13cbd514e95db558c90d89c23f8276552f12f9e087b
MD5 d8a2953128d817d1550635811eab4535
BLAKE2b-256 05360c64ab0e08457db9613b67d52cc652b9c44db0c80180346ba61445cb7f33

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 642d813f6487b2311a231fe749bb98a75a4b976b167d6444dca9989ef5ef559c
MD5 fc3c92ff4012eb95e5f6e64192f4b170
BLAKE2b-256 bed8c79edca5658f2df7cb2ed3ed564fcbb6a9c8e7da00b488bbbfc7d9c51814

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f688dc34b3754e26d1c5bfb872d48cb2c2919468b789fa24b2abb11121301317
MD5 0e0ab39a3431e062f2ea8152d6507410
BLAKE2b-256 8b1eae73d3556bd21f97b58395d75a78e7233856a85e59c6bf9e518789e1b0e9

See more details on using hashes here.

File details

Details for the file chiapos-2.0.2b1-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.2b1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 f885817e1718390308215627d7494d35dad821faed7d3bac027ea98a3d37492b
MD5 e2d9a65f06d61ad5384c084bf7b1d80d
BLAKE2b-256 9fec6e5466be95ab683d91c391ff0d1857ebe1d446de53ed731bd1304e0d7142

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