Chia proof of space plotting, proving, and verifying (wraps C++)
Project description
Chia Proof of Space
Chia's proof of space, written in C++. Includes a plotter, prover, and verifier. Only runs on 64 bit architectures with AES-NI support. Read the Proof of Space document to learn about what proof of space is and how it works.
Expect significant changes by June 30, 2020 that will break the plot file format, move to chacha8, and otherwise improve plotting performance.
C++ Usage Instructions
Compile
git submodule update --init --recursive
mkdir -p build && cd build
cmake ../
cmake --build . -- -j 6
Run tests
./RunTests
CLI usage
./ProofOfSpace -k 25 -f "plot.dat" -m "0x1234" generate
./ProofOfSpace -k 25 -f "final-plot.dat" -m "0x4567" -t TMPDIR -2 SECOND_TMPDIR generate
./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 generate
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" generate
./HellmanAttacks -f "plot.dat" check <iterations>
Python
Finally, python bindings are provided in the python-bindings directory.
Install
git submodule update --init --recursive
python3 -m venv .venv
. .venv/bin/activate
pip3 install .
Run python tests
Testings uses pytest. Type checking uses pyright (currenlty disabled), and 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, and Windows and publish them with
a source wheel on PyPi. See .github/workflows/build.yml
. setup.py adds
a dependency on pybind11 that 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 master branch is 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 master/release version in preparation for a new chia-blockchain release. Please branch or fork master and then create a pull request to the master branch. Linear merging is enforced on master and merging requires a completed review. PRs will kick off a 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
Built Distributions
Hashes for chiapos-0.12.13-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c2c4f2ce5f64b4e9b44294f90dc31420af85478f9820a5fc7c610bddc0e9572 |
|
MD5 | 97c5f940f19db3d180c81064cc237529 |
|
BLAKE2b-256 | 37417e06ca7f0c7fdd42097392229107f09e29a0f8b85871243d0c2747862a9e |
Hashes for chiapos-0.12.13-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 871d494ec8053296734f8eccebf5c04584540e90c7275c70eb169d7acf2b4822 |
|
MD5 | d8d67097eb3fb7fbb39a4259c3c61856 |
|
BLAKE2b-256 | d74639201ad6a871334328dd2982e8e3cfed480714c373cafcdb3d64964dc6c4 |
Hashes for chiapos-0.12.13-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f5e7a05de15ae2b2136d1e05253795df0e1aaf8f3bc57f0992d0639bf2ed701 |
|
MD5 | e76ce7482088f1d96565b14f3d3cfc5f |
|
BLAKE2b-256 | b7d88120b7be0d19523f99404382d6b75816e47de66ab519e2a93ad4e3a70cf0 |
Hashes for chiapos-0.12.13-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0c631286675477c77a35aca9fa7eb72fea5a9bffecadb227d5a25379a183a79 |
|
MD5 | e97f650f5c79b1ebca0d5d5a73e68636 |
|
BLAKE2b-256 | ca29d3dc1e45a6ed4a143101879fde31dcd851af8acf92c536c0f1cf1274de2d |
Hashes for chiapos-0.12.13-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc1f56b9e2e923363a2bf18efcc537236dfefc82a0950da70b1331c4fa7311ac |
|
MD5 | a19160cfd1502f59d2eff7c93c1e7988 |
|
BLAKE2b-256 | 7467d6b621fcf05ccfb64cfdec1dc7cf72a234a31f4231d9659f77fe607792ec |
Hashes for chiapos-0.12.13-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98d147fef307751343f4883b0b36ee4b898e9524b96e4e3d519925088333770d |
|
MD5 | ba967818f0e8fb9ef62f6bcad37b0cbc |
|
BLAKE2b-256 | d32ff287612c8413a50f24da4daec94ab1de237cbf64ee3fdf3e91f9a9b4e3e0 |