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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.14+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.14+ x86-64

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

Uploaded CPython 3.9Windows x86-64

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

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.9macOS 10.14+ x86-64

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

Uploaded CPython 3.8Windows x86-64

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

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.8macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: chiapos-2.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 553d4e0503bd3f72becefdb6e423eef9bdff4abbc72838f6b3b3e2f4ffbef246
MD5 e89789222bbc8e6b5523d6a1791215b3
BLAKE2b-256 7e199653e1659afc72a9f42da0596de3daee00f17f236086bd581ce8faf15d86

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.11, 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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f5cabdbcff70346c0011954d64fb2c3a243bcbd066441a2037445dd33bb63e1b
MD5 c59af78fbcfe682a95750a7dcd9566c4
BLAKE2b-256 99bd49bc118e5777e5cc5510a06082ea44988054090caabfe73a6ef311815f4a

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c8945fce873bdcf26153995005b7be1024a14d3a93db69b6d2dc4e4ba6bec186
MD5 38c0872fb0a7b652264e5608c3f4e46a
BLAKE2b-256 284029653739242aae31c2a92b145f4cb83de3a1f0972570fee22166f8622d6f

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7ddcdd5c968ceb78f327cf4c561598af1954fcbbbade7e2ab5af45eb7bbe0297
MD5 37259d4b95137894c26196d56c050c49
BLAKE2b-256 d1e97b1f94b6ca0e66b13470729e160acc1df728f83ae347ec2c51470d66e770

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 10f52c3f2f8fbe0e810184d8c9b42b83031019e859585403ff710faf20a09c4c
MD5 0d4346820324fd0746656390d6620c2a
BLAKE2b-256 c8b70d8e1baba2ccd488318420d85f8b666a2badf34778cef9993177c186a6ba

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 33fe678f0a2cfcb4107dcdc74cfeca90c38151306853262dd05afcc6717a5730
MD5 d593512c7c723b54f39ad4549081f0e9
BLAKE2b-256 87c94193d9dc24649ce55a9b8ae5c75fa6c4d30291e281a46479ac9aec20a15c

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.10, 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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 777c421b367a9650ff3adfa17703075cea8f609de7085a203ae7a6ec92b2c76a
MD5 da0441502525cd2106c6f907c87b0152
BLAKE2b-256 6cd3b03522d3e5c932d0ef4707b013f54c2869e0452da892569b2957c24d82e0

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4f44593ad23d3fdb9f2d938922591fe1c651f00342fd9cf5d6b04d41b9b99c46
MD5 3206bbca2d873952703168b08d630c77
BLAKE2b-256 89b997ae92ff1cf5643c8e643843bcdb9bbb40800b0b6fd15a5e21e3ae8c198d

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f4f6cc107447fe4fbe48663a8dac34c9c164a4ba06cb3b6cf78c7b705b4ee45a
MD5 056ba9dc166569d53dcb4714888c9bf5
BLAKE2b-256 60f1db3479ed9c5010c23a9ff69ead67c76ba1f74d6c490859e489a4abd48ce2

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a006201c84f6e633575b85274a5f54e6e70a4d9a1bf183c492d22c3e3bfaeac9
MD5 9f680cc1719e03ee7641abd06ccaf58d
BLAKE2b-256 6375180790c9d2fe5ff41fc0500e10718b63410138b75c74b7b92eede21521eb

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 01195dda2e2c4dc3c7da565edf461f4a74d3a4a5115775da653520e3a1f1ab76
MD5 4e158dcd8a46ff2587610d3780bdc0ef
BLAKE2b-256 0d7348184ee49876e7a1920d18c7db34eb263daab34618c95202bfd3224a23f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.1-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.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 40b8d7e7bb0f741e6ace57edb6fc265a6667be61ddd5dd65d45ba1a7171916ad
MD5 00e5cd32b7af029641f270873d62685d
BLAKE2b-256 bc3dba904aed5e7fb62e229421f68ce5cf7b25edcc32cbed68011b2bd7606a0d

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3798af1860c1c0aa2fd357b0c9f43ace761dd6ceb69679775d3eb38d11addbc9
MD5 10a2365cd438ef231932ec3539ca31e7
BLAKE2b-256 81d606b01f095d1890589a68c3f91eb3da89b72babacf7e4632591d16cbd3917

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 35d0ce604d91630977c0ad0fa30fc377b2b32bc14400bc304dc3c4b533baad61
MD5 6d138dfa68cb7b90656b55d8434dd8b3
BLAKE2b-256 76423405ede0f31b143406adb42b13a782618013c6b72c8fdd4b4ad673f8bf0f

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4ecb8b9ee759e700d4744b388a889f81017302d9facdb0d3638d1611ec4f6e78
MD5 4bfeab955878619107c44d99ff05714c
BLAKE2b-256 d682ede7c95d0a5245b0d30e37736944c36f83ce5abe6f94e8bfc103869af122

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.1-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 99467818b45a45f0196f8e857ec3e6c283df2422c4cffec8a300b85cf63f64f5
MD5 80bc279c2e2d6d80cf25db5ec81a610d
BLAKE2b-256 b1d8889c80967a613c9921d2483cc52e2161901009cfba5e025106f2882d5127

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.1-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.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b50718cb3d02b0202934f8f5e3f9cf159c8d1b54a9c91c7e3994a966a6bbde39
MD5 653f717a6e7abb4db9ee8ce416e00e6c
BLAKE2b-256 c7b76cd54eb3e0d834d1c4edabaa4baf842cad453e03ee0cfe59edd84348b4a6

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f3c8bf84a91c8df1ecd5995f17fd7f070fddc65c15e73f412b4520198d842666
MD5 f17cd230acc382ade6cd791f0b9c2de6
BLAKE2b-256 9fecee7b1bd9c12cc3eabf5f43f6df1cef09754fba2fdf352b3a7831dd4bf15b

See more details on using hashes here.

File details

Details for the file chiapos-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b6688968a4ee7766cf3e59f82ce012b4fc89cfeaff10a14811bc072a1f5d2bbe
MD5 0fd88b5bd7912878e6bbe105492f8420
BLAKE2b-256 0b3a37d57701dcf9504b58b2d581498fd1d034b04317a0b60756404033557f08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 69bb4e9a2a4badb72b7a361335d5af93100a696ed477ffe55354258e7381b0cd
MD5 15c0a5db4748bd6d6fbb484d4e4e5019
BLAKE2b-256 0c7862f895e6076ab0751cfa0732f4d55ade6c1e8399a7e2d4f3a85d101e2696

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page