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 master 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 master/release version in preparation for a new chia-blockchain release. Please branch or fork master and then create a pull request to the master branch. Linear merging is enforced on master 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-0.12.39.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

chiapos-0.12.39-cp39-cp39-win_amd64.whl (211.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

chiapos-0.12.39-cp39-cp39-manylinux2014_aarch64.whl (313.8 kB view details)

Uploaded CPython 3.9

chiapos-0.12.39-cp39-cp39-manylinux2010_x86_64.whl (332.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

chiapos-0.12.39-cp39-cp39-macosx_10_14_x86_64.whl (194.2 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

chiapos-0.12.39-cp38-cp38-win_amd64.whl (211.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

chiapos-0.12.39-cp38-cp38-manylinux2014_aarch64.whl (313.8 kB view details)

Uploaded CPython 3.8

chiapos-0.12.39-cp38-cp38-manylinux2010_x86_64.whl (332.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

chiapos-0.12.39-cp38-cp38-macosx_10_14_x86_64.whl (194.2 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

chiapos-0.12.39-cp37-cp37m-win_amd64.whl (212.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

chiapos-0.12.39-cp37-cp37m-manylinux2014_aarch64.whl (317.6 kB view details)

Uploaded CPython 3.7m

chiapos-0.12.39-cp37-cp37m-manylinux2010_x86_64.whl (333.3 kB view details)

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

chiapos-0.12.39-cp37-cp37m-macosx_10_14_x86_64.whl (193.3 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: chiapos-0.12.39.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for chiapos-0.12.39.tar.gz
Algorithm Hash digest
SHA256 dd56e45a9998701fef6f89e0868e5b8a27e38fa195fa6a5e3543960accefda49
MD5 0179bc7d370640c4d3d99fb490eddb94
BLAKE2b-256 63cd451d9131bb20918cd538d43a3876a40a7497f549e3d3764c4357990f66bb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.39-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 211.9 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for chiapos-0.12.39-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 60425d1d43da05ba720fe8bab12bc068387e1117572a3da52802b41011d3cc8c
MD5 fbf247402135b31dff3fb7ea4fd24451
BLAKE2b-256 900a5073cda392d1a298f51508353a393247cead024c1a0499f4e69a575f1b79

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.39-cp39-cp39-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 313.8 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for chiapos-0.12.39-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b4d454cd16ab9da36250f74faccadd7328758546d14939babafa856d5b51ea41
MD5 39b7b68d942d19169087e3dbc8381ba5
BLAKE2b-256 923f0b15b762660be45e32f088211e06de375fad7926d32ef1f22db9f3fc3afd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.39-cp39-cp39-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 332.2 kB
  • Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for chiapos-0.12.39-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 cf3eec4e68e13a8b1589d4c3a54af23ee065b65ad40b942e593b4a46201aa52c
MD5 4fb17fd781e6d6b4e8f478f9dd1b511c
BLAKE2b-256 489157e82ef178cbdc88c48b5dce2197acc7d0a63cf67d2a70cff206a3750955

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.39-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 194.2 kB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for chiapos-0.12.39-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 a395573412883f70930c593a7c69bfa3671d628e0ffcbc17009c696db4cd1abd
MD5 f1972505983f21cf641adf4b20f0da6f
BLAKE2b-256 b3b0442cdb80e10019accfbc02c3c09987a425bc533ecdaad0865f9da8689233

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.39-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 211.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for chiapos-0.12.39-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1c0e7b1cd240eca727cca4488d78c6bf7ad0b55f0dd573babcf6f29c53e665a6
MD5 558c1e6748f7a0e8a23ed3444aed47ac
BLAKE2b-256 65cd9169d20c365dcfc419f18166225387682f7d007c1847fda2c548b304e2e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.39-cp38-cp38-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 313.8 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for chiapos-0.12.39-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 358b0a2a8ab27a25820b786427cb956e8e655971c98be5f4829783c9abeef7de
MD5 c5b1ec4982d3a5c33d242c08fa656a27
BLAKE2b-256 63db5773d304fb6813e09a44dc9f607cace3470f61d22077f38e22f590dcdd22

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.39-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 332.0 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for chiapos-0.12.39-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 6a96e299b624313469f8b00837efdf56a9fef1d09a2cff86aa5590466911641a
MD5 5491654034dafe2dfa6d5f568ccb0176
BLAKE2b-256 8c424decd34c85c899495f0f5c4581c77e2b9e8823157fb2157b6b1b98392c49

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.39-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 194.2 kB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for chiapos-0.12.39-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 ee3881d54be169ceefafe0a0d6d8421631ba10de7e9f422fde6bcbff64ee3e2c
MD5 8910e5aa3b98f5970d1aff6f0e4acbe2
BLAKE2b-256 3a24ebac55deeacb983f582041e991b4725053c27823a1c19026b117ee5cf75f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.39-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 212.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for chiapos-0.12.39-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 533ba8f95e3eba8ce68f750836f4645cdbed22a3f06a6522c56a81c1b85295cd
MD5 256904cefcbcf0eaa73d6c0647748049
BLAKE2b-256 fa16092c79a20c5a8d747d4363ddffbcb3ece6a435a284baa921357c007218a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.39-cp37-cp37m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 317.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for chiapos-0.12.39-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0936fcaa4656d5edf7334eabf6dfa3a5ad6e99af35e726ddb83ab340d7399d83
MD5 a71b826bfc004b1e4afb262e90384a9e
BLAKE2b-256 208bd8d87f45d8fce4397ae213718d05aaa07d8d9a7e4a084b6a077b41c7563a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.39-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 333.3 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for chiapos-0.12.39-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 03380bf8b0df776a3bfc8ce1d66ec7031b633a922f900769b6b08b6e0e0dc648
MD5 ebe7ff6d9f4e628700a206e6884038a3
BLAKE2b-256 079efb22b604e9e36d48925e634a6648e8c27a8fe3425aa8ed38b7e6b0376361

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.39-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 193.3 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.9

File hashes

Hashes for chiapos-0.12.39-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 64239e8a21aed3c46608bdee640ecd09d32762c147037d69153918b6d6bb2728
MD5 765a89d4ca1b3d7c62601edf3973572f
BLAKE2b-256 38a273a5caab1941e19fd9c630a3d48ec84b4e7fcad1148e46165818b45f9c59

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