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

Uploaded Source

Built Distributions

chiapos-1.0.12b15-cp311-cp311-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.11 Windows x86-64

chiapos-1.0.12b15-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-1.0.12b15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b15-cp311-cp311-macosx_11_0_arm64.whl (207.1 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

chiapos-1.0.12b15-cp311-cp311-macosx_10_14_x86_64.whl (236.3 kB view details)

Uploaded CPython 3.11 macOS 10.14+ x86-64

chiapos-1.0.12b15-cp310-cp310-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.10 Windows x86-64

chiapos-1.0.12b15-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-1.0.12b15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b15-cp310-cp310-macosx_11_0_arm64.whl (207.0 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

chiapos-1.0.12b15-cp310-cp310-macosx_10_14_x86_64.whl (236.3 kB view details)

Uploaded CPython 3.10 macOS 10.14+ x86-64

chiapos-1.0.12b15-cp39-cp39-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.9 Windows x86-64

chiapos-1.0.12b15-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-1.0.12b15-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b15-cp39-cp39-macosx_11_0_arm64.whl (207.2 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

chiapos-1.0.12b15-cp39-cp39-macosx_10_14_x86_64.whl (236.5 kB view details)

Uploaded CPython 3.9 macOS 10.14+ x86-64

chiapos-1.0.12b15-cp38-cp38-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

chiapos-1.0.12b15-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-1.0.12b15-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b15-cp38-cp38-macosx_11_0_arm64.whl (207.0 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

chiapos-1.0.12b15-cp38-cp38-macosx_10_14_x86_64.whl (236.3 kB view details)

Uploaded CPython 3.8 macOS 10.14+ x86-64

chiapos-1.0.12b15-cp37-cp37m-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

chiapos-1.0.12b15-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-1.0.12b15-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.0 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

chiapos-1.0.12b15-cp37-cp37m-macosx_10_14_x86_64.whl (235.6 kB view details)

Uploaded CPython 3.7m macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: chiapos-1.0.12b15.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.12b15.tar.gz
Algorithm Hash digest
SHA256 26c3e259db4f7ea4d899f5dc91d5079f1e506216b8fb09f4af357860aeda7d4b
MD5 17973e562f2c362a04c9aab91b727319
BLAKE2b-256 f27c1a495cbb61276f6813611230fb72b68894d9090990fd4cf50b23da7ba37a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 06a8f3d7a9e18f38db350fd903bec618bcdd4df5219d816996b51db9c008c917
MD5 ebb8cc0b2e09639ba0b1082dc7f6f0f2
BLAKE2b-256 e720799c5b5f9b059a6c3643b589abebeb6c7ba7941b9af2daa4b640e483f8a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7835fd9cf0177888ef13b826f5ae66798da27c571efadf5f3cc0e6f891e738f3
MD5 f8eb9730d120a651e8fbd9f5c4374448
BLAKE2b-256 bf69d2d3b0d5a53a493502c2812071444f783f259f4c4ca0e8e6209aa8b261be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e8a21fd3fce729655e7c1ce95b88a179346b48238ea3216f0fca31ce6b8828e0
MD5 54574a216a59fe5a20e5e951ae92befa
BLAKE2b-256 13647caa7afd0892bc8ab2e21fe415ec70a6f2fb98e04030fbcce6eece475466

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b89802007c538037946fe43b31623410af2b0e876a19f5d8d9e286a4d047be1
MD5 225253fdae03bb676ab5f8b7ede8dde4
BLAKE2b-256 c3842a73441b828e05b8a976a78b55774143e41b572158fb0641ce3008eedebb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 1cbfec31b2476e350ac741e0582cd175207bda2634bed61bb216b5a7da086b4e
MD5 d9d6d41e79abed34c5872ac7cd9a8993
BLAKE2b-256 8916c47d42ee6003eda0dbdd32e2f73031381487a8970e4f6dbcd06dfd89699a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 41e8ad4b507032347232a3333e6a4a3289f7c833ec2654ec7990c08acdec02ce
MD5 7ce2507212ee94897f11bf79f71c1f13
BLAKE2b-256 b230d7ac0b21ca76e0c025fbe4b1bcdb2c877340c9930e601ebde89ea02af070

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6144fffffc93afde32965e42ebfa7b37a908d42e6b525d7092d1dc94b696fa5b
MD5 27f8bbb4018ebe61693d7ae5b20aaf4e
BLAKE2b-256 43e3d7e88e39fbb7c10e1b1b0be7670e40b11b9c2dfefefffc754601117a0e4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 45861e375d4f2404988ad96b8a6db7d619968db36cf0c775c5e1922791f74ca7
MD5 c4c0d31bf2083a39203877c3e261565b
BLAKE2b-256 07f072bb16aa584c598e7466d6f8fd069d1452ea54e3a4db33cb115ce31044c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a3e94ea1f47ebaca930ad6a578dd795ca8bcbd59e2588b2de409353f69146eec
MD5 89d80f3e550a42b0c1ca7f750e569151
BLAKE2b-256 aa76ee446a4ffbf772c90f688b59000028054fd900336926abbb8a73d4e99fa9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 0d1c425a0ec35aa2522f9abbc3bfd7436353aaa11c70cf9986371fb39fa63c95
MD5 153b76cac816143963778d6d4ecae449
BLAKE2b-256 05350c1f7392df25f604a12c5c77f669e401879b6b980f55c226b671be46c0ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 39f2f632bd2a4c718254d972a762d7c1b069014eb14b822fd1abe752b8e771c0
MD5 34e35d746b12bddb6669f1d90e8ea0ef
BLAKE2b-256 f4f9a54a82b94c1097d379ffcb315d72ca1075a68c737e699656ca637bdfc071

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6eb224c621c67ea7f5cc8f48ec321ad5691e8f12ce6e2f15f02e019e807eff21
MD5 88d3a03e6031e10d7adc36a1b4779ab2
BLAKE2b-256 04f2b32601e2ba6a0d1a6466757f173f3f162d61fd4eb7af8b6cd21444e2ecfb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 70c65d7c40e78a759186f9dd62ba2dd387380b5404cf330845664893dce75f64
MD5 f62d95c510925f23fec308ef38b9712d
BLAKE2b-256 760de9f645c4d282fa35e15b031d38209073551bfbf164c82e4ce428e0bf4066

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9d977492689d1a3f54b0562c5ce8b8af3bad844a80b17622145f694f67bc29f8
MD5 b81c49dac23c2c4cb34d95120251353d
BLAKE2b-256 d847de4ed84b4a2dcfee707fddef171fb550d605113ac39d66a9bc701e718c76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 477933ca4f3bf478b5418788c3a825cf86ac8d59cb9a94a18c386e81a898bfdf
MD5 7c9738c2948bcc2adb1215709f485089
BLAKE2b-256 67c524e158688c8c4c6b36d36e4a7fff70a223dbc1d2afd211ac7df86a96422d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0ccdb6f0e76e3ac262f3a5bf0fcf8c9ae8f4fd9631d5746e226b55a39e9f6ab2
MD5 b748d929273a8f97324b4a852d83f246
BLAKE2b-256 d7f60976d0254b54c8b5e2bf86bd80a6039c51809ac343cbe4a978471b07e026

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fc2048beca64a73fbb3fc72d80eb807100e6108b273e57b8a6bbb2b64fbe40ac
MD5 8aaa2c825bb1c4c6bc00aeba757ed5c4
BLAKE2b-256 53d3b06138593433c0963ce2440b7ef998d02b7e591c31a6ebf737ab82119dfb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 600a805c520b1d0a7508c7d6ab016f416ec832aa1730d12c48361d810afd40b7
MD5 f7a46ece53cf4e921924a1dcdaa528f6
BLAKE2b-256 f1b3032a6900caf59c2b2b2151e601e538edc60d38da4761e86a5f7d6f522a64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 409417c36a5db1adbe7ce9dd09baf2c0d2b3f90f49b87f4ad351fa2cde5eec53
MD5 240afdc88fddc622056d91bb4c5f5317
BLAKE2b-256 42307a30b80b9e38afd1b1ad12941830757581fc6c2195dbf51ca2a9f335e6cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 7d19d9d6f3124d5e0c0aad2fbb46e2f3a676e8c93514983b233cee0733cef8f7
MD5 b4fbcbad9cca23a66cc71f1cc3acb365
BLAKE2b-256 cc603946c1b5089c20088077d937a161aa2e564e26a42616302cdc21cf19a578

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 9df3b05e07194e1a45c29125bca057dc96b8c322c1a317696dbe9ae8d5812b88
MD5 1d6786c6bb56cd468ad7b1d4e085b33f
BLAKE2b-256 a16baf348f662994c380fa3611a145ef3b34d3245e849e34fd7275135aee7699

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd16818e9faa611484469b0ae18a82195604f090511aefa77de816ba9f3b7388
MD5 a7a7fe4c462f2f94c9c7db3b1993480d
BLAKE2b-256 11f5a92ae2488b373e5e3faa5dc62a421e286c8a4858da0675940abf404bd04c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3baa424a033c97352e5d639dbc5844307fae1e926926272d1417228ffbb758ac
MD5 4656fa4cf4c22dee5985177630b2b114
BLAKE2b-256 544f903ff3f5e3476c20bdd88f1363ec84f77ccf4d3ab65e0658714942db9ef4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chiapos-1.0.12b15-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 c6a1ccf59a4a12c4bba9790424516f9e32b51d3f97b6790ff840fce62fcdb995
MD5 14cb17cd5950768be4bbded7b975e8b4
BLAKE2b-256 d1d75604a84eb90c9a2bd190cc3955b6661eb2fb02eac90f426d39fca9881949

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