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

Uploaded Source

Built Distributions

chiapos-2.0.0b4-cp311-cp311-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.11 Windows x86-64

chiapos-2.0.0b4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

chiapos-2.0.0b4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

chiapos-2.0.0b4-cp311-cp311-macosx_11_0_arm64.whl (314.4 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

chiapos-2.0.0b4-cp311-cp311-macosx_10_14_x86_64.whl (369.6 kB view details)

Uploaded CPython 3.11 macOS 10.14+ x86-64

chiapos-2.0.0b4-cp310-cp310-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.10 Windows x86-64

chiapos-2.0.0b4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

chiapos-2.0.0b4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

chiapos-2.0.0b4-cp310-cp310-macosx_11_0_arm64.whl (314.4 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

chiapos-2.0.0b4-cp310-cp310-macosx_10_14_x86_64.whl (369.6 kB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

chiapos-2.0.0b4-cp39-cp39-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.9 Windows x86-64

chiapos-2.0.0b4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

chiapos-2.0.0b4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

chiapos-2.0.0b4-cp39-cp39-macosx_11_0_arm64.whl (314.5 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

chiapos-2.0.0b4-cp39-cp39-macosx_10_14_x86_64.whl (369.8 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

chiapos-2.0.0b4-cp38-cp38-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

chiapos-2.0.0b4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

chiapos-2.0.0b4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

chiapos-2.0.0b4-cp38-cp38-macosx_11_0_arm64.whl (314.3 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

chiapos-2.0.0b4-cp38-cp38-macosx_10_14_x86_64.whl (369.5 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

chiapos-2.0.0b4-cp37-cp37m-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

chiapos-2.0.0b4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

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

chiapos-2.0.0b4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

chiapos-2.0.0b4-cp37-cp37m-macosx_10_14_x86_64.whl (368.9 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

Details for the file chiapos-2.0.0b4.tar.gz.

File metadata

  • Download URL: chiapos-2.0.0b4.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.0b4.tar.gz
Algorithm Hash digest
SHA256 481f842175e3d9ed7f95f8a6e9be4b4662f87bedd66c4be9e4c361b1fe6afee8
MD5 d76ffafb146fd4fb151202d3b5af8243
BLAKE2b-256 61b7032f8667302ae663846aea5a160456907794166379aed03a9384e20ec2b5

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b614bf97188fa0cf43ffa11e16e2746d8ac3e6209e5fb9365a38e7eee35a19ed
MD5 4e48dca5fb26c978d02682bdc8f4198b
BLAKE2b-256 32b28d11776966ee4b0ebbb9c18cfab810953d22f794c43b0e5c0983837cefb8

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6f0a929b221e3391f523faf18aebf90a8fbbe4eb7230c61c57f516ac2521e608
MD5 5765ac233883c562a7f2d4436eec4964
BLAKE2b-256 07ce93943531fa36d74d91110e6891af15ab54001aaf6d1b8352886a07407098

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d07c8e416b2d9a5129a57986233b3636bbf7b41d2f68680f8124235763deec0e
MD5 f2a4207222b5a4fb0c1e1865c4a427d1
BLAKE2b-256 c172513bcff2f45dc2db0bc0fddf31541550c0ee89663c064a5cf8ebd71047e7

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 64f302962658b751c52fde38cd978ff07ab6ec799f599d5d34105727bb879cc2
MD5 b234ed0879d4addf3a0e8feef80b4cae
BLAKE2b-256 5e1dfc26a07d13e7ab1cb044284094e09c5dd46a4c40aad4b4394ca9e5355352

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp311-cp311-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 300307e200010ec535ec69e80be75da2462ccd467743a6f30e72afbfb0849462
MD5 dd3e994df4efc8b3e19cbcfd5506b5b1
BLAKE2b-256 32ba3877dd03a9acaa58bc5e3453e241857445ecb507c56b09c940bdfb5b5ff6

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5ffdaecc805c8854167c96e00fb0102b6ccd2d503e069122fb326aa7bc310738
MD5 e680e14d1ecd1ee0664cfe602dece277
BLAKE2b-256 7451533363751f274e6573b2526b874fca60ae8cb81286457f8e902344dbb2ba

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bb9f3813976295eea136471d153d447ff990926c61ae88e7cb71d1ceb4fcb632
MD5 60d1c030c9277a7ad298d8486304522b
BLAKE2b-256 610cc305ce4a039df5c640f07fad044a872dfce6aa2323fc7abd8a9ce6b0b56b

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 70946cd1aaa40d3c8a597ccc00c14bb8156285004a08d339138e75443ee794da
MD5 83bb4be9783785683a5a5e141693e613
BLAKE2b-256 d74f41b088e973912703d0082253531546f7c105fd66899142a8010da1b8a10c

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 477a5fe116645d9ec3da9b422f73b350473d99c86e52f74b9ef70459d49122e6
MD5 71d4bc82d836f5de01d00ba2e46904b0
BLAKE2b-256 9e5c0ec98aa747561f946960fa88c23b8fb70b3ee6bbbf8b7b636fa418f1d474

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp310-cp310-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 f82c1fea53e14936ffd139cce9e94c0562c230ff77883f055ce0761632e01b58
MD5 8d2c4f79d89cfa4af21f313768891ac1
BLAKE2b-256 188c31bc73aa7b26a361cb7dd35701e32f852dca236208564d64c91566d69ee2

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.0b4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.6 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.0b4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 02954c98b11c987780bff2bac19b79a46a1ee738e37afcad76256044c3c8e05d
MD5 99643067e10f3069d8f4144f1a38ebe1
BLAKE2b-256 bdebe394f7cda8b58263035a255b1e14f75469273decb0703e234113e2d93187

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 41956cf24e961c670057eba7a9569c1233bf5fedbcf225497d65a9b4ac24426a
MD5 5bb2973aca0e4daf37ed03087253609e
BLAKE2b-256 c7d2ed774a73506780e0d43fcce667bc894447aa70f06bee7d419f8ebcbc174f

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1f3fcfc4faa284ab38e98e7afe752f81da70bdabe9ee1db1e87d826494ceab75
MD5 ee38681b77f9348172e4dd00717b0320
BLAKE2b-256 e664d4706dfe2e5256f479953f2e3b871296a7a1a88926ff447cfe5b58b2552a

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6e242c43d953353836524ac1a2a97fc32db023836d9630f73889e6add5ed55a1
MD5 1d4bb8ee2e8336a6b4da71dd97d2982f
BLAKE2b-256 ba9d0c168ede8591846d32094178b4729624f767af74203cb18925036d7deb36

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 373944a23683a0c499eaac2ef204e2e925825aa284621d3b31f862c54759b2c8
MD5 5efc09aaf82d906708efcbd6f7e06c74
BLAKE2b-256 17c026e8c2428684e6a5e4981f2ba81d1e72b021d2b343717feece3f4626822b

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: chiapos-2.0.0b4-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.6 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.0b4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3a7a811330c2a3f55f7ece4b1422997080f59c998ef1d4f2d10b6d82d772cdd1
MD5 6b90cf8bd30f4d610ad26c299c0f8620
BLAKE2b-256 072627751efc7ecfd36c004c15e3542bc8c0fe4523a942ae034c19868601c3e8

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c46c9d7dcb9aea38b57348a163c8600970255347fd09b96a6348de371e780d19
MD5 26ebf85735c45e4729b664a2028a28ef
BLAKE2b-256 4d1bc87872ad70e6fa23ff4b2b6e07449fa8fc6e5496ac58b4f56f9186f109d6

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 020f3e0e471837abe6ddfaa7a7d99af188216d9ce3f1ba68551765a3432d0bdb
MD5 4e2014c0257de2a1ab9edc7062fc7285
BLAKE2b-256 9a34e35d44cf3a6e33af71b2d82109d4022cbd91f8ef4f13ba1c53abf9b155c7

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b881d044aa01de0e263b0f44f35bab9663ea3309c69456f106175b26de159e31
MD5 6a38d91203a80e46711523ccc57a8efa
BLAKE2b-256 865641d53f3bd141918cd4a1aa77e2d6e44161ab96dda0eea8e2bd83b4b892bb

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 48c6fa7518e4e2acfb3d3982bb0b31f4799984b09374844540d38b3aebf969c9
MD5 a73d7288a509c5cdca70635f9d9acd76
BLAKE2b-256 c90d0cfae278aa6baa9eed9a1a75ab74767d4197679082f2526d8a813be40628

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ae4cdc19f0ed93fc7b1369a1aa9e1272b1cfac427f0fb1f6777d33828d31c487
MD5 193e58d5529f1f5be367b97f5817c7ba
BLAKE2b-256 301a7148239786e95627a895eccdbae34b5fd64fd61af691f93db48a55da6174

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8c2a1294d8618643748fffc1c3870897cacb8d310d6e6e071f79e46d91d433bf
MD5 383e36e7d385a5fc8a1f1d759575262b
BLAKE2b-256 c3cfb067c30f8f8337e1c86b2f257218ac49a7db3f34701e6cd6505165eab5a9

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a3441e0bea66eedaa84126e5cc620cc918c6468ccdab919c2d9ed32c3c1bd030
MD5 c62b2f93bcca723cdee76921de9e3523
BLAKE2b-256 8494a1e31562450c4d3b457a9c933a7131b8d489d1d1c8289473683bada7471a

See more details on using hashes here.

File details

Details for the file chiapos-2.0.0b4-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for chiapos-2.0.0b4-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 fbcc699b67648bc1e3fddb9556ae7a448ccd6e94e81989b756b83e0c35b1ce55
MD5 83ef92a2d2978e9f9dec760ae981ceee
BLAKE2b-256 55d36a68e9da65a240b7f5fc7ef6e46d7c2b47b23129f2bd1d86633710bc8018

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