Skip to main content

Chia proof of space plotting, proving, and verifying (wraps C++)

Project description

Chia Proof of Space

Build Wheels PyPI PyPI - Format GitHub Coverage Status

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 binding

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

Rust binding

Finally, Rust bindings are provided, but only validation of proofs of space is supported, and it cannot be used to make plots or create proofs for plots.

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

Uploaded Source

Built Distributions

chiapos-2.0.5-cp312-cp312-win_amd64.whl (8.9 MB view details)

Uploaded CPython 3.12 Windows x86-64

chiapos-2.0.5-cp312-cp312-manylinux_2_28_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ x86-64

chiapos-2.0.5-cp312-cp312-manylinux_2_28_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ ARM64

chiapos-2.0.5-cp312-cp312-macosx_11_0_x86_64.whl (378.3 kB view details)

Uploaded CPython 3.12 macOS 11.0+ x86-64

chiapos-2.0.5-cp312-cp312-macosx_11_0_arm64.whl (323.9 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

chiapos-2.0.5-cp311-cp311-win_amd64.whl (8.9 MB view details)

Uploaded CPython 3.11 Windows x86-64

chiapos-2.0.5-cp311-cp311-manylinux_2_28_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

chiapos-2.0.5-cp311-cp311-manylinux_2_28_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ ARM64

chiapos-2.0.5-cp311-cp311-macosx_11_0_x86_64.whl (378.9 kB view details)

Uploaded CPython 3.11 macOS 11.0+ x86-64

chiapos-2.0.5-cp311-cp311-macosx_11_0_arm64.whl (324.4 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

chiapos-2.0.5-cp310-cp310-win_amd64.whl (8.9 MB view details)

Uploaded CPython 3.10 Windows x86-64

chiapos-2.0.5-cp310-cp310-manylinux_2_28_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

chiapos-2.0.5-cp310-cp310-manylinux_2_28_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ ARM64

chiapos-2.0.5-cp310-cp310-macosx_11_0_x86_64.whl (377.4 kB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

chiapos-2.0.5-cp310-cp310-macosx_11_0_arm64.whl (323.2 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

chiapos-2.0.5-cp39-cp39-win_amd64.whl (8.9 MB view details)

Uploaded CPython 3.9 Windows x86-64

chiapos-2.0.5-cp39-cp39-manylinux_2_28_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

chiapos-2.0.5-cp39-cp39-manylinux_2_28_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ ARM64

chiapos-2.0.5-cp39-cp39-macosx_11_0_x86_64.whl (377.5 kB view details)

Uploaded CPython 3.9 macOS 11.0+ x86-64

chiapos-2.0.5-cp39-cp39-macosx_11_0_arm64.whl (323.3 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

chiapos-2.0.5-cp38-cp38-win_amd64.whl (8.9 MB view details)

Uploaded CPython 3.8 Windows x86-64

chiapos-2.0.5-cp38-cp38-manylinux_2_28_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

chiapos-2.0.5-cp38-cp38-manylinux_2_28_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ ARM64

chiapos-2.0.5-cp38-cp38-macosx_11_0_x86_64.whl (377.3 kB view details)

Uploaded CPython 3.8 macOS 11.0+ x86-64

File details

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

File metadata

  • Download URL: chiapos-2.0.5.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for chiapos-2.0.5.tar.gz
Algorithm Hash digest
SHA256 b347157f3a4f19c7fa703f4d82a8768d1c710949121e6f53583a4cc32c7e7a78
MD5 f33915db76e96ae9f748257c2a953ef1
BLAKE2b-256 2a8781f8a64ad4f933e213995ac4a7c285ce08da89e7385ce8a3cd1dace02593

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 8.9 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for chiapos-2.0.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4cfaa31b5865798df6d52ccb120cea46652a4ce0b576b2154275a18add0fa250
MD5 69d56424d222dcb7b7c73792b5f6b1bc
BLAKE2b-256 249d9d7219e8583f9986a55c42682966e3921c6758666b5ac8f354382f42fc15

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0184044834c292e6ca54d21b40f6179e14fae1856646810ab3590d1cc3cf8409
MD5 02c3d895935ecd3e43f34a7a9ce93d1c
BLAKE2b-256 4362e38580bdbfdfa0ec1987588c18937550d0d97f1f167be89766882873078a

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0e1035a3783a68d1e4c242dbe9656d77b699d98b87c09c0a579890f0c0f67bb8
MD5 db92d7e95db0cdcf7593a4ea99e7a4ec
BLAKE2b-256 d11aea490503b459c8d2d9664969892806c8de4b3706bf2acd456c32e8606777

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d1f10f83479353d666f229f25af7071c2215ba205b7a8c8c6323414df263bf79
MD5 7ba02eb57450a5a9df36734bb930a535
BLAKE2b-256 1b00a82d2928e3876a72caaff42a346c716227158f301539cbd3084514308f12

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 91a1cba166f1bfb3bb97e272be99058052a7b3121cd711031048396ca593ce32
MD5 d7a50efec3183ffe816259c8ba54cdb2
BLAKE2b-256 d51c6104fb9301449ee248c4ba4203af9a30c29f7d4849c4d00ee111bd3d2075

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 8.9 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for chiapos-2.0.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 66cd3b2fe45891b1402b5962b2ac44cf17dae08054a07694d428bd3dbf28a999
MD5 ed3d6eaabc97dd8cead44e0e5134f2e1
BLAKE2b-256 a543b12217bbb18bf4b378c099381007764f615c48dc05019a6b4bf505ec3caa

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7dcab07be31cc270c1522298695393533524aef81b1fdbc312dff77cc476c6da
MD5 d2fc40490c715552dd8f182e4783852e
BLAKE2b-256 c77a2b2f98295621ce130358e12390796384d6da21f9db265851fc162d5a4c82

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1df4351209d1daa5acfd850835e74bd5b112d74aa5d072868de6f65a6df0ff64
MD5 e7f72b1674221256fe7b75da3ad41a36
BLAKE2b-256 8599aa1bfa096a22cf310b1f80d3359ade3a2d5511b04fffa97f157b827c860d

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d9fcf1cf450d56378e6523f6ee4cc6711f0ea4840d9ddf856d559be5f98a4045
MD5 97dc9dd14c174f8d38baad8daaadf7d0
BLAKE2b-256 80a582c399b143818b81903ce4ddd55626f5bf151d882e1e462428fb1e004ba7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 56d067067a836dcd2728484609821539e18a1ad7f938220fa392e5f07af9e184
MD5 26e10a27054fce4c7e94c2aa353a163d
BLAKE2b-256 aadf8e8f8cbb45feda5af1af9741a282e7b878eb70cd21000a2ae1ce373bcd69

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 8.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for chiapos-2.0.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2cd49b8f861482efc3e484759d446e7f81e6ee799aa0b519bd1f069a07dec035
MD5 26e6f7e0f12396d455af88bdb08c24a8
BLAKE2b-256 8c33dc73b6e7d6e3ec199d060b8d21b13ac834d4aad69b37aa05445538c31852

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8a4807ebacaa1559199c9be92da0646650cce52f9b64cf4626ed0a0f7d0ea2f6
MD5 773f913489386c8c235447883764f1ba
BLAKE2b-256 eb171cdd1bf84ff7c02db0bfd9e4780d96d64f6c943d87feaae4acd5e29620d6

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6d72e1e57b155c328c6a034bef13790801a3c9658db3b74d74930a1c15e9c066
MD5 9d1f5ff6ff98ac11df4e68bec928e56d
BLAKE2b-256 4e91d573cf30ab274649c4f20d1bae6bff9526242e2fc2819338c11e0697bcf3

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 f0d277c653c5ab3ff459fe7dd35653f9f3e3035174982162970c75aae71759ea
MD5 c1a2536159df340d28d9ab2d811e0843
BLAKE2b-256 e2789a529d4099d85ca2fb2f932920da48dcbf111f038774ab1ae43838050568

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d5b91c71d957a73e731b265acb00883a0eed94d2d197d4fa53d16823a8c06cce
MD5 0fdc793605081e90171614b32bb2a2a2
BLAKE2b-256 70ca44e2f7c47438bbbddef6efd06ea4cf0164251b201d02f5ce25c5902405a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 8.9 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for chiapos-2.0.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 363bdf9e5f152cf861a5efdd6a122d11fb00402e00c31350ab6bfacb626cc7f5
MD5 737bb87ee716c50b9f566df4488a75ab
BLAKE2b-256 7773db0ab60aca0de08fb10fd50d1d59bebabe4a0598f7108e2e43ced776893e

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5235d3a36d01565cfcfb4624d05bf68fd7f719232598d1a932e791f9d68ecfe9
MD5 b77254c65129064a828e9145b45803d1
BLAKE2b-256 6bfe65fe07ecdfe2f2a10d91170d881332e21e315cbbb94c766cf35cefe3fc58

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3706380ec231a8ebe4e913b0df988a189082b1b89991c87871401c1fb9157bc7
MD5 f80a653b84a06782752bea37249e8f49
BLAKE2b-256 8b671a26249551358379dd90e25523b9a133dc7a28631647c824fbc333dd64fb

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 29b2bad994a094344583dc9852375a34c64bc2def43c9b7e22cbcac7f26d9aae
MD5 665d372060f7fdd70c7eff8cbd089eab
BLAKE2b-256 9ac81674dc4aefe63dcac4107bd74eb721da93ea92e835221115df553d270cac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aae27ddf2757b968ccb376f06061c6d6dc93fa7e9b0f861eaba4555d3d187e2c
MD5 8af4704b4eb2b6220f64fae2960cb794
BLAKE2b-256 e9bc467d880e6922c04deac91396f5a6c6135bf5319c905ac46c74af3f8a0dbd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.5-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 8.9 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for chiapos-2.0.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c649ed15f6db422ab17f365d2934e7b2420e4d84292b42961dad14c5c492fde1
MD5 0acaec6cd6c2d981f3e79793e1bee692
BLAKE2b-256 aa70fb4d23d90c25f9f54a3a89d4e300b63b235a1f77b378c5539c6ce88884f2

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7fd3b3985bdc0c8b7852bf8fb6e82f2ec5f6cf5c442a319091770c616f3a600c
MD5 6190dfee0e19c50b3d3c1b0a74fdffd8
BLAKE2b-256 ac4d8728c67f7152f9216427e80e8bf4caea77d97684a1143626dffcd94ba7d9

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp38-cp38-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b86f1c9e07c397b807b7802a0c9b0dbaabc343849eb2b71d0b3414978173f1d4
MD5 ffdbdfb746c573d618cc19facc3c4bc3
BLAKE2b-256 2173a36cf9ad6776b87beee4564a8672c1abcedc50d38177043001b3f88ac1cb

See more details on using hashes here.

File details

Details for the file chiapos-2.0.5-cp38-cp38-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.5-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 20d22ec897f45bbe824aba9b0010bf5c1d0dc1a4cf39ebb949b05bb0a85eeedf
MD5 b2dcff81b97fe979b335d1422cea8a1a
BLAKE2b-256 9338c57e0d8b195d1fe062b89cd268913471b836e4cb68e3d5f9d758230227bc

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