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

feat: add documentation and CI for contributing #93

Merged
merged 8 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@


---

Before we can merge this PR, please make sure that all the following items have been checked off:

- [ ] Linked to an issue with discussion and accepted design OR have an explanation in the PR that describes this work.
- [ ] Added **one** line describing your change in [`CHANGELOG.md`](https://github.com/manta-network/manta-rs/blob/main/CHANGELOG.md) and added the appropriate `changelog` label to the PR.
- [ ] Re-reviewed `Files changed` in the GitHub PR explorer.
- [ ] Checked that changes and commits conform to the standards outlined in [`CONTRIBUTING.md`](https://github.com/manta-network/manta-rs/blob/main/CONTRIBUTING.md).
26 changes: 26 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
changelog:
exclude:
labels:
- changelog:skip
categories:
- title: Added
labels:
- changelog:added
- title: Changed
labels:
- changelog:changed
- title: Deprecated
labels:
- changelog:deprecated
- title: Removed
labels:
- changelog:removed
- title: Fixed
labels:
- changelog:fixed
- title: Security
labels:
- changelog:security
- title: Other Unsorted Updates
labels:
- "*"
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release
on:
push:
branches:
- 'main'
jobs:
release-on-push:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: rymndhng/release-on-push-action@0.23.1
with:
bump_version_scheme: norelease
tag_prefix: v
use_github_release_notes: true
max_commits: 128
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- [\#93](https://github.com/Manta-Network/manta-rs/pull/93) Add Changelog and Update Contributing Guidelines

### Changed

### Deprecated

### Removed

### Fixed

### Security

## [0.4.0] - 2022-06-08
### Added
- [\#68](https://github.com/Manta-Network/manta-rs/pull/68) Increase Likelihood of Low Probability Events in the Simulation
- [\#66](https://github.com/Manta-Network/manta-rs/pull/66) Add WASM Prover Benchmark
- [\#62](https://github.com/Manta-Network/manta-rs/pull/62) Add Recovery to the Simulation
- [\#57](https://github.com/Manta-Network/manta-rs/pull/57) Add Parameter Generation for Poseidon
- [\#53](https://github.com/Manta-Network/manta-rs/pull/53) Add `serde` implementaion to HD-KDF
- [\#48](https://github.com/Manta-Network/manta-rs/pull/48) Add Contribution Guidelines and Issue/PR Templates
- [\#34](https://github.com/Manta-Network/manta-rs/pull/34) Support Scalar Multiplication from Precomputed Table
- [\#3](https://github.com/Manta-Network/manta-rs/pull/3) Setup Initial Rust CI Pipeline

### Changed
- [\#64](https://github.com/Manta-Network/manta-rs/pull/64) Improve Synchronization Infrastructure
- [\#59](https://github.com/Manta-Network/manta-rs/pull/59) Improve Ledger API Flexibility and Encoding
- [\#58](https://github.com/Manta-Network/manta-rs/pull/58) Upgrade Simulation to an optional CLI
- [\#42](https://github.com/Manta-Network/manta-rs/pull/42) Convert back to `async` Wallet Interface for WASM

### Fixed
- [\#88](https://github.com/Manta-Network/manta-rs/pull/88) Downgrade Poseidon to fix Binary Incompatibility
- [\#38](https://github.com/Manta-Network/manta-rs/pull/38) Use Correct `AssetList` as `BalanceState` Implementation
- [\#33](https://github.com/Manta-Network/manta-rs/pull/33) Fix Receiving Key Encoding and Generalize Wallets

### Security
- [\#50](https://github.com/Manta-Network/manta-rs/pull/50) Remove Trapdoor from Circuit

[Unreleased]: https://github.com/Manta-Network/manta-rs/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/Manta-Network/manta-rs/releases/tag/v0.4.0
44 changes: 37 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,51 @@ Thank you for contributing to the `manta-rs` codebase! Here are some guidelines

## Use Conventional Commits

Please use conventional commits at least for the major changes introduced by your PR. We use the following types:
Please use conventional commits. We use at least the following types:

- `feat`: adding a new feature, new functionality to the codebase
- `fix`: fixing old code
- `wip`: marked whenever a commit should be considered part of a set of commits that together implement a feature or fix
- `chore`: small changes/commits that are left over from other commits
- `wip`: marked whenever a commit should be considered part of a set of commits that together implement a feature or fix

See the [conventional commits specification](https://www.conventionalcommits.org) for more details on how to write and use conventional commits. We use squashing for our PRs so we can add types to commits and reformat them according to the spec if you forget to include them. PR titles should also follow conventional commits with the major category that the PR belongs to (except for `wip` which should only be for commits).

## Changelog

We use the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) specification for [`CHANGELOG.md`](./CHANGELOG.md). Whenever we add a new PR we want to make sure to add **one** line to the changelog with the following format:

```text
- [\#3](https://github.com/Manta-Network/manta-rs/pull/3) Setup Initial Rust CI Pipeline
```

See the [conventional commits specification](https://www.conventionalcommits.org) for more details on how to write and use conventional commits. We use squash and rebase merge for our PRs so we can add types to commits and reformat them according to the spec if you forget to include them.
in any of the relevant categories outlined in the changelog spec:

- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

Like the rest of the specification entails, all changes should be presented in reverse-chronological order. To label a PR as belonging to any one of these categories for inclusion in the GitHub auto-generated release notes, use the following labels:

- `changelog:added`
- `changelog:changed`
- `changelog:deprecated`
- `changelog:removed`
- `changelog:fixed`
- `changelog:security`

to place each PR in its respective category or use `changelog:skip` if it should not be included in the GitHub auto-generated release notes.

## Pull Requests

See the [`PULL_REQUEST_TEMPLATE.md`](./.github/PULL_REQUEST_TEMPLATE.md) for more details on how to build a good PR.

## Style Guide

To keep code and documentation style consistent across all the code in the repository, we are adopting the following style guide. We begin with the formatting style enforced by the Nightly version of `rustfmt` with configuration specified in the [`.rustfmt.toml`](./.rustfmt.toml) file. Beyond what `rustfmt` currently enforces we have specified other rules below.

### General Gramatical Structures

### The `Cargo.toml` File

The `Cargo.toml` file should ahere to the following template:
Expand Down Expand Up @@ -72,15 +102,15 @@ maintenance = { status = "actively-developed" }
Specifically, we have:

1. Use double quotes instead of single quotes.
2. Use the standard ordering of the `[package]` map.
2. Use the above as the standard ordering of the `[package]` map.
3. `[[bin]]` before `[features]` before `[dependencies]` before `[dev-dependencies]` before `[build-dependencies]` before `[profile]` settings.
4. Order features and dependencies alphabetically.
5. When selecting features for a `[features]` entry or when selecting the features on a dependency, order the features alphabetically.
6. For a given dependency use the following structure with `optional` and `features` keys as needed:
```toml
crate-name = { version = "...", optional = true, default-features = false, features = ["..."] }
```
If the crate is a `path` or `git` dependency, replace those keys with the `version` key.
If the crate is a `path` or `git` dependency, replace those keys with the `version` key and add a `tag`, `branch`, or `rev` as needed following the `git` key.
7. When adding a feature, add a doc string in title case and a newline between each feature.

### Feature Selection
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ members = [
"manta-pay",
"manta-util",
]

20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
<a href="https://github.com/manta-network/manta-rs">
<img align="left" height="180" alt="github-banner" src="./logo.svg">
</a>

# manta-rs

[![Workflow Status](https://flat.badgen.net/github/checks/Manta-Network/manta-rs?label=workflow)](https://github.com/Manta-Network/manta-rs/actions)
[![Latest Release](https://flat.badgen.net/github/release/Manta-Network/manta-rs)](https://github.com/Manta-Network/manta-rs/releases)

_Rust Crates for the Manta Network Ecosystem_

<br>

## About

The `manta-rs` libraries represent the core logic of the Manta Network protocols shared across all of its products. This project is built as a monorepo for the foundational Rust codebase of Manta. See the following repositories for projects by Manta Network that build off of `manta-rs`:

- [`Manta`](https://github.com/manta-network/Manta): Core blockchain node implementations built on [`substrate`](https://github.com/paritytech/substrate)
- [`manta-signer`](https://github.com/manta-network/manta-signer): Desktop ZKP prover and wallet implementation
- [`manta-front-end`](https://github.com/manta-network/manta-front-end): Web dApp for interacting with Manta networks
- [`sdk`](https://github.com/manta-network/sdk): Software Development Kit for building wallets and dApps on top of Manta

The protocols implemented in `manta-rs` are described by the [Manta Specifications](https://github.com/manta-network/spec). See those documents for more information.

## Contributing

To contribute to `manta-rs` please read the [`CONTRIBUTING.md`](./CONTRIBUTING.md) file for more details.
10 changes: 10 additions & 0 deletions logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions manta-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = 'manta-benchmark'
version = '0.4.0'
name = "manta-benchmark"
version = "0.4.0"
edition = "2021"
authors = ["Manta Network <contact@manta.network>"]
readme = 'README.md'
readme = "README.md"
license-file = "LICENSE"
repository = "https://github.com/Manta-Network/manta-rs"
homepage = "https://github.com/Manta-Network"
Expand Down Expand Up @@ -35,14 +35,14 @@ name = "reclaim"
harness = false

[dependencies]
getrandom = { version = "0.2", features = ["js"]}
instant = { version = "0.1", features = [ "wasm-bindgen" ] }
getrandom = { version = "0.2.6", features = ["js"]}
instant = { version = "0.1.12", features = [ "wasm-bindgen" ] }
manta-accounting = { path = "../manta-accounting", default-features = false, features = ["test"] }
manta-crypto = { path = "../manta-crypto", default-features = false, features = ["getrandom", "test"] }
manta-pay = { path = "../manta-pay", default-features = false, features = ["groth16", "test"] }
wasm-bindgen = "0.2"
wasm-bindgen-test = { version = "0.3"}
web-sys = { version = "0.3", features = ["console"]}
wasm-bindgen = { version = "0.2.28", default-features = false }
wasm-bindgen-test = { version = "0.3.30", default-features = false }
web-sys = { version = "0.3.57", default-features = false, features = ["console"] }

[dev-dependencies]
criterion = { version = "0.3.4", default-features = false }
1 change: 0 additions & 1 deletion manta-crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ rand_core = { version = "0.6.3", default-features = false }

[dev-dependencies]
rand = "0.8.4"