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.12b20.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-1.0.12b20-cp311-cp311-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.14+ x86-64

chiapos-1.0.12b20-cp310-cp310-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.14+ x86-64

chiapos-1.0.12b20-cp39-cp39-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.9Windows x86-64

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

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.9macOS 10.14+ x86-64

chiapos-1.0.12b20-cp38-cp38-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.8Windows x86-64

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

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b20-cp38-cp38-macosx_11_0_arm64.whl (313.8 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

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

Uploaded CPython 3.8macOS 10.14+ x86-64

chiapos-1.0.12b20-cp37-cp37m-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.7mWindows x86-64

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

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.7mmacOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: chiapos-1.0.12b20.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.12b20.tar.gz
Algorithm Hash digest
SHA256 446f03cbe1632f41b5ddd8c47f1ffe9490e9692e023e23d950f333172770e51f
MD5 9d79b2cc679ec47c5e35828fe12154d8
BLAKE2b-256 ab7c22dc1756de72df477dc0b1202724224762dca99de7cbd639943b1d5f3c17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 409a987c5ce6e72c3a8ba0b8c78fb8fc13fd36e4c65dcc2185377802483ee375
MD5 1a628136ec637f0afdc85a74b178e17a
BLAKE2b-256 fbc37a4f78878eaaaa95e3b2fd3caa663a0a27fc6a67d27cace8f07e6909845e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 91d9f4b4dc4ebed82bbcb044cec724ad5f2ac128abd37ce8bc354bb4104aa843
MD5 b37dbab71efd3bb2435115e61b0087df
BLAKE2b-256 24f952d0e6656ae66e4bd2165e168aef942eb5a4286ca5250a6ea4c38d611215

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 385b183f9bd9e2ac603242e9dfcffb8ea7c4eae47cffc1ebee6c5b0604ab7a65
MD5 eb7fb76c2bb0deb8c14bb05192440492
BLAKE2b-256 71a329bd353a5cad2f995c6c9d571b79e88a38c9629374b4f23d5abff36f8417

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 19657e8353ba4cdfe45ada5ca16dcd0227561d65a15fe2b05969fbec9a542c62
MD5 0e07a726652e1008aa39ba1b9f6ad739
BLAKE2b-256 f2ab972aaf0fdadd02f50950c1cfa4a6c94d219641e979462674001d81aefa44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 c4b37d7301a3daf3786c2cee9f848c649f3f6876ffdd83923270a7e500b097e8
MD5 47a4eca78cfbf2ba190c811c56bc4d71
BLAKE2b-256 a8f366e305534fb294befed2a2cc285edb382efc4518efc5a95f14cb9fbf0946

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 808ef8b16d98fcd128b8f471384d489dfce66f89da2751763f96623e5e2bb83c
MD5 07bbbe4cfa790cc3c922072bfd68ea67
BLAKE2b-256 9c69dc756c33d5516e966f8739e773e88e4f69137a936f6a0182f4a4e10ae396

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f475553137f01d910b285c948db5105600eafed569a087870df8e515fed67cf
MD5 060dc3afbbff360b5b29f8d6fa34f28b
BLAKE2b-256 c97dafebd17cfc9825773c0e1e64829d869b0ea75bedcba1778ea355da663a3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 29e2366302a0b306292d13c00164f6855e54b563979a5f1d972d6d3b99c2b8b3
MD5 e2ca5e47a64f115c0264b3950b2e9329
BLAKE2b-256 c067ed97ea873c284c9b82a6239e407c30126584d318572741e575a5046eb002

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a304c0a26f5a63cfbc805f12cc9b74015c99f60d9fcdd12e7ecdfd02f8471563
MD5 fbf863759c2fe09b35b61446113395e9
BLAKE2b-256 b084fe771a76d592ebcc005b8b1b8e73bc4fef80d2850ccb9b7cdeee138ec199

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 508bce1c99953f321c7b9dbe8ed67c92181c203d112e03c15c32155f0d6561c6
MD5 2efaa17cfd1d66daec9b53798d02e781
BLAKE2b-256 18a2fca507b592339f6009ee2562f6a6211a74033d6e6d8690deff9460bf3dc1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.12b20-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for chiapos-1.0.12b20-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 948519c01ecbc722eb9b1877e484daead6355dafe890daae5dc72b7215b8ab11
MD5 dafb9020ed0d7bf3fee41a603bf8ac14
BLAKE2b-256 58866b9179f05212032ede438b603495b6fb66b8f07ac066c7dbc09fc2dd4410

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 924fe51a31a11d4a95190cf3e78e1ebcabb575d215c5fd256b3fc707ebba77ee
MD5 b3eafbc47527ea3f5f8c7cc0e701efb2
BLAKE2b-256 e7f9a5354215a8ffca102bccc905e273a4e8ad7df585922cbb3e651667e41994

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a57650e9fb53e2df9e6866977e4f7947a0ed9a9fe38b82a5560f9111721d9f7f
MD5 3ab2ff6a3929df436e571052cbba53da
BLAKE2b-256 b8e3dfcddc533ff23730bb10b9be83e460cbab9805ffa0efa804dd97e12d51e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb7d5c0672babf355023fd1365ce90791968dc519856b13c64034ca24dbdee54
MD5 507933986fadf5cffb858ef81fa490c3
BLAKE2b-256 2a81243c6eac4c0f52d82de30c5ed837c42f896161e288bc8dacd68fc5fcb011

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 adce61d090a16aceb56f36adfc68c56dd1e29045baa7e32cb4c82c00db02cbd5
MD5 4444bd0958c9fa6bd3a1297d50aa28ee
BLAKE2b-256 e6641cbdb2af2831363b7f88817425c0de8d347f3d0407a710bb359ede58c9e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.12b20-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for chiapos-1.0.12b20-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1dfea36053111222c7d993bc494798abe1db7d2891f2a5cd92b81b12288ed442
MD5 dbc96d84b2625a52118abdc034f74f98
BLAKE2b-256 00e5f0e883db9fc7d0773f58d1e2af504da800eb28f8d4eee9e8885fcb26672b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dd50eb24dbebfd1674e9492a5e736434155c37f5f5d50c93c7db179d1f7c2e53
MD5 aa52aa3eede81266334379f2c1a26a68
BLAKE2b-256 15cf00bb79f6d78e393395484d54be9634b4f578ec5055941653f9294b0bae48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8ea38474e45e8fdf6d1b7068a895572ba206d7741e00b8bf885e8e00d88c97f5
MD5 617a04f92e478770a70c3c646761ae56
BLAKE2b-256 a24eb9281db3ce6e8adfeb2612d97ff37122b27f11185229643c0c784031d5c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4c4d0bd1af15c8af638d7c750ef5be4530121e78dd0e69d4d7f5d17315b894b1
MD5 66279586472d04ee1ff25edcfeee4cc8
BLAKE2b-256 a9848f1a0f76b7f81bc2ca589c64b888b2b01419c888dfbdeda0476b3070ec5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 41209ff3011825fa23a03716197e4b14fce27f2516b6d64bf5ec044a343a1042
MD5 0471d2e0e87759b753ce3315bc08669b
BLAKE2b-256 5c8e7129c3d215d0b3691a0f7a34953329fce7516dfa87ef921090db73fcbb20

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chiapos-1.0.12b20-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for chiapos-1.0.12b20-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8a2a529aa0a7d0b2e66f422e72bb056ae7f80e7cd6b33972e5d41557654d904f
MD5 deffd5d401f8ac026abcbb306ada2c56
BLAKE2b-256 2e61dfbe6919ec57c40b72e594fe4b7ebcea9c51177b487de9ce2688744b748b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 da8823292a8f9f753a9ce60eb43d0670dcc17516f28dba576b43e76fbd9e56a5
MD5 7371059c3b1e24d6fc4b2dabd8326475
BLAKE2b-256 e02574b1e8719bff6c0480ae7648a10a4da95330bd2ecd374f8b52871d291891

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 451578de0bbdd011e1663af8424708d8dd728dfe27f59644785e872b8650f52f
MD5 7284f6b57f03307529e0200bd198f6df
BLAKE2b-256 da927a72e7527e529c84742e158da1b5fc0487971a4684d1436582652b89b7e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b20-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 b7937ca4e5cb705b679d2ea39eaac0bf29720c8b4d53c4e5838db13d5ef80b43
MD5 169ecc02e6d669fdbb971f50cae79401
BLAKE2b-256 358164c389a70e32e2467cee2e93a0e62c283c34a0207a724799a216839aa4d3

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