Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: enhance README with comprehensive documentation and contribution guidelines #170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 79 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,120 @@
# Hyperplonk library
A linear-time FFT-free SNARK proof system (https://eprint.iacr.org/2022/1355.pdf).
# Hyperplonk Library

[![Rust](https://github.com/hyperplonk/hyperplonk/workflows/Rust/badge.svg)](https://github.com/hyperplonk/hyperplonk/actions)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)

Hyperplonk is an efficient implementation of a linear-time FFT-free SNARK proof system, based on the [research paper](https://eprint.iacr.org/2022/1355.pdf). The system offers improved performance and scalability compared to traditional approaches.

## Key Features

- Linear time complexity
- No FFT requirements
- Enhanced scalability
- Optimized performance

## Disclaimer

**DISCLAIMER:** This software is provided "as is" and its security has not been externally audited. Use at your own risk.

## Development environment setup
## Getting Started

### Install RUST
### System Requirements

We recommend using nix for installing the correct version of rust and
additional libraries:
- Rust (latest stable version)
- Nix package manager
- Git

### Installing Rust

We recommend using nix for installing the correct version of Rust and additional libraries:

```bash
> curl -L https://nixos.org/nix/install | sh
```

### Compiling the project for the first time
### Building the Project

1. Clone the repository:
```bash
> git clone https://github.com/your-username/hyperplonk.git
> cd hyperplonk
```

2. Build the project:
```bash
> nix-shell
> cargo build
```

### Direnv
### Development Tools

We recommend the following tools:

- [nix](https://nixos.org/download.html)
- [direnv](https://direnv.net/docs/installation.html)
- [nix](https://nixos.org/download.html) - for dependency management
- [direnv](https://direnv.net/docs/installation.html) - for environment management

Run `direnv allow` at the repo root. You should see dependencies (including Rust) being installed (the first time might take a while).
Upon modification on `flake.nix`, run `direnv reload` to reflect new dependencies or environment setups.
After installing direnv, run:
```bash
> direnv allow
```

### Tests
## Development

```
### Running Tests

```bash
> cargo test --release --all
```

### Generate and read the documentation
### Documentation

#### Standard

```
Generate and view documentation:
```bash
> cargo doc --open
```

### Code formatting
### Code Formatting

```bash
> cargo fmt
```

To format your code run
### Updating Dependencies

To update all dependencies:
```bash
> nix flake update
```
> cargo fmt

To update a specific dependency:
```bash
> nix flake update github:oxalica/rust-overlay
```

### Benchmarks

To run benchmarks, use the script:
```bash
> ./scripts/run_benchmarks.sh
```

### Updating non-cargo dependencies
Results can be compared with Tables 5 and 6 in the [original paper](https://eprint.iacr.org/2022/1355.pdf).

Run `nix flake update` if you would like to pin other version edit `flake.nix`
beforehand. Commit the lock file when happy.
## Contributing

To update only a single input specify it as an argument, for example
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to your fork (`git push origin feature/amazing-feature`)
5. Open a Pull Request

nix flake update github:oxalica/rust-overlay
### Contribution Guidelines

### Benchmarks
- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed
- Ensure all tests pass

## License

To obtain benchmarks, run the script file `scripts/run_benchmarks.sh`.
We refer to Table 5 and Table 6 in https://eprint.iacr.org/2022/1355.pdf for an example benchmark.
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.