Skip to content

Commit

Permalink
Merge pull request #826 from dusk-network/docs-819
Browse files Browse the repository at this point in the history
Remove note docs and fix LaTeX in docs
  • Loading branch information
HDauven authored Jun 19, 2024
2 parents c77deac + 22fdd63 commit 6c221e1
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 1,046 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[build]
# Flags needed to render LaTeX in documentation
# With this, `cargo docs` must be run with the `--no-deps` flag
rustdocflags = "--html-in-header ./docs/katex-header.html"
rustdocflags = "--html-in-header ./katex-header.html"
92 changes: 0 additions & 92 deletions .github/CODE_OF_CONDUCT.md

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Remove docs [#819]

## [0.19.2] - 2024-03-27

### Added
Expand Down Expand Up @@ -581,6 +585,7 @@ is necessary since `rkyv/validation` was required as a bound.
- Proof system module.

<!-- ISSUES -->
[#819]: https://github.com/dusk-network/plonk/issues/819
[#818]: https://github.com/dusk-network/plonk/issues/818
[#815]: https://github.com/dusk-network/plonk/issues/815
[#813]: https://github.com/dusk-network/plonk/issues/813
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@ name = "select_point"
required-features = ["alloc"]

[package.metadata.docs.rs]
rustdoc-args = [ "--html-in-header", "./docs/katex-header.html" ]
rustdoc-args = [ "--html-in-header", "./katex-header.html" ]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ help: ## Display this help screen
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'

doc: ## Generate documentation
@cargo rustdoc --lib -- --html-in-header docs/katex-header.html -D warnings
@cargo rustdoc --lib -- --html-in-header katex-header.html -D warnings

doc-internal: ## Generate documentation with private items
@cargo rustdoc --lib -- --document-private-items -D warnings

doc-local: ## Open local documentation
@RUSTDOCFLAGS="--html-in-header docs/katex-header.html" cargo doc --no-deps --open
@RUSTDOCFLAGS="--html-in-header katex-header.html" cargo doc --no-deps --open

.PHONY: help doc doc-internal doc-local
55 changes: 21 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,57 @@
# PLONK
![Build Status](https://github.com/dusk-network/plonk/workflows/Continuous%20integration/badge.svg)
[![Repository](https://img.shields.io/badge/github-plonk-blueviolet?logo=github)](https://github.com/dusk-network/plonk)
[![Documentation](https://img.shields.io/badge/docs-plonk-blue?logo=rust)](https://docs.rs/plonk/)
[![Documentation](https://img.shields.io/badge/docs-plonk-blue?logo=rust)](https://docs.rs/dusk-plonk/latest/)

_This is a pure Rust implementation of the PLONK proving system over BLS12-381._

_This is a pure Rust implementation of the PLONK proving system over BLS12-381_
This library contains a modular implementation of KZG10 as the default polynomial commitment scheme.


This library contains a modularised implementation of KZG10 as the default
polynomial commitment scheme.

**DISCLAIMER**: This library is currently unstable and still needs to go through
an exhaustive security analysis. Use at your own risk.
**DISCLAIMER**: This library is currently unstable and still needs to undergo an exhaustive security analysis. Use at your own risk.

## Usage

Check the 'examples' directory for the usage.
To see how to use this library, check the 'examples' directory.

## Features

This crate includes a variety of features which will briefly be explained below:
- `alloc`: Enables the usage of an allocator and with it the capability of performing `Proof` constructions and
verifications. Without this feature it **IS NOT** possible to prove or verify anything.
Its absence only makes `dusk-plonk` export certain fixed-size data structures such as `Proof` which can be useful in no_std environments where we don't have allocators either.
- `std`: Enables `std` usage as well as `rayon` parallelization in some proving and verifying ops.
It also uses the `std` versions of the elliptic curve deps, which utilizes the `parallel` feature
from `dusk-bls12-381`. By default, this is the feature that comes enabled with the crate.
- `debug`: Enables the runtime debugger backend. Will output [CDF](https://crates.io/crates/dusk-cdf) files to the path defined in the `CDF_OUTPUT` environment variable. If used, the binary must be compiled with `debug = true`. For more info, check the [cargo book](https://doc.rust-lang.org/cargo/reference/profiles.html#debug).
__The recommended method is to derive the std output, and the std error, and then place them in text file
which can be used to efficiently analyse the gates.__
This crate includes a variety of features which are briefly explained below:
- `alloc`: Enables the usage of an allocator, allowing for `Proof` constructions and verifications. Without this feature it **IS NOT** possible to prove or verify anything.
Its absence only makes `dusk-plonk` export certain fixed-size data structures such as `Proof`, which can be useful in no_std environments where we don't have allocators available.
- `std`: Enables `std` usage as well as `rayon` parallelization in some proving and verifying operations.
It also uses the `std` versions of the elliptic curve dependencies, utilizing the `parallel` feature
from `dusk-bls12-381`. This feature is enabled by default.
- `debug`: Enables the runtime debugger backend, outputting [CDF](https://crates.io/crates/dusk-cdf) files to the path defined in the `CDF_OUTPUT` environment variable. When used, the binary must be compiled with `debug = true`. For more info, check the [cargo book](https://doc.rust-lang.org/cargo/reference/profiles.html#debug).
__It is recommended to derive the std output and std error and then place them in a text file for efficient gate analysis.__

## Documentation

There are two main types of documentation in this repository:

- **Crate documentation**. This provides info about all of the functions that the library provides, as well
as the documentation regarding the data structures that it exports. To check this, please feel free to go to
the [documentation page](https://docs.rs/dusk-plonk/) or run `make doc` or `make doc-internal`.

- **Notes**. This is a specific subset of documentation which explains the key mathematical concepts
of PLONK and how they work with mathematical demonstrations. To check it, run `make doc` and open the resulting docs,
which will be located under `/target` with your browser.
The crate documentation provides information about all the functions that the library provides, as well
as the documentation regarding the data structures that it exports. To check this, visit the [documentation page](https://docs.rs/dusk-plonk/) or run `make doc` or `make doc-internal`.

## Performance

Benchmarks taken on `Apple M1`, for a circuit-size of `2^16` constraints:

- Proving time: `7.871s`
- Verification time: `7.643ms` **(This time will not vary depending on the circuit-size.)**
- Verification time: `7.643ms` **(This time does not vary depending on the circuit-size.)**

For more results, please run `cargo bench` to get a full report of benchmarks in respect of constraint numbers.

## Acknowledgements

- Reference implementation AztecProtocol/Barretenberg
- FFT Module and KZG10 Module were taken and modified from zexe/zcash and scipr-lab, respectively.
- Reference implementation by Aztec Protocol/Barretenberg.
- FFT Module and KZG10 Module were adapted from ZEXE/Zcash and SCIPR Lab, respectively.

## Licensing

This code is licensed under Mozilla Public License Version 2.0 (MPL-2.0). Please see [LICENSE](https://github.com/dusk-network/plonk/blob/master/LICENSE) for further info.
This code is licensed under the Mozilla Public License Version 2.0 (MPL-2.0). Please see [LICENSE](https://github.com/dusk-network/plonk/blob/master/LICENSE) for more information.

## About

Implementation designed by the [dusk](https://dusk.network) team.
This implementation is designed by the [Dusk](https://dusk.network) team.

## Contributing

- If you want to contribute to this repository/project please, check [CONTRIBUTING.md](https://github.com/dusk-network/plonk/blob/master/CONTRIBUTING.md)
- If you want to contribute to this repository/project, please check our [CONTRIBUTING.md](https://github.com/dusk-network/plonk/blob/master/CONTRIBUTING.md).
- If you want to report a bug or request a new feature addition, please open an issue on this repository.
83 changes: 0 additions & 83 deletions docs/notes-KZG10.md

This file was deleted.

Loading

0 comments on commit 6c221e1

Please sign in to comment.