Skip to main content

Chik proof of space plotting, proving, and verifying (wraps C++)

Project description

Chik Proof of Space

Build Wheels PyPI PyPI - Format GitHub

Chik'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 chikpos e.g.

Contributing and workflow

Contributions are welcome and more details are available in chik-blockchain's CONTRIBUTING.md.

The main branch is usually the currently released latest version on PyPI. Note that at times chikpos will be ahead of the release version that chik-blockchain requires in it's main/release version in preparation for a new chik-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 chikpos at lgtm.com. Please make sure your build is passing and that it does not increase alerts at lgtm.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chikpos-2.0.4.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

chikpos-2.0.4-cp312-cp312-win_amd64.whl (8.9 MB view details)

Uploaded CPython 3.12 Windows x86-64

chikpos-2.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

chikpos-2.0.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

chikpos-2.0.4-cp312-cp312-macosx_11_0_x86_64.whl (378.3 kB view details)

Uploaded CPython 3.12 macOS 11.0+ x86-64

chikpos-2.0.4-cp311-cp311-win_amd64.whl (8.9 MB view details)

Uploaded CPython 3.11 Windows x86-64

chikpos-2.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

chikpos-2.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

chikpos-2.0.4-cp311-cp311-macosx_11_0_x86_64.whl (378.9 kB view details)

Uploaded CPython 3.11 macOS 11.0+ x86-64

chikpos-2.0.4-cp310-cp310-win_amd64.whl (8.9 MB view details)

Uploaded CPython 3.10 Windows x86-64

chikpos-2.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

chikpos-2.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

chikpos-2.0.4-cp310-cp310-macosx_11_0_x86_64.whl (377.4 kB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

chikpos-2.0.4-cp39-cp39-win_amd64.whl (8.9 MB view details)

Uploaded CPython 3.9 Windows x86-64

chikpos-2.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

chikpos-2.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

chikpos-2.0.4-cp39-cp39-macosx_11_0_x86_64.whl (377.6 kB view details)

Uploaded CPython 3.9 macOS 11.0+ x86-64

chikpos-2.0.4-cp38-cp38-win_amd64.whl (8.9 MB view details)

Uploaded CPython 3.8 Windows x86-64

chikpos-2.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

chikpos-2.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.1 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

chikpos-2.0.4-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 chikpos-2.0.4.tar.gz.

File metadata

  • Download URL: chikpos-2.0.4.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for chikpos-2.0.4.tar.gz
Algorithm Hash digest
SHA256 7681566f4d4986fb85b20c00da04756a233cdb49ebcae71d6f173b37d2e09a3c
MD5 f61d08de99e54681db256ac481ecf62e
BLAKE2b-256 5971422aee82e8d84fffd928a32146519346dbeed34136699413c81d12efeb38

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: chikpos-2.0.4-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/4.0.2 CPython/3.11.8

File hashes

Hashes for chikpos-2.0.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 82d34ab54411f33bf5114bb066921b575567b54d1dceb5b0aa52da22666e8c26
MD5 0f348100f4345347a4f7c45a26b8236d
BLAKE2b-256 acef7d5f73e40c1dfa133bec7fad55763c7c39d13a00d03c409ad5f6ad141687

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 507ed1bd6a1d12dee2c654cdc243570c1642bc60c9bf851440682d528496b90b
MD5 12838c2a4249890b6416dec3e6b92db7
BLAKE2b-256 8d903adbc390f3646e66a6376d79b74c0a794ee6553ff401f8c2a60a58a212f7

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6b32c516d925e6b62f28215e5beb6bb99653e986e8f8290a5612e027867aa8f7
MD5 e3575362d415e8d83f6bda8b0f1d6e9a
BLAKE2b-256 9d7e17a8735e34299c04417c06741a1d4084bc27b0b96833f6eb85ddd0974f57

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 6456518f21e2fe7211721c0f4e7a2b227a240a5c22cd18e0fbb609282054751d
MD5 798fb00f204a7efef894dc1e431a37c8
BLAKE2b-256 60f757f1ec1c8dc62012fcfb26856aab3781617d9f9a4d4bbd32b4db3dd265af

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: chikpos-2.0.4-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/4.0.2 CPython/3.11.8

File hashes

Hashes for chikpos-2.0.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5b09ab58bbd0c275c2d6ef6982720f1d1fd98c2c13ed5cef810cd2562bad117b
MD5 0f10ba8d150c90549cbbc76066470132
BLAKE2b-256 20d8c02ddbfdf7a072a86228bd29fa3d537749161bde475c1f9ba63a77759d77

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e9f7726b3a80f566cd3da421e473b19af681237a54299bf82dfe29dd7aa5e918
MD5 55296a5725ab232f4197810b447f1a1a
BLAKE2b-256 5c401abfa6851a5d8416ae39004b06bb3b939fbbe1a594781d89ff0da7b933fb

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a70effca31127a3499761689bbcd87a7a4e8d405427653cda4b8f8ec1c0e4390
MD5 3fcb739e90cbf5e251d24577ef186c7a
BLAKE2b-256 1862dc682418eece1c8d966c51388f08a2b765fd7f30512b918804f7f88a194f

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 36889ff6dcc00da33ec54bbbae2f6258706c5efcc33d9f8d275f7010f12e76a9
MD5 ecf840a162d489269c8df0d98f41f4a5
BLAKE2b-256 8e5254638e020ba5e841b2422dad402b79198d1753923e52a51c3bd3f7f7451b

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: chikpos-2.0.4-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/4.0.2 CPython/3.11.8

File hashes

Hashes for chikpos-2.0.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8b4e676359d7f3853f311e4c63d23b184e974dc55b12e4a80c714ebd9560f0a2
MD5 30785ce45459629522a627d5ccf5a44a
BLAKE2b-256 5a7097b948f650536b409dde47949fd4f43005e0a5b0422aa5ee3b06e6bdd734

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bc60e68dde9d3e784b2a63c094555d7db8a76bdcdc14fe7345345c4f9ebea8ea
MD5 ba05a24ba1f21008740e2cf006b3f00e
BLAKE2b-256 ec7bbca3bb55973663d3850fd4a2b5291ea421816ef5b9b410317891663b315e

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d6e31fc5434e21eff89ce8c28662e627428504303dab0ead1a7306fbcb8fb59f
MD5 e5b97fbab0ebf7399298da2e05765c46
BLAKE2b-256 751fdc226c36308ce557f30e55425b36d3fa149a82b85e566e579d9d594e3d9b

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 2089125b92ba7126e0ca842b3d219efd157a4d091c61db5808ee7a31f9b3835b
MD5 e114ade933c606dcc356066a4b2d82d4
BLAKE2b-256 b3cc4dee2e039a4ff8dec909f110d9d995bf1272608d6a3c900bcafe7e8da70f

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: chikpos-2.0.4-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/4.0.2 CPython/3.11.8

File hashes

Hashes for chikpos-2.0.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 af0636e1cdbfe7034a1a20d4cf8f828e9b6d9cdf1fd6efd7611a9c389ea38a6b
MD5 e13c2fb86761a4d2ea385bae9699c1a9
BLAKE2b-256 741e37e53f3199ee34adc1b9551aedf077a6fc39478fd31fbf4705c9f40855b0

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 96288e869a8268ee1f93c79ce65104007e44e021436a0ca6d9fa24f36f5c7878
MD5 88c24f903d9c6b043dc203ad13a51d19
BLAKE2b-256 c110f3bd3b56437c78aecd3a6662209862fa5b57c4c3975cb75138e01a71d7e7

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8b1b9b0c4535b6689b3d0d79198a58fef1b78606cd551610ccabe53d2899851d
MD5 fd3b0471071eb7fdf0fc3061815f3ce2
BLAKE2b-256 ae78f0e0c0fe909a5d6dca5141137dd7c7e3f298663832253e692aee3ec4b29f

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 b2ed6d0cd1cc8098b01fb248631d03a92842fac8e805af02c0f54c8d9fc0710f
MD5 90fb373410a19374a9c1feacfd725f8e
BLAKE2b-256 92508e1367f40b0b1203cf37a0d1f701800290e8c3ad66ef4eb40a59fa3d7045

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: chikpos-2.0.4-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/4.0.2 CPython/3.11.8

File hashes

Hashes for chikpos-2.0.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b81b9559f207349fd8cd5b19e6c5adcd2b437083a92674c3e1de5cddc2b7b09b
MD5 012b4f5058ece022ca4601e8ac328814
BLAKE2b-256 6fae2770f65eb96e6d308f17575b5d7254b9dd5447e8e977822b92b9e0cfd795

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b45dd02172482613edba2902b20157c2bd407f5044616102f8d396f09543ae3a
MD5 de5f9f42d6fac27ae63d0d8b0bec5db6
BLAKE2b-256 a936c78795990a0f8d60ff1cab46a31426a945f3037b788119e1fcc646be656e

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 22e784f9f454efbf57fa9ded929e5f1208e59d4cb52a1fa362cbbbe8d970ab35
MD5 d62aeedc2fdbd135293fbf25842ff1dd
BLAKE2b-256 e5067bab0076c132d73fd78d33591e46f25d233ebbb76684769609dcd974102b

See more details on using hashes here.

File details

Details for the file chikpos-2.0.4-cp38-cp38-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for chikpos-2.0.4-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 9b398f6337c561a46f6463cacaee7515c38fc35db1d7bc65a4ff4e43cc5d497c
MD5 6faf4c99669b2120495f21e34bc1765b
BLAKE2b-256 cf6b0a462494051ebed2dc1a30688dd9d072a651b7be7c12bb903daeb57e6bcb

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