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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

chiapos-2.0.7-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.7-cp312-cp312-manylinux_2_28_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.28+ ARM64

chiapos-2.0.7-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.7-cp312-cp312-macosx_11_0_arm64.whl (323.9 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

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

Uploaded CPython 3.11 Windows x86-64

chiapos-2.0.7-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.7-cp311-cp311-manylinux_2_28_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ ARM64

chiapos-2.0.7-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.7-cp311-cp311-macosx_11_0_arm64.whl (324.4 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

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

Uploaded CPython 3.10 Windows x86-64

chiapos-2.0.7-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.7-cp310-cp310-manylinux_2_28_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ ARM64

chiapos-2.0.7-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.7-cp310-cp310-macosx_11_0_arm64.whl (323.2 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

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

Uploaded CPython 3.9 Windows x86-64

chiapos-2.0.7-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.7-cp39-cp39-manylinux_2_28_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ ARM64

chiapos-2.0.7-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.7-cp39-cp39-macosx_11_0_arm64.whl (323.3 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

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

Uploaded CPython 3.8 Windows x86-64

chiapos-2.0.7-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.7-cp38-cp38-manylinux_2_28_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ ARM64

chiapos-2.0.7-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.7.tar.gz.

File metadata

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

File hashes

Hashes for chiapos-2.0.7.tar.gz
Algorithm Hash digest
SHA256 f0c8742b9e92e5d27ced06e80cdcae7f29d1752ffa38ea30930a4a61ee03072e
MD5 289a303a94534d43361d2529e889df46
BLAKE2b-256 fb33f61fb8a44d1525da2b0e8c384f69deffe472c3a52ccaa1e3ef5370987e7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.7-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.1 CPython/3.12.6

File hashes

Hashes for chiapos-2.0.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 28608b841ec313a924c5c4f0bbdd1409267bab4f9b02a8b42dbb79a6250eae53
MD5 f12a311d9259f8fd58fa12c23133658c
BLAKE2b-256 035c42840a9dc11ca6ececd3d87baf7c9244da532716cb51ff06f8c650855920

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 de1f87746d77b8eeb9552dd1c73ff03585cf1b66e95db1fe6b645c202a93aac2
MD5 e0da2d6ea887a42462e5ec2ee1ccad2d
BLAKE2b-256 ea611e6882a802d8888503823d0ac71710d98e3a480c7822f9a00d7fc380076d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 34dff6233bfbc329251c63b324a0d2002614af9a34dcc19731ccb1652c8e929e
MD5 9d24753ca01bbec6d4255c4b4f7a3b6b
BLAKE2b-256 c68f5703aaa005d4d983e978e3dde9fa2b266da96c70409cdcbeeffab0e72a97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 a70c9341f557e5fa2273fb89c0051832fecba39b65c172e6260c127ccb07a5e4
MD5 24a94fe2de8404f3fb632facb5a973c2
BLAKE2b-256 a73c5a01dc2826a70a4b2e0992aa33e232790d162a0c0c32bf35c77a491e9e44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c03caf22a6394a55fc2bcc125857c7de2cc8bf59d1fa48e0bd652857a436a01
MD5 4d39605735d291f5dc646c0944d43d58
BLAKE2b-256 58baef3fe3b9c0019fe52b1a09fc9415d3a89b5c6da8c346190a81487c3bc5b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.7-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.1 CPython/3.12.6

File hashes

Hashes for chiapos-2.0.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e4b876c598a0be96fa57568c00856400a8db13dec6675690b39866b5a8c4f616
MD5 79ca6bf4ea0d78889e021c30fb65739d
BLAKE2b-256 f2cca3b88337386e1dafa4ced0bfa5a380f886cd7621b4be07a65a551988bebf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6cb076637d803b95eaff72afb78f65cfbc170875bcb066d90699196a930a251e
MD5 b26ccd0d5d8cafc5f802a008abc5805f
BLAKE2b-256 bfacc83bfbdb4d5cbf7af1e3dfeb7292199a578520f1682e181fa913697e2ea8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 20bd73256db48b4bdc235f6e6485acfbcf25191b4d51d0df6f01f7430fc3cd10
MD5 865098d3dd1ade5c08cfb8a766768b90
BLAKE2b-256 8bb3aafc177be74ba4ad80baec4595c6e2d58e2efc68bb737b00a3e2702a478e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 1e8e514a00ee86b300ec6f72632b4116b4e19791498a91d6183f5301f91310b2
MD5 40a2df75663b8a8a924ae416a1ddfccc
BLAKE2b-256 ffe6ba683f5e32e490918e538d37b60c27951fdecf6e6ebd6043a695329bade7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8ca1d50b09ed4f99cc0317b45fa9a5e892c60304f4436632d6e6a759a53f9dfc
MD5 332d3a4f3c8e99525fd0af2d468d2c55
BLAKE2b-256 58747f52359237b7339a8a3fb0e5a41de7b5c1290c680437792de69da3b3bf4d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.7-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.1 CPython/3.12.6

File hashes

Hashes for chiapos-2.0.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 950643079c0523c5f0fad376ec7df27836d189944ce9303604e4f72f7a58d31f
MD5 4ae6d9ec89d7f44322a5b5a16e092574
BLAKE2b-256 149c2e2fd4c0e43a1a5f98ce6e6912aade3f4febd2e33f52a43fed80cefd966b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a0d616c503bf1f6a0c4497f5ca77d05da05dc382888c377e53ad8586e67ea891
MD5 1b2ff9390bcf13097c77d000bb51d342
BLAKE2b-256 72251e3c48b9370dff86340e3d4e246dd37c413a7732013a5e97b5def7a6412b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8eba7dfe2e36aa701085bd89a5e977dae162fdeba90c7b407e28ba1f306bda01
MD5 320907632dafe4fa55d9468a484091f1
BLAKE2b-256 77012ab9e96fb6f5465b612915daf7decbe6c00380f39d1f3a3017c616cbf98c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d4629faeee3963c91e0d4b4880d28b47d371428ef3471412d74b8e3a5b84a9cd
MD5 b9bc9e456c7e8e534fc4f45a18aa519d
BLAKE2b-256 68f8aff10740d6cc8f427851155aa252f3a5c41121e25f8aec0a6e8a90583950

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 65f2aa723b8c8e37af2d529429ac277ffe818879203e4d5e55c7db193db99d2a
MD5 9472723e95816bf1698c8bcf210b6fb3
BLAKE2b-256 f5f5624d21e64deaeca8160255bbdba952c9b7c0b19025923d731504bcf1a024

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.7-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.1 CPython/3.12.6

File hashes

Hashes for chiapos-2.0.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0fa42d07d317b16039ac9c511da90810b8e176c785c66c0ec010e4fd5cf7b170
MD5 adcd523e280555535cc414aa8954423c
BLAKE2b-256 ab45f86f4cf84e976d798c9e9b2397a775839242553b98610f66f4c3148634f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fd9fd7cd4ec2b74886f88bc9f10a46b64ad8b778472859595f31db240291beb4
MD5 c07381ff450bce8cc174161121e365e7
BLAKE2b-256 c0ed64cc6bddff1df859d7dd5bdbd229318b3e4554825a03d4ae6744045e465a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 37acd69a89b7b5c6e5465d4c22125d0d1a818db420e00ca0d3f3f4412d7e9937
MD5 177aaaf34311b9c98f69ce36ea4db3e9
BLAKE2b-256 4f43e7e4a37e1306417cd027f3221c627124a246e446d9a3fb351820f5e54904

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c103d7ef5697177820731551e7d223a431d3181d61c9adb6c3b8b4b8ccc2bee4
MD5 1eadd4cf9a410b7320e8628db6de27b0
BLAKE2b-256 25f221a1a777f4e359504a6ce6638d5087fccc4cc27f710522811cd5a37e86e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ec4e2199f82822400c2e6c4afee3cd180b8523dd512e178d46a915a75cdf8ea2
MD5 c9b306fe4c2ef7b2c912936c4a2f51ea
BLAKE2b-256 6d8d7a5e60c33ab901d2d0298fdbd67a66d7ddccb65eb05fa9203a147efe0d33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-2.0.7-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.1 CPython/3.12.6

File hashes

Hashes for chiapos-2.0.7-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e7ffe0df3f6d22063f9b59d0e5d393e3b7dada3d268edeee2c9058dd98f447e2
MD5 11f0bb7ca6f5b482d244ece1dec54168
BLAKE2b-256 a547b9d936cd2a20526baa50209bb76d1bcd49cfddc4ed5207b8f4979b17ee80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a3f58cded9cf47c3b2eca3fc571daf19feb3f6ef085bfc33d99144c96c025bc7
MD5 992a52c8eb9bbf819dfb8bba4cf4fbf3
BLAKE2b-256 f62443ce4ad29c8401cc2b0922e75acf24eff359438d6f99b2d8879082cd50f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c30d1f89399e631899e947cb5472d2cb9a39577edc7d1508646748b2f89e3cbd
MD5 9f992cdd0c5f8f94c200280b43d9740f
BLAKE2b-256 4ad1ffbfed39e8dc5da09501221b2f0434cf1c75a22ea520a0cd0c3964294ea1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-2.0.7-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 97a66ef35e198436c15f5ca45910760db56e2708e425890dfaa4a991ffb08c57
MD5 530b1128b205c28e2cbb2f0b46707f43
BLAKE2b-256 b6a9b0dec52ae2a0deb33242a1b60addca19ac785fe6cc1bc4ed689f308bd02d

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