Skip to content

Commit 4d01224

Browse files
committedApr 4, 2022
Update and consolidate dependencies (sigp#3136)
## Proposed Changes I did some gardening 🌳 in our dependency tree: - Remove duplicate versions of `warp` (git vs patch) - Remove duplicate versions of lots of small deps: `cpufeatures`, `ethabi`, `ethereum-types`, `bitvec`, `nix`, `libsecp256k1`. - Update MDBX (should resolve sigp#3028). I tested and Lighthouse compiles on Windows 11 now. - Restore `psutil` back to upstream - Make some progress updating everything to rand 0.8. There are a few crates stuck on 0.7. Hopefully this puts us on a better footing for future `cargo audit` issues, and improves compile times slightly. ## Additional Info Some crates are held back by issues with `zeroize`. libp2p-noise depends on [`chacha20poly1305`](https://crates.io/crates/chacha20poly1305) which depends on zeroize < v1.5, and we can only have one version of zeroize because it's post 1.0 (see rust-lang/cargo#6584). The latest version of `zeroize` is v1.5.4, which is used by the new versions of many other crates (e.g. `num-bigint-dig`). Once a new version of chacha20poly1305 is released we can update libp2p-noise and upgrade everything to the latest `zeroize` version. I've also opened a PR to `blst` related to zeroize: supranational/blst#111
1 parent ab434bc commit 4d01224

File tree

38 files changed

+283
-686
lines changed

38 files changed

+283
-686
lines changed
 

‎Cargo.lock

+211-614
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@ members = [
9191
[patch]
9292
[patch.crates-io]
9393
fixed-hash = { git = "https://github.com/paritytech/parity-common", rev="df638ab0885293d21d656dc300d39236b69ce57d" }
94-
warp = { git = "https://github.com/macladson/warp", rev ="7e75acc" }
94+
warp = { git = "https://github.com/macladson/warp", rev="7e75acc368229a46a236a8c991bf251fe7fe50ef" }
9595
eth2_ssz = { path = "consensus/ssz" }
9696
eth2_ssz_derive = { path = "consensus/ssz_derive" }
9797
eth2_ssz_types = { path = "consensus/ssz_types" }
98+
eth2_hashing = { path = "crypto/eth2_hashing" }
9899
tree_hash = { path = "consensus/tree_hash" }
99100
tree_hash_derive = { path = "consensus/tree_hash_derive" }
100101
eth2_serde_utils = { path = "consensus/serde_utils" }

‎beacon_node/beacon_chain/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ serde_json = "1.0.58"
1919
[dependencies]
2020
merkle_proof = { path = "../../consensus/merkle_proof" }
2121
store = { path = "../store" }
22-
parking_lot = "0.11.0"
22+
parking_lot = "0.12.0"
2323
lazy_static = "1.4.0"
2424
smallvec = "1.6.1"
2525
lighthouse_metrics = { path = "../../common/lighthouse_metrics" }
@@ -30,7 +30,7 @@ serde_derive = "1.0.116"
3030
slog = { version = "2.5.2", features = ["max_level_trace"] }
3131
sloggers = { version = "2.1.1", features = ["json"] }
3232
slot_clock = { path = "../../common/slot_clock" }
33-
eth2_hashing = "0.2.0"
33+
eth2_hashing = "0.3.0"
3434
eth2_ssz = "0.4.1"
3535
eth2_ssz_types = "0.2.2"
3636
eth2_ssz_derive = "0.3.0"
@@ -42,11 +42,11 @@ eth1 = { path = "../eth1" }
4242
futures = "0.3.7"
4343
genesis = { path = "../genesis" }
4444
int_to_bytes = { path = "../../consensus/int_to_bytes" }
45-
rand = "0.7.3"
45+
rand = "0.8.5"
4646
proto_array = { path = "../../consensus/proto_array" }
4747
lru = "0.7.1"
4848
tempfile = "3.1.0"
49-
bitvec = "0.19.3"
49+
bitvec = "0.20.4"
5050
bls = { path = "../../crypto/bls" }
5151
safe_arith = { path = "../../consensus/safe_arith" }
5252
fork_choice = { path = "../../consensus/fork_choice" }

‎beacon_node/client/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ store = { path = "../store" }
1313
network = { path = "../network" }
1414
timer = { path = "../timer" }
1515
lighthouse_network = { path = "../lighthouse_network" }
16-
parking_lot = "0.11.0"
16+
parking_lot = "0.12.0"
1717
types = { path = "../../consensus/types" }
1818
eth2_config = { path = "../../common/eth2_config" }
1919
slot_clock = { path = "../../common/slot_clock" }

‎beacon_node/eth1/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77
[dev-dependencies]
88
eth1_test_rig = { path = "../../testing/eth1_test_rig" }
99
toml = "0.5.6"
10-
web3 = { version = "0.17.0", default-features = false, features = ["http-tls", "signing", "ws-tls-tokio"] }
10+
web3 = { version = "0.18.0", default-features = false, features = ["http-tls", "signing", "ws-tls-tokio"] }
1111
sloggers = { version = "2.1.1", features = ["json"] }
1212
environment = { path = "../../lighthouse/environment" }
1313

@@ -22,7 +22,7 @@ merkle_proof = { path = "../../consensus/merkle_proof"}
2222
eth2_ssz = "0.4.1"
2323
eth2_ssz_derive = "0.3.0"
2424
tree_hash = "0.4.1"
25-
parking_lot = "0.11.0"
25+
parking_lot = "0.12.0"
2626
slog = "2.5.2"
2727
tokio = { version = "1.14.0", features = ["full"] }
2828
state_processing = { path = "../../consensus/state_processing" }

‎beacon_node/execution_layer/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ eth2_serde_utils = "0.1.1"
1717
serde_json = "1.0.58"
1818
serde = { version = "1.0.116", features = ["derive"] }
1919
eth1 = { path = "../eth1" }
20-
warp = { git = "https://github.com/macladson/warp", rev ="dfa259e", features = ["tls"] }
20+
warp = { version = "0.3.2", features = ["tls"] }
2121
jsonwebtoken = "8"
2222
environment = { path = "../../lighthouse/environment" }
2323
bytes = "1.1.0"
@@ -28,10 +28,10 @@ lru = "0.7.1"
2828
exit-future = "0.2.0"
2929
tree_hash = "0.4.1"
3030
tree_hash_derive = { path = "../../consensus/tree_hash_derive"}
31-
parking_lot = "0.11.0"
31+
parking_lot = "0.12.0"
3232
slot_clock = { path = "../../common/slot_clock" }
3333
tempfile = "3.1.0"
34-
rand = "0.7.3"
34+
rand = "0.8.5"
3535
zeroize = { version = "1.4.2", features = ["zeroize_derive"] }
3636
lighthouse_metrics = { path = "../../common/lighthouse_metrics" }
3737
lazy_static = "1.4.0"

‎beacon_node/genesis/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rayon = "1.4.1"
1717
state_processing = { path = "../../consensus/state_processing" }
1818
merkle_proof = { path = "../../consensus/merkle_proof" }
1919
eth2_ssz = "0.4.1"
20-
eth2_hashing = "0.2.0"
20+
eth2_hashing = "0.3.0"
2121
tree_hash = "0.4.1"
2222
tokio = { version = "1.14.0", features = ["full"] }
2323
slog = "2.5.2"

‎beacon_node/http_api/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ eth2_ssz = "0.4.1"
2828
bs58 = "0.4.0"
2929
futures = "0.3.8"
3030
execution_layer = {path = "../execution_layer"}
31-
parking_lot = "0.11.0"
31+
parking_lot = "0.12.0"
3232
safe_arith = {path = "../../consensus/safe_arith"}
3333

3434

‎beacon_node/lighthouse_network/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ lighthouse_metrics = { path = "../../common/lighthouse_metrics" }
2626
smallvec = "1.6.1"
2727
tokio-io-timeout = "1.1.1"
2828
lru = "0.7.1"
29-
parking_lot = "0.11.0"
29+
parking_lot = "0.12.0"
3030
sha2 = "0.9.1"
3131
snap = "1.0.1"
3232
hex = "0.4.2"
3333
tokio-util = { version = "0.6.2", features = ["codec", "compat", "time"] }
3434
tiny-keccak = "2.0.2"
3535
task_executor = { path = "../../common/task_executor" }
36-
rand = "0.7.3"
36+
rand = "0.8.5"
3737
directory = { path = "../../common/directory" }
3838
regex = "1.5.5"
3939
strum = { version = "0.24.0", features = ["derive"] }

‎beacon_node/network/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ error-chain = "0.12.4"
2929
tokio = { version = "1.14.0", features = ["full"] }
3030
tokio-stream = "0.1.3"
3131
smallvec = "1.6.1"
32-
rand = "0.7.3"
32+
rand = "0.8.5"
3333
fnv = "1.0.7"
3434
rlp = "0.5.0"
3535
lazy_static = "1.4.0"

‎beacon_node/operation_pool/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ derivative = "2.1.1"
99
itertools = "0.10.0"
1010
lazy_static = "1.4.0"
1111
lighthouse_metrics = { path = "../../common/lighthouse_metrics" }
12-
parking_lot = "0.11.0"
12+
parking_lot = "0.12.0"
1313
types = { path = "../../consensus/types" }
1414
state_processing = { path = "../../consensus/state_processing" }
1515
eth2_ssz = "0.4.1"

‎beacon_node/store/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ beacon_chain = {path = "../beacon_chain"}
1111
[dependencies]
1212
db-key = "0.0.5"
1313
leveldb = { version = "0.8.6", default-features = false }
14-
parking_lot = "0.11.0"
14+
parking_lot = "0.12.0"
1515
itertools = "0.10.0"
1616
eth2_ssz = "0.4.1"
1717
eth2_ssz_derive = "0.3.0"

‎common/account_utils/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
rand = "0.7.3"
10+
rand = "0.8.5"
1111
eth2_wallet = { path = "../../crypto/eth2_wallet" }
1212
eth2_keystore = { path = "../../crypto/eth2_keystore" }
1313
filesystem = { path = "../filesystem" }

‎common/deposit_contract/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ hex = "0.4.2"
1616
types = { path = "../../consensus/types"}
1717
eth2_ssz = "0.4.1"
1818
tree_hash = "0.4.1"
19-
ethabi = "12.0.0"
19+
ethabi = "16.0.0"

‎common/deposit_contract/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ pub fn decode_eth1_tx_data(
7070
};
7171
}
7272

73-
let root = decode_token!(Hash256, to_fixed_bytes);
73+
let root = decode_token!(Hash256, into_fixed_bytes);
7474

7575
let deposit_data = DepositData {
7676
amount,
77-
signature: decode_token!(SignatureBytes, to_bytes),
78-
withdrawal_credentials: decode_token!(Hash256, to_bytes),
79-
pubkey: decode_token!(PublicKeyBytes, to_bytes),
77+
signature: decode_token!(SignatureBytes, into_bytes),
78+
withdrawal_credentials: decode_token!(Hash256, into_bytes),
79+
pubkey: decode_token!(PublicKeyBytes, into_bytes),
8080
};
8181

8282
Ok((deposit_data, root))

‎common/eth2/Cargo.toml

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ lighthouse_network = { path = "../../beacon_node/lighthouse_network" }
1515
proto_array = { path = "../../consensus/proto_array", optional = true }
1616
eth2_serde_utils = "0.1.1"
1717
eth2_keystore = { path = "../../crypto/eth2_keystore" }
18-
libsecp256k1 = "0.6.0"
18+
libsecp256k1 = "0.7.0"
1919
ring = "0.16.19"
2020
bytes = "1.0.1"
2121
account_utils = { path = "../../common/account_utils" }
@@ -28,10 +28,7 @@ store = { path = "../../beacon_node/store", optional = true }
2828
slashing_protection = { path = "../../validator_client/slashing_protection", optional = true }
2929

3030
[target.'cfg(target_os = "linux")'.dependencies]
31-
# TODO: update psutil once fix is merged: https://github.com/rust-psutil/rust-psutil/pull/93
32-
# TODO: Even once the above PR is corrected, there are sub-dependencies that need to be updated.
33-
# psutil = { version = "3.2.0", optional = true }
34-
psutil = { git = "https://github.com/sigp/rust-psutil", rev = "b3e44bc7ec5d545b8cb8ad4e3dffe074b6e6336b", optional = true }
31+
psutil = { version = "3.2.2", optional = true }
3532
procinfo = { version = "0.4.2", optional = true }
3633

3734
[features]

‎common/eth2_interop_keypairs/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ edition = "2021"
99
[dependencies]
1010
lazy_static = "1.4.0"
1111
num-bigint = "0.4.2"
12-
eth2_hashing = "0.2.0"
12+
eth2_hashing = "0.3.0"
1313
hex = "0.4.2"
1414
serde_yaml = "0.8.13"
1515
serde = "1.0.116"

‎common/malloc_utils/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ edition = "2021"
1010
lighthouse_metrics = { path = "../lighthouse_metrics" }
1111
lazy_static = "1.4.0"
1212
libc = "0.2.79"
13-
parking_lot = "0.11.0"
13+
parking_lot = "0.12.0"
1414

1515
[features]
1616
mallinfo2 = []

‎common/slot_clock/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ edition = "2021"
88
types = { path = "../../consensus/types" }
99
lazy_static = "1.4.0"
1010
lighthouse_metrics = { path = "../lighthouse_metrics" }
11-
parking_lot = "0.11.0"
11+
parking_lot = "0.12.0"

‎common/validator_dir/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ bls = { path = "../../crypto/bls" }
1414
eth2_keystore = { path = "../../crypto/eth2_keystore" }
1515
filesystem = { path = "../filesystem" }
1616
types = { path = "../../consensus/types" }
17-
rand = "0.7.3"
17+
rand = "0.8.5"
1818
deposit_contract = { path = "../deposit_contract" }
1919
tree_hash = "0.4.1"
2020
hex = "0.4.2"

‎consensus/cached_tree_hash/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77
[dependencies]
88
ethereum-types = "0.12.1"
99
eth2_ssz_types = "0.2.2"
10-
eth2_hashing = "0.2.0"
10+
eth2_hashing = "0.3.0"
1111
eth2_ssz_derive = "0.3.0"
1212
eth2_ssz = "0.4.1"
1313
tree_hash = "0.4.1"

‎consensus/merkle_proof/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2021"
66

77
[dependencies]
88
ethereum-types = "0.12.1"
9-
eth2_hashing = "0.2.0"
9+
eth2_hashing = "0.3.0"
1010
lazy_static = "1.4.0"
1111
safe_arith = { path = "../safe_arith" }
1212

‎consensus/state_processing/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ safe_arith = { path = "../safe_arith" }
1919
tree_hash = "0.4.1"
2020
types = { path = "../types", default-features = false }
2121
rayon = "1.4.1"
22-
eth2_hashing = "0.2.0"
22+
eth2_hashing = "0.3.0"
2323
int_to_bytes = { path = "../int_to_bytes" }
2424
smallvec = "1.6.1"
2525
arbitrary = { version = "1.0", features = ["derive"], optional = true }

‎consensus/swap_or_not_shuffle/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ harness = false
1212
criterion = "0.3.3"
1313

1414
[dependencies]
15-
eth2_hashing = "0.2.0"
15+
eth2_hashing = "0.3.0"
1616
ethereum-types = "0.12.1"
1717

1818
[features]

‎consensus/tree_hash/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license = "Apache-2.0"
77
description = "Efficient Merkle-hashing as used in Ethereum 2.0"
88

99
[dev-dependencies]
10-
rand = "0.7.3"
10+
rand = "0.8.5"
1111
tree_hash_derive = "0.4.0"
1212
types = { path = "../types" }
1313
beacon_chain = { path = "../../beacon_node/beacon_chain" }
@@ -16,7 +16,7 @@ eth2_ssz_derive = "0.3.0"
1616

1717
[dependencies]
1818
ethereum-types = "0.12.1"
19-
eth2_hashing = "0.2.0"
19+
eth2_hashing = "0.3.0"
2020
smallvec = "1.6.1"
2121

2222
[features]

‎consensus/types/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ compare_fields = { path = "../../common/compare_fields" }
1414
compare_fields_derive = { path = "../../common/compare_fields_derive" }
1515
eth2_interop_keypairs = { path = "../../common/eth2_interop_keypairs" }
1616
ethereum-types = "0.12.1"
17-
eth2_hashing = "0.2.0"
17+
eth2_hashing = "0.3.0"
1818
hex = "0.4.2"
1919
int_to_bytes = { path = "../int_to_bytes" }
2020
log = "0.4.11"
2121
rayon = "1.4.1"
22-
rand = "0.7.3"
22+
rand = "0.8.5"
2323
safe_arith = { path = "../safe_arith" }
2424
serde = {version = "1.0.116" , features = ["rc"] }
2525
serde_derive = "1.0.116"
@@ -31,7 +31,7 @@ swap_or_not_shuffle = { path = "../swap_or_not_shuffle" }
3131
test_random_derive = { path = "../../common/test_random_derive" }
3232
tree_hash = "0.4.1"
3333
tree_hash_derive = "0.4.0"
34-
rand_xorshift = "0.2.0"
34+
rand_xorshift = "0.3.0"
3535
cached_tree_hash = { path = "../cached_tree_hash" }
3636
serde_yaml = "0.8.13"
3737
tempfile = "3.1.0"
@@ -41,7 +41,7 @@ arbitrary = { version = "1.0", features = ["derive"], optional = true }
4141
eth2_serde_utils = "0.1.1"
4242
regex = "1.5.5"
4343
lazy_static = "1.4.0"
44-
parking_lot = "0.11.1"
44+
parking_lot = "0.12.0"
4545
itertools = "0.10.0"
4646
superstruct = "0.4.1"
4747
serde_json = "1.0.74"

‎crypto/bls/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ serde = "1.0.116"
1313
serde_derive = "1.0.116"
1414
eth2_serde_utils = "0.1.1"
1515
hex = "0.4.2"
16-
eth2_hashing = "0.2.0"
16+
eth2_hashing = "0.3.0"
1717
ethereum-types = "0.12.1"
1818
arbitrary = { version = "1.0", features = ["derive"], optional = true }
1919
zeroize = { version = "1.4.2", features = ["zeroize_derive"] }

‎crypto/eth2_hashing/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "eth2_hashing"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
authors = ["Paul Hauner <paul@paulhauner.com>"]
55
edition = "2021"
66
license = "Apache-2.0"
@@ -9,8 +9,8 @@ description = "Hashing primitives used in Ethereum 2.0"
99
[dependencies]
1010
lazy_static = { version = "1.4.0", optional = true }
1111
ring = "0.16.19"
12-
sha2 = "0.9.5"
13-
cpufeatures = "0.1.5"
12+
sha2 = "0.10.2"
13+
cpufeatures = "0.2.2"
1414

1515
[dev-dependencies]
1616
rustc-hex = "2.1.0"

‎crypto/eth2_keystore/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
rand = "0.7.3"
10+
rand = "0.8.5"
1111
hmac = "0.11.0"
1212
pbkdf2 = { version = "0.8.0", default-features = false }
1313
scrypt = { version = "0.7.0", default-features = false }

‎crypto/eth2_wallet/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ serde = "1.0.116"
1111
serde_json = "1.0.58"
1212
serde_repr = "0.1.6"
1313
uuid = { version = "0.8.1", features = ["serde", "v4"] }
14-
rand = "0.7.3"
14+
rand = "0.8.5"
1515
eth2_keystore = { path = "../eth2_keystore" }
1616
eth2_key_derivation = { path = "../eth2_key_derivation" }
1717
tiny-bip39 = "0.8.1"

‎lcli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ lighthouse_version = { path = "../common/lighthouse_version" }
3333
directory = { path = "../common/directory" }
3434
account_utils = { path = "../common/account_utils" }
3535
eth2_wallet = { path = "../crypto/eth2_wallet" }
36-
web3 = { version = "0.17.0", default-features = false, features = ["http-tls", "signing", "ws-tls-tokio"] }
36+
web3 = { version = "0.18.0", default-features = false, features = ["http-tls", "signing", "ws-tls-tokio"] }
3737
eth1_test_rig = { path = "../testing/eth1_test_rig" }
3838
sensitive_url = { path = "../common/sensitive_url" }
3939
eth2 = { path = "../common/eth2" }

‎lighthouse/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ slog = { version = "2.5.2", features = ["max_level_trace"] }
2626
sloggers = { version = "2.1.1", features = ["json"] }
2727
types = { "path" = "../consensus/types" }
2828
bls = { path = "../crypto/bls" }
29-
eth2_hashing = "0.2.0"
29+
eth2_hashing = "0.3.0"
3030
clap = "2.33.3"
3131
env_logger = "0.9.0"
3232
environment = { path = "./environment" }

‎slasher/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ lighthouse_metrics = { path = "../common/lighthouse_metrics" }
1515
filesystem = { path = "../common/filesystem" }
1616
mdbx = { package = "libmdbx", version = "0.1.0" }
1717
lru = "0.7.1"
18-
parking_lot = "0.11.0"
19-
rand = "0.7.3"
18+
parking_lot = "0.12.0"
19+
rand = "0.8.5"
2020
safe_arith = { path = "../consensus/safe_arith" }
2121
serde = "1.0"
2222
serde_derive = "1.0"

‎slasher/tests/random.rs

+14-14
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,23 @@ fn random_test(seed: u64, test_config: TestConfig) {
4242
let tempdir = tempdir().unwrap();
4343

4444
let mut config = Config::new(tempdir.path().into());
45-
config.validator_chunk_size = 1 << rng.gen_range(1, 4);
45+
config.validator_chunk_size = 1 << rng.gen_range(1..4);
4646

47-
let chunk_size_exponent = rng.gen_range(1, 4);
47+
let chunk_size_exponent = rng.gen_range(1..4);
4848
config.chunk_size = 1 << chunk_size_exponent;
49-
config.history_length = 1 << rng.gen_range(chunk_size_exponent, chunk_size_exponent + 3);
49+
config.history_length = 1 << rng.gen_range(chunk_size_exponent..chunk_size_exponent + 3);
5050

5151
let slasher = Slasher::<E>::open(config.clone(), test_logger()).unwrap();
5252

5353
let validators = (0..num_validators as u64).collect::<Vec<u64>>();
5454

55-
let num_attestations = rng.gen_range(2, max_attestations + 1);
55+
let num_attestations = rng.gen_range(2..max_attestations + 1);
5656

5757
let mut current_epoch = Epoch::new(0);
5858
let mut attestations = vec![];
5959

6060
for _ in 0..num_attestations {
61-
let num_attesters = rng.gen_range(1, num_validators);
61+
let num_attesters = rng.gen_range(1..num_validators);
6262
let mut attesting_indices = validators
6363
.choose_multiple(&mut rng, num_attesters)
6464
.copied()
@@ -70,17 +70,17 @@ fn random_test(seed: u64, test_config: TestConfig) {
7070
let source = rng.gen_range(
7171
current_epoch
7272
.as_u64()
73-
.saturating_sub(config.history_length as u64 - 1),
74-
current_epoch.as_u64() + 1,
73+
.saturating_sub(config.history_length as u64 - 1)
74+
..current_epoch.as_u64() + 1,
7575
);
76-
let target = rng.gen_range(source, current_epoch.as_u64() + 1);
76+
let target = rng.gen_range(source..current_epoch.as_u64() + 1);
7777
(source, target)
7878
} else {
79-
let source = rng.gen_range(0, max(3 * current_epoch.as_u64(), 1));
80-
let target = rng.gen_range(source, max(3 * current_epoch.as_u64(), source + 1));
79+
let source = rng.gen_range(0..max(3 * current_epoch.as_u64(), 1));
80+
let target = rng.gen_range(source..max(3 * current_epoch.as_u64(), source + 1));
8181
(source, target)
8282
};
83-
let target_root = rng.gen_range(0, 3);
83+
let target_root = rng.gen_range(0..3);
8484
let attestation = indexed_att(&attesting_indices, source, target, target_root);
8585

8686
if check_slashings {
@@ -92,9 +92,9 @@ fn random_test(seed: u64, test_config: TestConfig) {
9292

9393
// Maybe add a random block too
9494
if test_config.add_blocks && rng.gen_bool(0.1) {
95-
let slot = rng.gen_range(0, 1 + 3 * current_epoch.as_u64() * E::slots_per_epoch() / 2);
96-
let proposer = rng.gen_range(0, num_validators as u64);
97-
let block_root = rng.gen_range(0, 2);
95+
let slot = rng.gen_range(0..1 + 3 * current_epoch.as_u64() * E::slots_per_epoch() / 2);
96+
let proposer = rng.gen_range(0..num_validators as u64);
97+
let block_root = rng.gen_range(0..2);
9898
slasher.accept_block_header(block(slot, proposer, block_root));
9999
}
100100

‎testing/eth1_test_rig/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2021"
66

77
[dependencies]
88
tokio = { version = "1.14.0", features = ["time"] }
9-
web3 = { version = "0.17.0", default-features = false, features = ["http-tls", "signing", "ws-tls-tokio"] }
9+
web3 = { version = "0.18.0", default-features = false, features = ["http-tls", "signing", "ws-tls-tokio"] }
1010
types = { path = "../../consensus/types"}
1111
serde_json = "1.0.58"
1212
deposit_contract = { path = "../../common/deposit_contract"}

‎testing/eth1_test_rig/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ impl DepositContract {
194194
to: Some(self.contract.address()),
195195
gas: Some(U256::from(DEPOSIT_GAS)),
196196
gas_price: None,
197+
max_fee_per_gas: None,
198+
max_priority_fee_per_gas: None,
197199
value: Some(from_gwei(deposit_data.amount)),
198200
// Note: the reason we use this `TransactionRequest` instead of just using the
199201
// function in `self.contract` is so that the `eth1_tx_data` function gets used

‎testing/simulator/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ edition = "2021"
1010
node_test_rig = { path = "../node_test_rig" }
1111
eth1 = {path = "../../beacon_node/eth1"}
1212
types = { path = "../../consensus/types" }
13-
parking_lot = "0.11.0"
13+
parking_lot = "0.12.0"
1414
futures = "0.3.7"
1515
tokio = "1.14.0"
1616
eth1_test_rig = { path = "../eth1_test_rig" }

‎validator_client/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dirs = "3.0.1"
3030
directory = { path = "../common/directory" }
3131
lockfile = { path = "../common/lockfile" }
3232
environment = { path = "../lighthouse/environment" }
33-
parking_lot = "0.11.0"
33+
parking_lot = "0.12.0"
3434
exit-future = "0.2.0"
3535
filesystem = { path = "../common/filesystem" }
3636
hex = "0.4.2"
@@ -47,9 +47,9 @@ warp_utils = { path = "../common/warp_utils" }
4747
warp = "0.3.2"
4848
hyper = "0.14.4"
4949
eth2_serde_utils = "0.1.1"
50-
libsecp256k1 = "0.6.0"
50+
libsecp256k1 = "0.7.0"
5151
ring = "0.16.19"
52-
rand = { version = "0.7.3", features = ["small_rng"] }
52+
rand = { version = "0.8.5", features = ["small_rng"] }
5353
lighthouse_metrics = { path = "../common/lighthouse_metrics" }
5454
lazy_static = "1.4.0"
5555
itertools = "0.10.0"

0 commit comments

Comments
 (0)
Please sign in to comment.