Check for unused deps in CI (#1262)

* Check for unused deps in CI

* Bump slashing protection parking_lot version
This commit is contained in:
Michael Sproul 2020-06-14 10:59:50 +10:00 committed by GitHub
parent d15ec9b544
commit 7818447fd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 18 additions and 79 deletions

View File

@ -121,3 +121,14 @@ jobs:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Run cargo audit to identify known security vulnerabilities reported to the RustSec Advisory Database - name: Run cargo audit to identify known security vulnerabilities reported to the RustSec Advisory Database
run: make audit run: make audit
cargo-udeps:
runs-on: ubuntu-latest
needs: cargo-fmt
steps:
- uses: actions/checkout@v1
- name: Get latest version of nightly Rust
run: rustup update nightly
- name: Install cargo-udeps
run: cargo install cargo-udeps --locked
- name: Run cargo udeps to identify unused crates in the dependency graph
run: make udeps

50
Cargo.lock generated
View File

@ -24,10 +24,8 @@ dependencies = [
"slog", "slog",
"slog-async", "slog-async",
"slog-term", "slog-term",
"tempdir",
"tokio 0.2.21", "tokio 0.2.21",
"types", "types",
"validator_client",
"validator_dir", "validator_dir",
"web3", "web3",
] ]
@ -178,12 +176,6 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "assert_approx_eq"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c07dab4369547dbe5114677b33fbbf724971019f3818172d59a97a61c774ffd"
[[package]] [[package]]
name = "assert_matches" name = "assert_matches"
version = "1.3.0" version = "1.3.0"
@ -327,7 +319,6 @@ dependencies = [
"client", "client",
"ctrlc", "ctrlc",
"dirs", "dirs",
"env_logger",
"environment", "environment",
"eth2-libp2p", "eth2-libp2p",
"eth2_config", "eth2_config",
@ -350,16 +341,6 @@ dependencies = [
"version", "version",
] ]
[[package]]
name = "bincode"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf"
dependencies = [
"byteorder",
"serde",
]
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "0.9.1" version = "0.9.1"
@ -451,7 +432,6 @@ dependencies = [
"arbitrary", "arbitrary",
"eth2_hashing", "eth2_hashing",
"eth2_ssz", "eth2_ssz",
"eth2_ssz_types",
"hex 0.4.2", "hex 0.4.2",
"milagro_bls", "milagro_bls",
"rand 0.7.3", "rand 0.7.3",
@ -997,17 +977,6 @@ dependencies = [
"types", "types",
] ]
[[package]]
name = "derivative"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "derive_arbitrary" name = "derive_arbitrary"
version = "0.4.4" version = "0.4.4"
@ -1137,7 +1106,6 @@ dependencies = [
"tree_hash", "tree_hash",
"tree_hash_derive", "tree_hash_derive",
"types", "types",
"walkdir",
] ]
[[package]] [[package]]
@ -1191,10 +1159,7 @@ dependencies = [
name = "environment" name = "environment"
version = "0.1.2" version = "0.1.2"
dependencies = [ dependencies = [
"beacon_node",
"clap",
"ctrlc", "ctrlc",
"env_logger",
"eth2_config", "eth2_config",
"eth2_testnet_config", "eth2_testnet_config",
"exit-future", "exit-future",
@ -1396,7 +1361,6 @@ dependencies = [
"serde", "serde",
"serde_derive", "serde_derive",
"serde_hex", "serde_hex",
"serde_yaml",
"tree_hash", "tree_hash",
"tree_hash_derive", "tree_hash_derive",
"typenum", "typenum",
@ -2274,7 +2238,6 @@ dependencies = [
"deposit_contract", "deposit_contract",
"dirs", "dirs",
"environment", "environment",
"eth1_test_rig",
"eth2-libp2p", "eth2-libp2p",
"eth2_keystore", "eth2_keystore",
"eth2_ssz", "eth2_ssz",
@ -2983,7 +2946,6 @@ dependencies = [
name = "network" name = "network"
version = "0.1.2" version = "0.1.2"
dependencies = [ dependencies = [
"assert_approx_eq",
"beacon_chain", "beacon_chain",
"environment", "environment",
"error-chain", "error-chain",
@ -3507,7 +3469,6 @@ version = "0.2.0"
dependencies = [ dependencies = [
"eth2_ssz", "eth2_ssz",
"eth2_ssz_derive", "eth2_ssz_derive",
"itertools 0.9.0",
"parking_lot 0.10.2", "parking_lot 0.10.2",
"serde", "serde",
"serde_derive", "serde_derive",
@ -4578,7 +4539,6 @@ name = "state_processing"
version = "0.2.0" version = "0.2.0"
dependencies = [ dependencies = [
"arbitrary", "arbitrary",
"beacon_chain",
"bls", "bls",
"criterion", "criterion",
"env_logger", "env_logger",
@ -4596,7 +4556,6 @@ dependencies = [
"serde", "serde",
"serde_derive", "serde_derive",
"serde_yaml", "serde_yaml",
"store",
"tree_hash", "tree_hash",
"tree_hash_derive", "tree_hash_derive",
"types", "types",
@ -4684,7 +4643,6 @@ dependencies = [
"serde", "serde",
"serde_derive", "serde_derive",
"slog", "slog",
"sloggers",
"state_processing", "state_processing",
"tempfile", "tempfile",
"tree_hash", "tree_hash",
@ -4734,8 +4692,6 @@ dependencies = [
"criterion", "criterion",
"eth2_hashing", "eth2_hashing",
"ethereum-types", "ethereum-types",
"hex 0.4.2",
"yaml-rust",
] ]
[[package]] [[package]]
@ -5389,9 +5345,7 @@ dependencies = [
"compare_fields", "compare_fields",
"compare_fields_derive", "compare_fields_derive",
"criterion", "criterion",
"derivative",
"dirs", "dirs",
"env_logger",
"eth2_hashing", "eth2_hashing",
"eth2_interop_keypairs", "eth2_interop_keypairs",
"eth2_ssz", "eth2_ssz",
@ -5559,14 +5513,12 @@ dependencies = [
name = "validator_client" name = "validator_client"
version = "0.1.2" version = "0.1.2"
dependencies = [ dependencies = [
"bincode",
"bls", "bls",
"clap", "clap",
"clap_utils", "clap_utils",
"deposit_contract", "deposit_contract",
"dirs", "dirs",
"environment", "environment",
"error-chain",
"eth2_config", "eth2_config",
"eth2_interop_keypairs", "eth2_interop_keypairs",
"eth2_ssz", "eth2_ssz",
@ -5593,7 +5545,6 @@ dependencies = [
"tree_hash", "tree_hash",
"types", "types",
"validator_dir", "validator_dir",
"web3",
] ]
[[package]] [[package]]
@ -5603,7 +5554,6 @@ dependencies = [
"bls", "bls",
"deposit_contract", "deposit_contract",
"eth2_keystore", "eth2_keystore",
"eth2_wallet",
"hex 0.4.2", "hex 0.4.2",
"rand 0.7.3", "rand 0.7.3",
"rayon", "rayon",

View File

@ -72,6 +72,10 @@ audit:
cargo install --force cargo-audit cargo install --force cargo-audit
cargo audit cargo audit
# Runs `cargo udeps` to check for unused dependencies
udeps:
cargo +nightly udeps --tests --all-targets --release
# Performs a `cargo` clean and cleans the `ef_tests` directory. # Performs a `cargo` clean and cleans the `ef_tests` directory.
clean: clean:
cargo clean cargo clean

View File

@ -4,9 +4,6 @@ version = "0.0.1"
authors = ["Paul Hauner <paul@paulhauner.com>", "Luke Anderson <luke@sigmaprime.io>"] authors = ["Paul Hauner <paul@paulhauner.com>", "Luke Anderson <luke@sigmaprime.io>"]
edition = "2018" edition = "2018"
[dev-dependencies]
tempdir = "0.3.7"
[dependencies] [dependencies]
bls = { path = "../crypto/bls" } bls = { path = "../crypto/bls" }
clap = "2.33.0" clap = "2.33.0"
@ -21,7 +18,6 @@ libc = "0.2.65"
eth2_ssz = "0.1.2" eth2_ssz = "0.1.2"
eth2_ssz_derive = "0.1.0" eth2_ssz_derive = "0.1.0"
hex = "0.4.2" hex = "0.4.2"
validator_client = { path = "../validator_client" }
rayon = "1.3.0" rayon = "1.3.0"
eth2_testnet_config = { path = "../common/eth2_testnet_config" } eth2_testnet_config = { path = "../common/eth2_testnet_config" }
web3 = "0.11.0" web3 = "0.11.0"

View File

@ -29,7 +29,6 @@ slog-async = "2.5.0"
ctrlc = { version = "3.1.4", features = ["termination"] } ctrlc = { version = "3.1.4", features = ["termination"] }
tokio = { version = "0.2.21", features = ["time"] } tokio = { version = "0.2.21", features = ["time"] }
exit-future = "0.2.0" exit-future = "0.2.0"
env_logger = "0.7.1"
dirs = "2.0.2" dirs = "2.0.2"
logging = { path = "../common/logging" } logging = { path = "../common/logging" }
futures = "0.3.5" futures = "0.3.5"

View File

@ -11,7 +11,6 @@ lazy_static = "1.4.0"
matches = "0.1.8" matches = "0.1.8"
tempfile = "3.1.0" tempfile = "3.1.0"
exit-future = "0.2.0" exit-future = "0.2.0"
assert_approx_eq = "1.1.0"
[dependencies] [dependencies]
beacon_chain = { path = "../beacon_chain" } beacon_chain = { path = "../beacon_chain" }

View File

@ -10,7 +10,6 @@ harness = false
[dev-dependencies] [dev-dependencies]
tempfile = "3.1.0" tempfile = "3.1.0"
sloggers = "1.0.0"
criterion = "0.3.2" criterion = "0.3.2"
rayon = "1.3.0" rayon = "1.3.0"

View File

@ -7,4 +7,5 @@ edition = "2018"
[dev-dependencies] [dev-dependencies]
compare_fields_derive = { path = "../compare_fields_derive" } compare_fields_derive = { path = "../compare_fields_derive" }
[dependencies] [package.metadata.cargo-udeps.ignore]
development = ["compare_fields_derive"] # used in doc-tests

View File

@ -11,7 +11,6 @@ insecure_keys = []
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
eth2_wallet = { path = "../../crypto/eth2_wallet" }
bls = { path = "../../crypto/bls" } bls = { path = "../../crypto/bls" }
eth2_keystore = { path = "../../crypto/eth2_keystore" } eth2_keystore = { path = "../../crypto/eth2_keystore" }
types = { path = "../../consensus/types" } types = { path = "../../consensus/types" }

View File

@ -11,7 +11,6 @@ path = "src/bin.rs"
[dependencies] [dependencies]
parking_lot = "0.10.2" parking_lot = "0.10.2"
types = { path = "../types" } types = { path = "../types" }
itertools = "0.9.0"
eth2_ssz = "0.1.2" eth2_ssz = "0.1.2"
eth2_ssz_derive = "0.1.0" eth2_ssz_derive = "0.1.0"
serde = "1.0.110" serde = "1.0.110"

View File

@ -17,5 +17,4 @@ typenum = "1.12.0"
arbitrary = { version = "0.4.4", features = ["derive"], optional = true } arbitrary = { version = "0.4.4", features = ["derive"], optional = true }
[dev-dependencies] [dev-dependencies]
serde_yaml = "0.8.11"
tree_hash_derive = "0.2.0" tree_hash_derive = "0.2.0"

View File

@ -15,8 +15,6 @@ serde = "1.0.110"
serde_derive = "1.0.110" serde_derive = "1.0.110"
lazy_static = "1.4.0" lazy_static = "1.4.0"
serde_yaml = "0.8.11" serde_yaml = "0.8.11"
beacon_chain = { path = "../../beacon_node/beacon_chain" }
store = { path = "../../beacon_node/store" }
[dependencies] [dependencies]
bls = { path = "../../crypto/bls" } bls = { path = "../../crypto/bls" }

View File

@ -10,8 +10,6 @@ harness = false
[dev-dependencies] [dev-dependencies]
criterion = "0.3.2" criterion = "0.3.2"
yaml-rust = "0.4.3"
hex = "0.4.2"
[dependencies] [dependencies]
eth2_hashing = "0.1.0" eth2_hashing = "0.1.0"

View File

@ -13,7 +13,6 @@ bls = { path = "../../crypto/bls" }
compare_fields = { path = "../../common/compare_fields" } compare_fields = { path = "../../common/compare_fields" }
compare_fields_derive = { path = "../../common/compare_fields_derive" } compare_fields_derive = { path = "../../common/compare_fields_derive" }
dirs = "2.0.2" dirs = "2.0.2"
derivative = "2.1.1"
eth2_interop_keypairs = { path = "../../common/eth2_interop_keypairs" } eth2_interop_keypairs = { path = "../../common/eth2_interop_keypairs" }
ethereum-types = "0.9.1" ethereum-types = "0.9.1"
eth2_hashing = "0.1.0" eth2_hashing = "0.1.0"
@ -42,7 +41,6 @@ rusqlite = { version = "0.23.1", features = ["bundled"], optional = true }
arbitrary = { version = "0.4.4", features = ["derive"], optional = true } arbitrary = { version = "0.4.4", features = ["derive"], optional = true }
[dev-dependencies] [dev-dependencies]
env_logger = "0.7.1"
serde_json = "1.0.52" serde_json = "1.0.52"
criterion = "0.3.2" criterion = "0.3.2"

View File

@ -13,7 +13,6 @@ serde = "1.0.110"
serde_derive = "1.0.110" serde_derive = "1.0.110"
serde_hex = { path = "../../consensus/serde_hex" } serde_hex = { path = "../../consensus/serde_hex" }
eth2_ssz = "0.1.2" eth2_ssz = "0.1.2"
eth2_ssz_types = { path = "../../consensus/ssz_types" }
tree_hash = "0.1.0" tree_hash = "0.1.0"
arbitrary = { version = "0.4.4", features = ["derive"], optional = true } arbitrary = { version = "0.4.4", features = ["derive"], optional = true }
zeroize = { version = "1.0.0", features = ["zeroize_derive"] } zeroize = { version = "1.0.0", features = ["zeroize_derive"] }

View File

@ -18,7 +18,6 @@ types = { path = "../consensus/types" }
state_processing = { path = "../consensus/state_processing" } state_processing = { path = "../consensus/state_processing" }
eth2_ssz = "0.1.2" eth2_ssz = "0.1.2"
regex = "1.3.7" regex = "1.3.7"
eth1_test_rig = { path = "../testing/eth1_test_rig" }
futures = { version = "0.3.5", features = ["compat"] } futures = { version = "0.3.5", features = ["compat"] }
environment = { path = "../lighthouse/environment" } environment = { path = "../lighthouse/environment" }
web3 = "0.11.0" web3 = "0.11.0"

View File

@ -5,14 +5,12 @@ authors = ["Paul Hauner <paul@paulhauner.com>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
clap = "2.33.0"
tokio = "0.2.21" tokio = "0.2.21"
slog = { version = "2.5.2", features = ["max_level_trace"] } slog = { version = "2.5.2", features = ["max_level_trace"] }
sloggers = "1.0.0" sloggers = "1.0.0"
types = { "path" = "../../consensus/types" } types = { "path" = "../../consensus/types" }
eth2_config = { "path" = "../../common/eth2_config" } eth2_config = { "path" = "../../common/eth2_config" }
eth2_testnet_config = { path = "../../common/eth2_testnet_config" } eth2_testnet_config = { path = "../../common/eth2_testnet_config" }
env_logger = "0.7.1"
logging = { path = "../../common/logging" } logging = { path = "../../common/logging" }
slog-term = "2.5.0" slog-term = "2.5.0"
slog-async = "2.5.0" slog-async = "2.5.0"
@ -23,6 +21,3 @@ slog-json = "2.3.0"
exit-future = "0.2.0" exit-future = "0.2.0"
lazy_static = "1.4.0" lazy_static = "1.4.0"
lighthouse_metrics = { path = "../../common/lighthouse_metrics" } lighthouse_metrics = { path = "../../common/lighthouse_metrics" }
[dev-dependencies]
beacon_node = { path = "../../beacon_node" }

View File

@ -27,4 +27,3 @@ cached_tree_hash = { path = "../../consensus/cached_tree_hash" }
state_processing = { path = "../../consensus/state_processing" } state_processing = { path = "../../consensus/state_processing" }
swap_or_not_shuffle = { path = "../../consensus/swap_or_not_shuffle" } swap_or_not_shuffle = { path = "../../consensus/swap_or_not_shuffle" }
types = { path = "../../consensus/types" } types = { path = "../../consensus/types" }
walkdir = "2.3.1"

View File

@ -28,8 +28,6 @@ slog = { version = "2.5.2", features = ["max_level_trace", "release_max_level_tr
slog-async = "2.5.0" slog-async = "2.5.0"
slog-term = "2.5.0" slog-term = "2.5.0"
tokio = { version = "0.2.21", features = ["time"] } tokio = { version = "0.2.21", features = ["time"] }
error-chain = "0.12.2"
bincode = "1.2.1"
futures = { version = "0.3.5", features = ["compat"] } futures = { version = "0.3.5", features = ["compat"] }
dirs = "2.0.2" dirs = "2.0.2"
logging = { path = "../common/logging" } logging = { path = "../common/logging" }
@ -44,6 +42,5 @@ bls = { path = "../crypto/bls" }
remote_beacon_node = { path = "../common/remote_beacon_node" } remote_beacon_node = { path = "../common/remote_beacon_node" }
tempdir = "0.3.7" tempdir = "0.3.7"
rayon = "1.3.0" rayon = "1.3.0"
web3 = "0.11.0"
validator_dir = { path = "../common/validator_dir" } validator_dir = { path = "../common/validator_dir" }
clap_utils = { path = "../common/clap_utils" } clap_utils = { path = "../common/clap_utils" }

View File

@ -11,7 +11,7 @@ tree_hash = { path = "../../consensus/tree_hash" }
rusqlite = { version = "0.23.1", features = ["bundled"] } rusqlite = { version = "0.23.1", features = ["bundled"] }
r2d2 = "0.8.8" r2d2 = "0.8.8"
r2d2_sqlite = "0.16.0" r2d2_sqlite = "0.16.0"
parking_lot = "0.9.0" parking_lot = "0.10.2"
[dev-dependencies] [dev-dependencies]
rayon = "1.3.0" rayon = "1.3.0"