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

Uploaded Source

Built Distributions

chiapos-1.0.12b19-cp311-cp311-win_amd64.whl (415.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

chiapos-1.0.12b19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b19-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b19-cp311-cp311-macosx_11_0_arm64.whl (313.8 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

chiapos-1.0.12b19-cp311-cp311-macosx_10_14_x86_64.whl (371.2 kB view details)

Uploaded CPython 3.11 macOS 10.14+ x86-64

chiapos-1.0.12b19-cp310-cp310-win_amd64.whl (415.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

chiapos-1.0.12b19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b19-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b19-cp310-cp310-macosx_11_0_arm64.whl (313.9 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

chiapos-1.0.12b19-cp310-cp310-macosx_10_14_x86_64.whl (371.2 kB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

chiapos-1.0.12b19-cp39-cp39-win_amd64.whl (415.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

chiapos-1.0.12b19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b19-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b19-cp39-cp39-macosx_11_0_arm64.whl (314.0 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

chiapos-1.0.12b19-cp39-cp39-macosx_10_14_x86_64.whl (371.2 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

chiapos-1.0.12b19-cp38-cp38-win_amd64.whl (415.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

chiapos-1.0.12b19-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

chiapos-1.0.12b19-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b19-cp38-cp38-macosx_11_0_arm64.whl (313.7 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

chiapos-1.0.12b19-cp38-cp38-macosx_10_14_x86_64.whl (371.0 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

chiapos-1.0.12b19-cp37-cp37m-win_amd64.whl (416.0 kB view details)

Uploaded CPython 3.7m Windows x86-64

chiapos-1.0.12b19-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.2 MB view details)

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

chiapos-1.0.12b19-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.2 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b19-cp37-cp37m-macosx_10_14_x86_64.whl (370.4 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

Details for the file chiapos-1.0.12b19.tar.gz.

File metadata

  • Download URL: chiapos-1.0.12b19.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for chiapos-1.0.12b19.tar.gz
Algorithm Hash digest
SHA256 1dd200dbbc25cdbcf8e5db014f5e33b349ec354dabf5a5fb0172e2f5b05ccc2f
MD5 445dc788fa06325739c2711411d300ff
BLAKE2b-256 6655929a57cf21eca28ad53d5a5d20356dff3b0e497025d5ae93184b2cdf5eb5

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 89d26c81326446968b7143472cf3ccc20a451b0d45896e4bcba8cae953c04166
MD5 bedce3d5e40c744de0be715c4275bccb
BLAKE2b-256 9281ef9618249a0564bd547cbfbf876006ff0981f5cf9f1fbf4d00bfcda58091

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8cfdf639cff329c43768110dc672d2115d4ed36266d9530424ea731a9354ee77
MD5 13b53fc4094e2d67ed8283cf846c3da8
BLAKE2b-256 9382f282aa2bb2225e923edf6897d1c5aa6399a87f1bcd45a6acd2ea8b6cb764

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8c18ba51f00b69a8ab6dd1aba9b230729dcb7d4ea4aa79fc7284acbb8bbe5e67
MD5 cf1d67b14146d10d18bff8a1c819eea0
BLAKE2b-256 a03f674b5f36056f6c04e92a0a09678bb91139166894c1171711fbdfd5b6fe30

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f6dcfec5d5405cfd3885e21040073c64490eb5bd89346817dac252f2f3739b21
MD5 c96a1eff20210dc5397020ad4f7546e9
BLAKE2b-256 d12d89a1b2d5f3492c39a3ceff82f5fa43f6fbed903b508e4eee6a1d60c5f15a

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 52d94c640230a8096b278cdcddcdf4417632c385bad81ffeef78acdcc4fd47cb
MD5 cfc4d6736da8260ddc9b173d45c37ab6
BLAKE2b-256 6d064d08270df23452b19eaca62d6930327450b5dba1a0050a0eaf225299c759

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8bf9232bf5302b065ed66b9ae1e377f2c0ad3ecaeba8d54a30ad25f27e1f5f94
MD5 93b9668e4c2102d78d8577669501152a
BLAKE2b-256 9766827205cc61e0daf83a6bd53bd55d36a72fb4bd868ebcadbb46ed0c702311

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7bb5927d9bbbb9cf4cdf99125008a062e8df6ea1fb35b87775310e9386901f7a
MD5 94790c984862ccdbee5d2373af3695bd
BLAKE2b-256 c3091f17c491de23a2fa15222918c50f8da04d165f5c1ecf91f748a4276ac777

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0605a5896dc2f2c185f9b08a4006e352db9537c7ec8659e44dde5007ed2eef1c
MD5 6eab4d299db7f8babcf7588570e8c23c
BLAKE2b-256 a07793868faefb0211121625e28af3abc045aded183adf225e80510f2647d8d2

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e54c1a2dcda8e47b7c8eab5fd398d8e9d290dc15d7f9370f61cefaf6bc18a370
MD5 f85fe70d16cdd9f99077852c4e563489
BLAKE2b-256 9403794d0f77ba492ee8659b84ff47b69f88ad305b8bf05971fe64e7ac24d654

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 e324630eb23e958bc9651260ea3150d13b8ac18bbe11c26bb44ad59115ce0a58
MD5 65648d197f54fc380a94ab37827dc0a2
BLAKE2b-256 ab50ef7e2ff9320c02058a6fa1971900df913a6ba708526284165d4fc9614fa5

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e92d111ea80f549411a50498e5a5c35655b6a0859d23ea5e2ed708ad7af34be0
MD5 0383e0aca4d91f449c9d9eebfcc1bd08
BLAKE2b-256 22e4eb332e98a18f889bc3e186815f82e52678b973f0fa1757f6b14985da0398

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44c7399ba9e7c9c0fc24ea5f213e941e6691bf5d9d3f006f57eb5c00bc04fe38
MD5 b5ebb2354445dd1845714b98d331f85c
BLAKE2b-256 2978aec5c5f2cbbc57edfbe68dca71dc7f42599ba5cf56c3a76e11a0a1c76867

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cd5b396b5a56cceaa701f0e8570b46095c87db49c4f78e100d74ac75c013f99a
MD5 3b3662565bddf1a1553792c53c792b97
BLAKE2b-256 97cf19ee96d2fc0172bf740926de7903e19cbf46e3f898064bcfc2a198fec470

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f8bbf477562915bbdd6e9fa014584b466283559f89f90224f8c84e0dcea71b0
MD5 559bc986e353f890444392caa6f82d34
BLAKE2b-256 1d8056bd97883a03c0580fd07efe50d2044eae96a93c7924484655d4b808a837

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 946ec57cba28884ecfa576fd3698bd42731ba64ebdf10f6577d2ae8b47cb35b2
MD5 af0d78891dae68a9b6a5ebc7dec22bd4
BLAKE2b-256 4881dff823a4a561e855960ac7968ec1e991394bd03c346f0fc1455eba10158b

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f9d639d2db3d9967718cfa4584fc67d81edc071c48cbf0e032d228e1c2fa11c0
MD5 cbc2a00f3c824b8fd9961c532154cb24
BLAKE2b-256 a2caca7c62f69586dab0946317e5eff1c19614fea02bf00f917ce275fc8180fc

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c8293a234a3c6ad6fd57cd6b0c99a691929ff597399259a0597428d876d85a9e
MD5 0adb6e8b5f7384b04952630abbd305e4
BLAKE2b-256 067680b84348350f95cac9670bdd4e9abfdef56932cd8dba60d0cf2628bcc51d

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ad6cd9056c1014169dfc1338c9b3b632ea50038066974fe0ac34e62c0c573a3b
MD5 003ba22bbe8c3676a672238536cd58e4
BLAKE2b-256 a517f6d13fd0add893c37839b36fddf59e58ee618fcf33815985adab7edd38ca

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8910add02e9ff1cb18ec7d1076c1266543f97eb328083cecac3b79e9854db4ca
MD5 e34d4f590a0f938673ebf3257a4c3d20
BLAKE2b-256 e6633664e3f13722e6aeac7206dceda49140e049f049e82d11cf0fa395ca7cef

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 f98efc96378069745c00de94fdabfd68c1be071204d339848685d548c29d69cb
MD5 8aa067d0ce7dfdc4da04a3fbcfe299e6
BLAKE2b-256 28c165527d783bad4dc03b97e7f77f783c829097e46d7048c83a27b94993ffa6

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 297885c064829bded1a03bc5cc3145f30557a1dd6e87c9455e5c1008a4c4fc0d
MD5 1f10d52a75672311b8323b679e6e3596
BLAKE2b-256 81df60633edb03be0251b95c0caf58803940dcb84d8c16ee97453a57d0472af6

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 84bb16d57487c9e066bf574410ecffcc820f2af63a63b7dd65d2584ff6954193
MD5 03bf72afd79a22a08c1d95e5811cbf31
BLAKE2b-256 d613ab66d512d77bb9fe45064cd8ce6cd1a2467e61961d9bf581943d14c03f5f

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7f5849fe14f7c55830a37f7b28ce272ab7fd458982b28908da49c3e639b39dd6
MD5 9e444223599604f6831c1a85f268bc02
BLAKE2b-256 6d4c0b20544a96763da637a4b96eca26c6bea752365dce319d23fa2b10dd5c5d

See more details on using hashes here.

File details

Details for the file chiapos-1.0.12b19-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-1.0.12b19-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 7412d418f0d8b55dedf57967d1bd72a1fb61df514927e21290df9891d9dff5ba
MD5 817a8abeaff554a44e52d8b57eb9c124
BLAKE2b-256 7ee78824e3e6444886d6658c2d9c489dff3f5e5580f7e0b722e7c0a0cee7a184

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