RepositoryHTML
CH

Chia-Network/chiapos

Chia Proof of Space library

269stars
293forks
0issues
3views

Chia Proof of Space

Build Wheels PyPI PyPI - Format GitHub Coverage Status

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 binding

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

Rust binding

Finally, Rust bindings are provided, but only validation of proofs of space is supported, and it cannot be used to make plots or create proofs for plots.

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.

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
Chia-Network/chia-blockchain

Chia blockchain python implementation (full node, farmer, harvester, timelord, and wallet)

10.8k
Nov 24, 2026
RepositoryRust
aptos-labs/aptos-core

Aptos is a layer 1 blockchain built to support the widespread use of blockchain through better technology and user experience.

6.4k
Dec 1, 2026
RepositoryTypeScript
Chia-Network/chia-blockchain-gui

Chia blockchain GUI in electron/react

342
Nov 29, 2026
RepositoryShell
Chia-Network/chia-docker

No description provided.

216
Nov 24, 2026
RepositoryPython
philippnormann/chia-monitor

🍃 A comprehensive monitoring and alerting solution for the status of your Chia farmer and harvesters.

155
Jan 13, 2023
RepositoryPython
Chia-Network/clvm

[Contract Language|Chia Lisp] Virtual Machine

89
Nov 16, 2026
RepositoryC++
Chia-Network/chiavdf

Chia VDF utilities

71
Dec 1, 2026
RepositoryCSS
Chia-Network/chialisp-web

A docusaurus Chialisp website

66
Nov 19, 2026
RepositoryDart
irulast/chia_crypto_utils

Cryptographic utilities in Dart for the Chia blockchain with a functional object model for manipulating Chia primitive types.

66
Apr 29, 2025