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" generate
./ProofOfSpace -k 25 -f "final-plot.dat" -m "0x4567" -t TMPDIR -2 SECOND_TMPDIR generate
./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 generate

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" generate
./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.32.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

chiapos-0.12.32-cp38-cp38-win_amd64.whl (226.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

chiapos-0.12.32-cp38-cp38-manylinux2014_aarch64.whl (195.8 kB view details)

Uploaded CPython 3.8

chiapos-0.12.32-cp38-cp38-manylinux2010_x86_64.whl (213.9 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

chiapos-0.12.32-cp38-cp38-macosx_10_14_x86_64.whl (189.7 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

chiapos-0.12.32-cp37-cp37m-win_amd64.whl (226.9 kB view details)

Uploaded CPython 3.7m Windows x86-64

chiapos-0.12.32-cp37-cp37m-manylinux2014_aarch64.whl (199.2 kB view details)

Uploaded CPython 3.7m

chiapos-0.12.32-cp37-cp37m-manylinux2010_x86_64.whl (215.7 kB view details)

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

chiapos-0.12.32-cp37-cp37m-macosx_10_14_x86_64.whl (189.0 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

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

File metadata

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

File hashes

Hashes for chiapos-0.12.32.tar.gz
Algorithm Hash digest
SHA256 16e3e8d671013e2e7af0fe9f13a21c36131c859d8610ef87db349cd9c0606af7
MD5 c401db07d8f507dec1bbf5757263e477
BLAKE2b-256 719b2bb84134e8b5909703ae99a5a3a1a981e55838af52f2252c3c18dc0de658

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.32-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 226.5 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9

File hashes

Hashes for chiapos-0.12.32-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 42674732f19de3ecf6cce81ba953b66be2c8a06efbc81b26d2e3e07121df491e
MD5 7ff850a0b92ff330cfe0b965b0ce9528
BLAKE2b-256 cafdfd087461e46a5ab40c09ea7269e2c3e38e17ebd4757adb5d228003d29973

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.32-cp38-cp38-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 195.8 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for chiapos-0.12.32-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 27faa3a2fac8a580025d79152d92b3876e77425159e29cc41396da73b74d2069
MD5 1da0379fcc7e13ff3f025cdd067a7958
BLAKE2b-256 d844e53a95d0a3a7d26cec7a976873ac32bb0a79ce6ac54bff8edab9c020ad8a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for chiapos-0.12.32-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0b1e50c39919640addf8600761b2a7d26905917c8065667803b1a895fcd851b1
MD5 45893d4a5fd169c2268dbe0c71e81a46
BLAKE2b-256 607cde248203e16f20249bc368b3d9289681d8f92d15945ff9cd873c8bb59c42

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for chiapos-0.12.32-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 ac36b5bb9dce1892846b5c43dfd5d68ea0cc7e5d9632f9c476e1f3e277da5a5e
MD5 05c5b63b89d34691a43a181b630a4769
BLAKE2b-256 a446eba2f243d719cdc92ff1391531f0adf8cfa781e7e7acebfcedb1690bfacb

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for chiapos-0.12.32-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 a10c968f4eeb09276efd1b47275dca2344d0c3031b4f0a816dcb46e089054d82
MD5 c0fd0c1427a002960cc6d60ae572619f
BLAKE2b-256 5f0c71539ca7828ef93ef5416b47fb3f556df614b7ddf0e20800413c3b054f3f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-0.12.32-cp37-cp37m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 199.2 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for chiapos-0.12.32-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8433e1aa84122b68524addf3e2dd4306ba56f1562e5de9f43a00a9c1f1ceeab8
MD5 eb63db768c126a9350739a370b37bf33
BLAKE2b-256 bdd8c71ad6bbf3406594aee5b6a3511a78839000d71cc1abd190b292fcf4b5d0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for chiapos-0.12.32-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 54e860cc15169119e1cfacaca6b4645cfccad014e757dda4d5c32889cf94c265
MD5 39df395a370a5552cf452c8876681b44
BLAKE2b-256 ba76fe6dd6d56248f3adb88ea369935bff2ed15ad3ba91309d1b6c47fbde81a1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for chiapos-0.12.32-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 845e8e96b7bbe0487fa6524cf3b2d1b35058fc67468ccaeb19154e3067f95050
MD5 30337aca2af209fe41d0c3c72d90986c
BLAKE2b-256 aa3fef7a440399ddf52120f6527425925e8320fe88f3d378285659876901696c

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