Skip to content

Commit

Permalink
Add shields, cli usage tempdirs, ci and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmang9 committed May 13, 2020
1 parent c285c7b commit 51c068c
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
![Build](https://github.com/Chia-Network/chiapos/workflows/Build/badge.svg)
![PyPI](https://img.shields.io/pypi/v/chiapos?logo=pypi)
![PyPI - Format](https://img.shields.io/pypi/format/chiapos?logo=pypi)
![GitHub](https://img.shields.io/github/license/Chia-Network/chiapos?logo=Github)

[![Total alerts](https://img.shields.io/lgtm/alerts/g/Chia-Network/chiapos.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Chia-Network/chiapos/alerts/)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Chia-Network/chiapos.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Chia-Network/chiapos/context:python)
[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/Chia-Network/chiapos.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Chia-Network/chiapos/context:cpp)
# Chia Proof of Space

A prototype of Chia's proof of space, written in C++. Includes a plotter, prover, and verifier.
Expand All @@ -10,6 +17,7 @@ Only runs on 64 bit architectures with AES-NI support. Read the [Proof of Space

```bash
git submodule update --init --recursive

mkdir -p build && cd build
cmake ../
cmake --build . -- -j 6
Expand All @@ -25,6 +33,7 @@ cmake --build . -- -j 6

```bash
./ProofOfSpace -k 25 -f "plot.dat" -m "0x1234" generate
./ProofOfSpace -k 25 -f "plot.dat" -m "0x4567" -t TEMPDIR -2 SECOND_TEMPDIR 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>
Expand Down Expand Up @@ -54,15 +63,39 @@ Finally, python bindings are provided in the python-bindings directory.
### Install

```bash
git submodule update --init --recursive

python3 -m venv .venv
. .venv/bin/activate
pip3 install .
```

### Run python tests

Testings uses pytest. Type checking uses pyright, and linting uses flake8.
Testings uses pytest. Type checking uses pyright, and linting uses flake8 and
mypy.

```bash
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](https://github.com/pybind/pybind11) that is then
managed by [cibuildwheel](https://github.com/joerick/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](https://github.com/Chia-Network/chia-blockchain/blob/master/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](https://lgtm.com/projects/g/Chia-Network/chiapos/?mode=list). Please
make sure your build is passing and that it does not increase alerts at lgtm.

0 comments on commit 51c068c

Please sign in to comment.