diff --git a/.travis.yml b/.travis.yml index d0b2ee0e4..3662e17cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,6 @@ language: rust cache: directories: - /home/travis/.cargo -# Going to try caching the registry -#before_cache: -# - rm -rf /home/travis/.cargo/registry before_install: - curl -OL https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip - unzip protoc-3.4.0-linux-x86_64.zip -d protoc3 @@ -12,37 +9,14 @@ before_install: - sudo mv protoc3/include/* /usr/local/include/ - sudo chown $USER /usr/local/bin/protoc - sudo chown -R $USER /usr/local/include/google -env: - - BUILD=--all -# Not building --release on travis any more, only GitLab -# - BUILD=--release --all - - BUILD= --manifest-path eth2/state_processing/Cargo.toml --release --features fake_crypto script: - - cargo build --verbose $BUILD - - cargo test --verbose $BUILD - - cargo fmt --all -- --check - # No clippy until later... - #- cargo clippy + - cargo build --verbose --all --release rust: - - stable - beta - nightly matrix: allow_failures: - rust: nightly fast_finish: true - exclude: -# Not building --release on travis any more, only GitLab -# - rust: beta -# env: BUILD=--release --all - - rust: beta - env: BUILD= --manifest-path eth2/state_processing/Cargo.toml --release --features fake_crypto -# Not building --release on travis any more, only GitLab -# - rust: nightly -# env: BUILD=--release --all - - rust: nightly - env: BUILD= --manifest-path eth2/state_processing/Cargo.toml --release --features fake_crypto install: - rustup component add rustfmt -# No clippy for now -# - rustup component add clippy diff --git a/Cargo.toml b/Cargo.toml index eb472c346..893189941 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,6 @@ members = [ "eth2/fork_choice", "eth2/operation_pool", "eth2/state_processing", - "eth2/state_processing/yaml_utils", "eth2/types", "eth2/utils/bls", "eth2/utils/boolean-bitfield", diff --git a/eth2/state_processing/Cargo.toml b/eth2/state_processing/Cargo.toml index a2ae11aa8..4b031022a 100644 --- a/eth2/state_processing/Cargo.toml +++ b/eth2/state_processing/Cargo.toml @@ -14,7 +14,6 @@ env_logger = "0.6.0" serde = "1.0" serde_derive = "1.0" serde_yaml = "0.8" -yaml-utils = { path = "yaml_utils" } [dependencies] bls = { path = "../utils/bls" } @@ -30,6 +29,3 @@ tree_hash = { path = "../utils/tree_hash" } tree_hash_derive = { path = "../utils/tree_hash_derive" } types = { path = "../types" } rayon = "1.0" - -[features] -fake_crypto = ["bls/fake_crypto"] diff --git a/eth2/state_processing/build.rs b/eth2/state_processing/build.rs deleted file mode 120000 index 70d6c75b9..000000000 --- a/eth2/state_processing/build.rs +++ /dev/null @@ -1 +0,0 @@ -../utils/bls/build.rs \ No newline at end of file diff --git a/eth2/state_processing/yaml_utils/Cargo.toml b/eth2/state_processing/yaml_utils/Cargo.toml deleted file mode 100644 index 5f216fe1a..000000000 --- a/eth2/state_processing/yaml_utils/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "yaml-utils" -version = "0.1.0" -authors = ["Kirk Baird "] -edition = "2018" - -[build-dependencies] -reqwest = "0.9" - -[dependencies] - -[lib] -name = "yaml_utils" -path = "src/lib.rs" diff --git a/eth2/state_processing/yaml_utils/build.rs b/eth2/state_processing/yaml_utils/build.rs deleted file mode 100644 index 7fb652cc1..000000000 --- a/eth2/state_processing/yaml_utils/build.rs +++ /dev/null @@ -1,27 +0,0 @@ -extern crate reqwest; - -use std::fs::File; -use std::io::copy; - -fn main() { - // These test files are not to be stored in the lighthouse repo as they are quite large (32MB). - // They will be downloaded at build time by yaml-utils crate (in build.rs) - let git_path = "https://raw.githubusercontent.com/ethereum/eth2.0-tests/master/state/"; - let test_names = vec![ - "sanity-check_default-config_100-vals.yaml", - "sanity-check_small-config_32-vals.yaml", - ]; - - for test in test_names { - let mut target = String::from(git_path); - target.push_str(test); - let mut response = reqwest::get(target.as_str()).unwrap(); - - let mut dest = { - let mut file_name = String::from("specs/"); - file_name.push_str(test); - File::create(file_name).unwrap() - }; - copy(&mut response, &mut dest).unwrap(); - } -} diff --git a/eth2/state_processing/yaml_utils/expected_state_fields.py b/eth2/state_processing/yaml_utils/expected_state_fields.py deleted file mode 100755 index df4cb83f7..000000000 --- a/eth2/state_processing/yaml_utils/expected_state_fields.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python3 - -# Script to extract all the fields of the state mentioned in `expected_state` fields of tests -# in the `spec` directory. These fields can then be added to the `ExpectedState` struct. -# Might take a while to run. - -import os, yaml - -if __name__ == "__main__": - yaml_files = (filename for filename in os.listdir("specs") if filename.endswith(".yaml")) - parsed_yaml = (yaml.load(open("specs/" + filename, "r")) for filename in yaml_files) - all_fields = set() - for y in parsed_yaml: - all_fields.update(*({key for key in case["expected_state"]} for case in y["test_cases"])) - print(all_fields) diff --git a/eth2/state_processing/yaml_utils/specs/.gitignore b/eth2/state_processing/yaml_utils/specs/.gitignore deleted file mode 100644 index 1e82fc7de..000000000 --- a/eth2/state_processing/yaml_utils/specs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.yaml diff --git a/eth2/state_processing/yaml_utils/src/lib.rs b/eth2/state_processing/yaml_utils/src/lib.rs deleted file mode 100644 index 644ea434b..000000000 --- a/eth2/state_processing/yaml_utils/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -// This is a place holder such that yaml-utils is now a crate hence build.rs will be run when 'cargo test' is called