Chik proof of space plotting, proving, and verifying (wraps C++)
Project description
Chik Proof of Space
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
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
Built Distributions
Hashes for chikpos-2.0.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c7e71b5f53a5f5f78fe28dc63f35c034461d5d330f5f71eb9cb0af8750e6d8c |
|
MD5 | 757fd592a81492ceb3401f8b0ea2253e |
|
BLAKE2b-256 | 4bf5f8df5fb3ca0b8ae7bd9385a62c3f40ba7e3c61f52f862b5319236300c7d3 |
Hashes for chikpos-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 427a3d9fdb22f09e7cca11e1aa7b0c1c137b5a38ada389c304190be63d983297 |
|
MD5 | bf6c5e3781919c3118536a6f9fe26beb |
|
BLAKE2b-256 | acac53231357a50058a5d0505ea37434dadae962c99d3a9ff47814854605ae5d |
Hashes for chikpos-2.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50783edb436d01554f98f0ccacc8c0541857b971732435c12bd65c9156f13a9f |
|
MD5 | 0c6e48a74ab9ac944dfb847df21912f8 |
|
BLAKE2b-256 | e098b3294060027dcde44f74c38d31dd9483f994fcd1eeec78f1913791369914 |
Hashes for chikpos-2.0.2-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e14efe2910ed201bb1499081d28af2b3643453b483f745e151ce6bd3d743b3f |
|
MD5 | 11782751878e6fc6145a37e2ea336ffd |
|
BLAKE2b-256 | 39e2b0fc1027cf339549d2e70056276e871a488eac92dca322e76786ce4ae073 |
Hashes for chikpos-2.0.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad7a22c8151ac5687ad079d0b109aca043387f48fcf9e4945363fec096b3c276 |
|
MD5 | 69c87db8f42ccc0ac608846382fd25d6 |
|
BLAKE2b-256 | 856105d15f16bd7060732f34f4cf1061a15882e5962f2aab37bb1d6e4e951e66 |
Hashes for chikpos-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8afc35644864a038fd0126e1d9345dc0f24a2442cb55c55c081472d6fc6297b |
|
MD5 | 43da9a7293ab3c49f3a55e94948f18e4 |
|
BLAKE2b-256 | e606e3ad8d122d34b92af4e3e399833fd71eb397daadeb0676e10796e6d9a04b |
Hashes for chikpos-2.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ba63763228a3226aef0eadbfaf059c2c1d64e7a1e2dad6c9da3723020f43108 |
|
MD5 | bb9d582ae7e6dc495b9569e61e252482 |
|
BLAKE2b-256 | 60785b5936931aea63b27d6e83dc4d7b5cda6ed563e8dba72732a881208587e9 |
Hashes for chikpos-2.0.2-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6c3b79a14de6081a609f86c86e2199ac56cc441be4aee97d168a5f12b8996af |
|
MD5 | 2d5ab55e832db252fe3e93322ae1ff36 |
|
BLAKE2b-256 | 923517cebfbfce0d28c0fe4dbeba685626f706f4f0b5a87190f6ba999b3a4048 |
Hashes for chikpos-2.0.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13168837c4b926ab142c49f52bd8c759bf3114f989ed7a83302f6af04d0f8506 |
|
MD5 | fac3f53b1a8575585b825b835f94b88b |
|
BLAKE2b-256 | 26b914a17005fb933b2b00af15cd9532830c719f1cd13cc000e2812c3fc91c2e |
Hashes for chikpos-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09eb4928a4e53c4ea2d4734b08e1226d08f59dbfd60a320eb325adc0b7d4e44a |
|
MD5 | edbbb23e37cbbe13cb5f5bb982c75168 |
|
BLAKE2b-256 | 93a26c07061495295be328b591fc4b30fb3d67ba10f0ba1ec1c41a7bbf4d1f25 |
Hashes for chikpos-2.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 593cf2a0574df15f531bbafe3fcf7bdf6a677f761ef5ef7604f5d3d62c05bdcf |
|
MD5 | f80002eebd7a200cfba7a4a30c804209 |
|
BLAKE2b-256 | 775b5b64cc4299e3b4d990664791ba52e8530290b82c2c9b32246d6a95157b29 |
Hashes for chikpos-2.0.2-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3712a2f0740d05144a834c2d53f99fb3e32dcbbf3800a6aa652070c23ad194c |
|
MD5 | a1b9291222fa5ef5678389344da7ee53 |
|
BLAKE2b-256 | ddda34370b95db2e453d4bddbba3330ddc9d41712eb6fffaa4a9c6f7074b17aa |
Hashes for chikpos-2.0.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69940e7dceb1fab1cc6217df3a00bf1306784805f39cdec1dcc0b62330f8239e |
|
MD5 | c114e2fe6edec963628483f7d0b49aec |
|
BLAKE2b-256 | 1f9ed5c44dd7fb9cb69dc5ecbbbdff2f5fad60cb31d393e2a1f1cde32090570e |
Hashes for chikpos-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3b3528d8faa0a5217381867ac6410b8bcb45a1a98b1e41f2586170c84be9542 |
|
MD5 | 9c5c6fb0a758714533c1a9d6bf08348e |
|
BLAKE2b-256 | 926a1eb1acc0cd913f4873b2d2020629f6db9862c8565dd33a3b933b397163f7 |
Hashes for chikpos-2.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6007ea74834f289d12198bb59ea3752948ccf573a480b195382efa46bc39a0e4 |
|
MD5 | 780fc7dc030317fefa1cf4b071f15863 |
|
BLAKE2b-256 | 7e7232652c098b9c1b8813037ff6b74afbc0770f2cdc863cf5a07a3011c87b84 |
Hashes for chikpos-2.0.2-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6ed313a468be87d99ecfc1de520f0c78bf7bce0cb08ccf71cb249b004e25c13 |
|
MD5 | d7fc59bd85f321fb55c1a2237a8be945 |
|
BLAKE2b-256 | 651e94900a481d0e17b67e6f920bec617efb1997bd3e5126d2b4f56b816bdd77 |