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

Uploaded Source

Built Distributions

chiapos-1.0.12b8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (454.1 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (425.3 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b8-cp311-cp311-macosx_11_0_arm64.whl (558.7 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

chiapos-1.0.12b8-cp311-cp311-macosx_10_14_x86_64.whl (606.8 kB view details)

Uploaded CPython 3.11 macOS 10.14+ x86-64

chiapos-1.0.12b8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (425.4 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b8-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (423.9 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

chiapos-1.0.12b8-cp310-cp310-macosx_11_0_arm64.whl (558.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

chiapos-1.0.12b8-cp310-cp310-macosx_10_14_x86_64.whl (606.9 kB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

chiapos-1.0.12b8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (425.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b8-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (424.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

chiapos-1.0.12b8-cp39-cp39-macosx_11_0_arm64.whl (558.8 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

chiapos-1.0.12b8-cp39-cp39-macosx_10_14_x86_64.whl (607.0 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

chiapos-1.0.12b8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (425.3 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b8-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (423.9 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

chiapos-1.0.12b8-cp38-cp38-macosx_11_0_arm64.whl (558.7 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

chiapos-1.0.12b8-cp38-cp38-macosx_10_14_x86_64.whl (606.8 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

chiapos-1.0.12b8-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.12b8-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (426.3 kB view details)

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

chiapos-1.0.12b8-cp37-cp37m-macosx_10_14_x86_64.whl (605.9 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: chiapos-1.0.12b8.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.12b8.tar.gz
Algorithm Hash digest
SHA256 dc24116e7dac7978a517d2048b6eae2730eecb1d1b68d4d3e6766a7fd8ecf1b4
MD5 9a259b10f8804c3309c8400ea4ed0fb3
BLAKE2b-256 b11fdab044f1b7fa3e3b9664e117da4d70b643a1414c772ca5a1b1c6789da46a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8d3f06f71d6e0dc1c8ec8e90da32cdb0d6458855e817dd4027fbda81e2512eb
MD5 8bd09dc73c97fc3a4320bfaebef5481a
BLAKE2b-256 f09cb2f93f56ad98fb06fea89025cfdac1c84a8cf1f769b53ce1afe091926938

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 59090e0eb91c6e7585d10b9ae28e8c1371b98c20bbb741601caee7193402ed60
MD5 46147551711a5139a7febf2921cd6eb1
BLAKE2b-256 a5bb15953e3946df2221a3ce70c97526615ec2ef00fdbc76f626c6b8cd30e739

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2c5186ab1be16995c089ea702ffc7153300db6d9870dee5b48055b0387c74b7f
MD5 a71182f758a62031f6974ef8c0fa81f6
BLAKE2b-256 16eff7a0c3d89842b4eb80233ccf4cfd0225dc37b97015e205c418484344debf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a66c3b96ef1c005d2c2a314226a36ff9d0ded62cb9c8b92b12e1fc522cbe28c1
MD5 03c468103bbda220aef2c46413d8ce0c
BLAKE2b-256 e7f279e1df7fd0e79024679e7a1dee43056a8866d2ec7d7f832449f13d2e0a91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 63e876e7e1fe96f5c692736ff4ba5277a043f8ab35cef2390f91f8d4344a5851
MD5 8a97f7abb0f5333f14bf529caab96690
BLAKE2b-256 d725ffdf681d5953b726cf1eb085863b93e6d5ad93c44bf89bead78aff73afcd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 cb9118a65304442622de830a1e281f749258d7e3a3c958d8d0f1d94ffa489905
MD5 c975be7a80980fb784c091fdcc4568a6
BLAKE2b-256 aeb9445532e4cf2b67190e13cc6ab702c0440154b60a0b55e6942c3979b93ebf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 16151de822312cb13b0a57e4e721ca7a9de5dac5db040d3cb1a6689087c68aa0
MD5 7361398bdac0d6aeba9e5b7220ffa281
BLAKE2b-256 a62934534b743b7ec0fef161d88534d3304f47c13e33085803eb666ddd688c5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 d6e65852029ccd18be59ea4ace167a58175215e616c7cf69e8db64da25fefc96
MD5 c040c1a5e74e83f58a3cfa4826e92cb0
BLAKE2b-256 5ca334ed0125bc3beac1988d24c1a768165c6731d705b9de63054b314b790ac1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f55f75aa324c9b5e7dc241a5f50030644c833dc457b07ab9359075924c814ab0
MD5 08a03bab3beb51547e9c25162cb79458
BLAKE2b-256 995121241aa28ee6585f872bf8987207cf0ea4fb2d542f99721577268f5e804d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 40149eb9d254a212f01b7b9b1d8592fe9ecab4055f5f6e494a973c3d3b115e73
MD5 7486cf4d11651af2c617ad352436726e
BLAKE2b-256 43859c95dc91c76feae0f8efc04d29829812eabe224e501dd4a2735a62ea8d79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 043d5ed0431277805f4ca7eb78062c7a308cb2ca125d528fbd8a415d98dd0807
MD5 a1f60fb9530a72d3cd5a8bcced78c1c5
BLAKE2b-256 bdec9bfa6e0ca703682d8950d6608ba2b57311de9fe03cb73c764bef0bc3ebed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9516c76d317fca3916462b13c0c5f0bdbc08ab5da3d4cca96fb7f042165ed66e
MD5 f4345c787b004cb4b1d715e1b10f8b81
BLAKE2b-256 e98587e82f3054a414458c5cb082d0eab5e1ce2c7dce2ac4e6be0c9f52d65794

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e5b45797eb94932fa5aa44838af62052ca6d2f464a4d08fa1347a41f3ab0fe5f
MD5 24fc097a4385624d27876ccc6ccc6a29
BLAKE2b-256 b9f83bb806af37967ebe0bff82b15266fb06936d430415c3d213670e19a06a8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0b5d5e5268b007ae3f015377f76c524606647c8504712d021df23a7bc410f6a6
MD5 139d99065ab11ac22cd5beb76a73d8a9
BLAKE2b-256 cbe9cc7fd18b6a5919cfaaa7b277506a2b1f523f1746707ae0294b2bad9812b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a9a970534a266f16d9926eed11b9f7c294acc2f531ae3268ebcc878e8e898aa0
MD5 06dfcb1677ce7acf4d100b9b261306de
BLAKE2b-256 094061f3e5f9c13f1e010f2f2881e176618c80126f5fe8c4aba0d1f8e48b7fb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 88a523aec1fc6ce57bd083070498c3d10812ffd8b9ea96bd8a07ffe99d5c3a18
MD5 851e12245922fdadb28f4e98a241e1fb
BLAKE2b-256 1b7ad47eaa5bf9a0576287daa469e26a618728219959c84130de1f8cd8bae68c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f5e2f4637291b70e13c0ee3a46cc648042ec0259417644d25d55afcf5fe8c627
MD5 722638051492215b272eb0b41d8382ed
BLAKE2b-256 4bdbd6472a8ebd6c794e7510281044dfe37d7d2f377cea8ad6799775b504a3b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9972cc6f4ca3a1ac60efcc7a76d3c315b050df79d329ffe2b4fb769a8cdb35fe
MD5 a155e9668112df82633cbbc145a956a0
BLAKE2b-256 f3ad2ac4f4039d804fcb9d425ca7630a534def57711af7b993996bc7afa32e3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b8-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 fbdcc292151bea1721ea5db56d44b95d3353a17a98c8cba51bd9e2d09021a028
MD5 1bc25f6ed0ac89264e329ec6a3e7b35f
BLAKE2b-256 c5d9ad22faf11a8d0de6710c04d18b99d4338fc57d846e73940f8003f422a5ba

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