diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 1ead355b73..0000000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,3 +0,0 @@ -[target.'cfg(all(not(target_arch = "wasm32"), not(feature = "noconfig")))'] -rustflags = ["-C", "target-cpu=native"] - diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 473805ea3f..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,217 +0,0 @@ -version: 2.1 -commands: - setup_environment: - description: "Setup testing environment" - parameters: - cache_key: - type: string - default: snarkos-stable-cache - steps: - - run: set -e - - setup_remote_docker - - run: - name: Prepare environment and install dependencies - command: | - export SCCACHE_CACHE_SIZE=200M - export WORK_DIR="$CIRCLE_WORKING_DIRECTORY/.cache/sccache" - export SCCACHE_DIR="$CIRCLE_WORKING_DIRECTORY/.cache/sccache" - mkdir -p "$CIRCLE_WORKING_DIRECTORY/.bin" - wget https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz - tar -C "$CIRCLE_WORKING_DIRECTORY/.bin" -xvf sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz - mv $CIRCLE_WORKING_DIRECTORY/.bin/sccache-0.2.13-x86_64-unknown-linux-musl/sccache $CIRCLE_WORKING_DIRECTORY/.bin/sccache - export PATH="$PATH:$CIRCLE_WORKING_DIRECTORY/.bin" - export RUSTC_WRAPPER="sccache" - rm -rf "$CIRCLE_WORKING_DIRECTORY/.cargo/registry" - sudo apt-get update && sudo apt-get install -y clang llvm-dev llvm pkg-config xz-utils make libssl-dev libssl-dev - - restore_cache: - keys: - - << parameters.cache_key >> - clear_environment: - description: "Clear environment" - parameters: - cache_key: - type: string - default: snarkos-stable-cache - steps: - - run: (sccache -s||true) - - run: set +e - - save_cache: - key: << parameters.cache_key >> - paths: - - .cache/sccache - - .cargo -jobs: - rust-stable: - docker: - - image: cimg/rust:1.54.0 - resource_class: 2xlarge - steps: - - checkout - - setup_environment: - cache_key: snarkos-stable-cache - - run: - name: Build and run tests - no_output_timeout: 60m - command: > - RUST_MIN_STACK=8388608 cargo test --workspace --no-run - - persist_to_workspace: - root: ~/ - paths: project/ - - clear_environment: - cache_key: snarkos-stable-cache - - # codecov: - # machine: - # image: ubuntu-1604:202004-01 - # docker_layer_caching: true - # resource_class: 2xlarge - # steps: - # - attach_workspace: - # at: /home/circleci/project/ - # - run: - # name: Run kcov - # command: > - # cd ~/project/project/ && - # docker run --security-opt seccomp=unconfined -v ~/project/project/:/home/circleci/project/ - # howardwu/snarkos-codecov:2021-03-25 bash /home/circleci/project/ci/kcov.sh - # - run: cd ./project/ && bash <(curl -s https://codecov.io/bash) - - snarkos-consensus: - docker: - - image: cimg/rust:1.54.0 - resource_class: xlarge - steps: - - checkout - - setup_environment: - cache_key: snarkos-consensus-cache - - run: - name: Build and run tests - no_output_timeout: 35m - command: cd consensus && RUST_MIN_STACK=8388608 cargo test --release - - clear_environment: - cache_key: snarkos-consensus-cache - - snarkos-metrics: - docker: - - image: cimg/rust:1.54.0 - resource_class: xlarge - steps: - - checkout - - setup_environment: - cache_key: snarkos-metrics-cache - - run: - name: Build and run tests - no_output_timeout: 35m - command: cd metrics && RUST_MIN_STACK=8388608 cargo test - - clear_environment: - cache_key: snarkos-metrics-cache - - snarkos-network: - docker: - - image: cimg/rust:1.54.0 - resource_class: xlarge - steps: - - checkout - - setup_environment: - cache_key: snarkos-network-cache - - run: - name: Build and run tests - no_output_timeout: 35m - command: cd network && RUST_MIN_STACK=16777216 cargo test --release - - clear_environment: - cache_key: snarkos-network-cache - - snarkos-profiler: - docker: - - image: cimg/rust:1.54.0 - resource_class: xlarge - steps: - - checkout - - setup_environment: - cache_key: snarkos-profiler-cache - - run: - name: Build and run tests - no_output_timeout: 35m - command: cd profiler && RUST_MIN_STACK=8388608 cargo test - - clear_environment: - cache_key: snarkos-profiler-cache - - snarkos-rpc: - docker: - - image: cimg/rust:1.54.0 - resource_class: xlarge - steps: - - checkout - - setup_environment: - cache_key: snarkos-rpc-cache - - run: - name: Build and run tests - no_output_timeout: 35m - command: cd rpc && RUST_MIN_STACK=8388608 cargo test --release - - clear_environment: - cache_key: snarkos-rpc-cache - - snarkos-storage: - docker: - - image: cimg/rust:1.54.0 - resource_class: xlarge - steps: - - checkout - - setup_environment: - cache_key: snarkos-storage-cache - - run: - name: Build and run tests - no_output_timeout: 35m - command: cd storage && RUST_MIN_STACK=8388608 cargo test - - clear_environment: - cache_key: snarkos-storage-cache - - snarkos-testing: - docker: - - image: cimg/rust:1.54.0 - resource_class: xlarge - steps: - - checkout - - setup_environment: - cache_key: snarkos-testing-cache - - run: - name: Build and run tests - no_output_timeout: 35m - command: | - cd testing - RUST_MIN_STACK=8388608 cargo test --release -- --nocapture --skip metrics - cargo test --release metrics -- --test-threads 1 - - clear_environment: - cache_key: snarkos-testing-cache - - fmt: - docker: - - image: howardwu/snarkos-ci:2021-03-25 - resource_class: xlarge - steps: - - checkout - - setup_environment: - cache_key: snarkos-fmt-cache - - run: - name: Check style - no_output_timeout: 35m - command: cargo fmt --all -- --check - - clear_environment: - cache_key: snarkos-fmt-cache - -workflows: - version: 2 - main-workflow: - jobs: - - rust-stable - # - codecov: - # requires: - # - rust-stable - - snarkos-consensus - - snarkos-metrics - - snarkos-network - - snarkos-profiler - - snarkos-rpc - - snarkos-storage - - snarkos-testing - - fmt diff --git a/.dockerignore b/.dockerignore index 9ce6ef8e70..966653d68a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,9 @@ -.idea/ -**.DS_Store -**storage_db -**inner_snark_pk.params -**outer_snark_pk.params +.vscode +**/*.idea/ +**/target +**/.DS_Store +**/.ledger* +**inner.proving* +**outer.proving* +**posw.proving* +**universal.srs* diff --git a/.gitignore b/.gitignore index ec389ea6d2..966653d68a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ +.vscode **/*.idea/ **/target -**.DS_Store -**storage_db -**inner_snark_pk*.params -**outer_snark_pk*.params -**posw_snark_pk*.params +**/.DS_Store +**/.ledger* +**inner.proving* +**outer.proving* +**posw.proving* +**universal.srs* diff --git a/.licenserc.json b/.licenserc.json deleted file mode 100644 index 4f373ee22b..0000000000 --- a/.licenserc.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "**/*.rs": [ - "// Copyright (C) 2019-2021 Aleo Systems Inc.", - "// This file is part of the snarkOS library.", - "", - "// The snarkOS 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 snarkOS 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 snarkOS library. If not, see .", - "" - ], - "ignore": [ - ".cargo", - ".circleci", - ".github", - "target/" - ] -} - diff --git a/.rustfmt.toml b/.rustfmt.toml index 39028b1340..f540481e7f 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -2,7 +2,7 @@ # Stable configurations edition = "2018" -max_width = 120 +max_width = 140 merge_derives = true use_field_init_shorthand = true use_try_shorthand = true