Skip to content

Commit

Permalink
Merge pull request AleoNet#30 from AleoHQ/update/fmt
Browse files Browse the repository at this point in the history
Update license to 2021
  • Loading branch information
howardwu authored Feb 4, 2021
2 parents 7a272a1 + 5b9e639 commit 033c439
Show file tree
Hide file tree
Showing 456 changed files with 587 additions and 529 deletions.
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ coverage:
status:
project:
default:
threshold: 2%
threshold: 4%
76 changes: 34 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,48 +29,40 @@ jobs:
command: fmt
args: --all -- --check

# clippy:
# name: Clippy
# runs-on: ubuntu-latest
## env:
## RUSTFLAGS: -Dwarnings
# strategy:
# matrix:
# rust:
# - stable
# - nightly
#
# steps:
# - name: Checkout
# uses: actions/checkout@v2
#
# - name: Install Rust (${{ matrix.rust }})
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: ${{ matrix.rust }}
# override: true
# components: clippy
#
# - name: Check examples
# uses: actions-rs/cargo@v1
# with:
# command: clippy
# args: --examples --all
#
# - name: Check examples with all features on stable
# uses: actions-rs/cargo@v1
# with:
# command: clippy
# args: --examples --all-features --all
# if: matrix.rust == 'stable'
#
# - name: Check benchmarks on nightly
# uses: actions-rs/cargo@v1
# with:
# command: clippy
# args: --all-features --examples --all --benches
# if: matrix.rust == 'nightly'
clippy:
name: Clippy
runs-on: ubuntu-latest
# env:
# RUSTFLAGS: -Dwarnings
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy

- name: Check examples
uses: actions-rs/cargo@v1
with:
command: clippy
args: --examples --all

- name: Check examples with all features on stable
uses: actions-rs/cargo@v1
with:
command: clippy
args: --examples --all-features --all

- name: Check benchmarks on nightly
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features --examples --all --benches

# test-wasm:
# name: Check Tests (Wasm)
Expand Down
2 changes: 1 addition & 1 deletion .licenserc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"**/*.rs": [
"// Copyright (C) 2019-2020 Aleo Systems Inc.",
"// Copyright (C) 2019-2021 Aleo Systems Inc.",
"// This file is part of the snarkVM library.",
"",
"// The snarkVM library is free software: you can redistribute it and/or modify",
Expand Down
15 changes: 15 additions & 0 deletions .resources/license_header
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// The snarkVM library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with the snarkVM library. If not, see <https://www.gnu.org/licenses/>.
3 changes: 2 additions & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use_try_shorthand = true

# Nightly configurations
imports_layout = "HorizontalVertical"
merge_imports = true
license_template_path = ".resources/license_header"
imports_granularity = "Crate"
overflow_delimited_expr = true
reorder_impl_items = true
version = "Two"
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion algorithms/examples/snark/constraints.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/examples/snark/gm17.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/commitment/blake2s.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/commitment/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/commitment/pedersen.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/commitment/pedersen_compressed.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/commitment/pedersen_parameters.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/commitment/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/commitment_tree/commitment_path.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/commitment_tree/commitment_tree.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/commitment_tree/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/commitment_tree/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/crh/bowe_hopwood_pedersen.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/crh/bowe_hopwood_pedersen_compressed.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/crh/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/crh/pedersen.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/crh/pedersen_compressed.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/crh/pedersen_parameters.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/crh/sha256.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/crh/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/encoding/elligator2.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/encoding/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/encoding/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/encryption/group.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/encryption/group_parameters.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/encryption/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/encryption/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/fft/domain.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/fft/evaluations.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/fft/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/fft/multicore.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/fft/polynomial/dense.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/fft/polynomial/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/fft/polynomial/sparse.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/fft/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/merkle_tree/merkle_path.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/merkle_tree/merkle_tree.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/merkle_tree/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/merkle_tree/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/msm/fixed_base.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/msm/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/msm/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion algorithms/src/msm/variable_base.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Aleo Systems Inc.
// Copyright (C) 2019-2021 Aleo Systems Inc.
// This file is part of the snarkVM library.

// The snarkVM library is free software: you can redistribute it and/or modify
Expand Down
Loading

0 comments on commit 033c439

Please sign in to comment.