-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into simon/subgroup-check
- Loading branch information
Showing
79 changed files
with
15,917 additions
and
3,180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,19 +11,18 @@ jobs: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: actions/checkout@v3 | ||
with: | ||
toolchain: 1.56.1 | ||
override: true | ||
|
||
lfs: true | ||
- name: Checkout LFS objects | ||
run: git lfs checkout | ||
- name: Fetch path to MASP parameters | ||
working-directory: ./masp_proofs | ||
shell: bash | ||
run: echo "MASP_PARAMS=$(cargo run --release --example get-params-path --features directories)" >> $GITHUB_ENV | ||
- name: Cache MASP parameters | ||
id: cache-params | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3.2.4 | ||
with: | ||
path: ${{ env.MASP_PARAMS }} | ||
key: ${{ runner.os }}-params | ||
|
@@ -33,16 +32,9 @@ jobs: | |
run: cargo run --release --example download-params --features download-params | ||
|
||
- name: Run tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features --verbose --release --all | ||
run: cargo test --all-features --verbose --release --all | ||
- name: Run slow tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features --verbose --release --all -- --ignored | ||
|
||
run: cargo test --all-features --verbose --release --all -- --ignored | ||
build: | ||
name: Build target ${{ matrix.target }} | ||
runs-on: ubuntu-latest | ||
|
@@ -53,17 +45,14 @@ jobs: | |
- wasm32-wasi | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: actions/checkout@v3 | ||
with: | ||
toolchain: 1.56.1 | ||
override: true | ||
lfs: true | ||
- name: Checkout LFS objects | ||
run: git lfs checkout | ||
- name: Add target | ||
run: rustup target add ${{ matrix.target }} | ||
- name: cargo fetch | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fetch | ||
- run: cargo fetch | ||
- name: Build masp_proofs for target | ||
working-directory: ./masp_proofs | ||
run: cargo build --verbose --no-default-features --target ${{ matrix.target }} | ||
|
@@ -72,35 +61,22 @@ jobs: | |
bitrot: | ||
name: Bitrot check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.56.1 | ||
override: true | ||
- uses: actions/checkout@v3 | ||
# Build benchmarks to prevent bitrot | ||
- name: Build benchmarks | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --all --benches | ||
run: cargo build --all --benches | ||
|
||
clippy: | ||
name: Lint #Clippy (1.56.1) | ||
name: Lint #Clippy (MSRV) | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.56.1 | ||
components: clippy | ||
override: true | ||
- uses: actions/checkout@v3 | ||
- name: Run clippy | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
name: Clippy (1.56.1) | ||
name: Clippy (MSRV) | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --all-targets -- -D warnings | ||
|
||
|
@@ -110,12 +86,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: beta | ||
components: clippy | ||
override: true | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@beta | ||
id: toolchain | ||
- run: rustup override set ${{steps.toolchain.outputs.name}} | ||
- name: Run Clippy (beta) | ||
uses: actions-rs/clippy-check@v1 | ||
continue-on-error: true | ||
|
@@ -124,104 +98,33 @@ jobs: | |
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --all-targets -- -W clippy::all | ||
|
||
codecov: | ||
name: Code coverage | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# Use stable for this to ensure that cargo-tarpaulin can be built. | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Install cargo-tarpaulin | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: cargo-tarpaulin | ||
|
||
- name: Fetch path to MASP parameters | ||
working-directory: ./masp_proofs | ||
shell: bash | ||
run: echo "MASP_PARAMS=$(cargo run --release --example get-params-path --features directories)" >> $GITHUB_ENV | ||
- name: Cache MASP parameters | ||
id: cache-params | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.MASP_PARAMS }} | ||
key: ${{ runner.os }}-params | ||
- name: Fetch MASP parameters | ||
if: steps.cache-params.outputs.cache-hit != 'true' | ||
working-directory: ./masp_proofs | ||
run: cargo run --release --example download-params --features download-params | ||
|
||
- name: Generate coverage report | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: tarpaulin | ||
args: --all-features --release --timeout 600 --out Xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
|
||
doc-links: | ||
name: Intra-doc links | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.56.1 | ||
override: true | ||
- name: cargo fetch | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fetch | ||
|
||
# Ensure intra-documentation links all resolve correctly | ||
# Requires #![deny(intra_doc_link_resolution_failure)] in crates. | ||
- uses: actions/checkout@v3 | ||
- run: cargo fetch | ||
# Requires #![deny(rustdoc::broken_intra_doc_links)] in crates. | ||
- name: Check intra-doc links | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: doc | ||
args: --all --document-private-items | ||
run: cargo doc --all --document-private-items | ||
|
||
fmt: | ||
name: Rustfmt | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.56.1 | ||
override: true | ||
|
||
# cargo fmt does not build the code, and running it in a fresh clone of | ||
# the codebase will fail because the protobuf code has not been generated. | ||
- name: cargo build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --all | ||
|
||
# Ensure all code has been formatted with rustfmt | ||
- run: rustup component add rustfmt | ||
- uses: actions/checkout@v3 | ||
- name: Check formatting | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
run: cargo fmt --all -- --check | ||
|
||
security: | ||
name: Security - Cargo Audit | ||
runs-on: ubuntu-latest | ||
container: | ||
image: rustlang/rust:nightly | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Install cargo-audit | ||
run: cargo install cargo-audit | ||
- name: Cargo Audit | ||
run: cargo audit | ||
run: cargo audit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[workspace] | ||
members = [ | ||
"masp_note_encryption", | ||
"masp_proofs", | ||
"masp_primitives" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
\toggletrue{issapling} | ||
\renewcommand{\docversion}{Version [\SaplingSpec]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Changelog | ||
All notable changes to this library will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this library adheres to Rust's notion of | ||
[Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
### Changed | ||
- MSRV is now 1.56.1. | ||
|
||
## [0.1.0] - 2021-12-17 | ||
Initial release (of `zcash_note_encryption`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[package] | ||
name = "masp_note_encryption" | ||
description = "Note encryption for MASP transactions" | ||
version = "0.2.0" | ||
authors = [ | ||
"Jack Grigg <[email protected]>", | ||
"Kris Nuttycombe <[email protected]>", | ||
"[email protected]" | ||
] | ||
homepage = "https://github.com/anoma/masp" | ||
repository = "https://github.com/anoma/masp" | ||
readme = "README.md" | ||
license = "MIT OR Apache-2.0" | ||
edition = "2021" | ||
categories = ["cryptography::cryptocurrencies"] | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
|
||
[dependencies] | ||
cipher = { version = "0.4", default-features = false } | ||
chacha20 = { version = "0.9", default-features = false } | ||
chacha20poly1305 = { version = "0.10", default-features = false } | ||
rand_core = { version = "0.6", default-features = false } | ||
subtle = { version = "2.3", default-features = false } | ||
borsh = {version = "0.9", features = ["const-generics"]} | ||
|
||
[features] | ||
default = ["alloc"] | ||
alloc = [] | ||
pre-zip-212 = [] | ||
|
||
[lib] | ||
bench = false |
Oops, something went wrong.