Update and consolidate dependencies (#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 #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 https://github.com/rust-lang/cargo/issues/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: https://github.com/supranational/blst/pull/111
This commit is contained in:
Michael Sproul
2022-04-04 00:26:16 +00:00
parent ab434bc075
commit 4d0122444b
38 changed files with 283 additions and 686 deletions

View File

@@ -7,7 +7,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rand = "0.7.3"
rand = "0.8.5"
eth2_wallet = { path = "../../crypto/eth2_wallet" }
eth2_keystore = { path = "../../crypto/eth2_keystore" }
filesystem = { path = "../filesystem" }

View File

@@ -16,4 +16,4 @@ hex = "0.4.2"
types = { path = "../../consensus/types"}
eth2_ssz = "0.4.1"
tree_hash = "0.4.1"
ethabi = "12.0.0"
ethabi = "16.0.0"

View File

@@ -70,13 +70,13 @@ pub fn decode_eth1_tx_data(
};
}
let root = decode_token!(Hash256, to_fixed_bytes);
let root = decode_token!(Hash256, into_fixed_bytes);
let deposit_data = DepositData {
amount,
signature: decode_token!(SignatureBytes, to_bytes),
withdrawal_credentials: decode_token!(Hash256, to_bytes),
pubkey: decode_token!(PublicKeyBytes, to_bytes),
signature: decode_token!(SignatureBytes, into_bytes),
withdrawal_credentials: decode_token!(Hash256, into_bytes),
pubkey: decode_token!(PublicKeyBytes, into_bytes),
};
Ok((deposit_data, root))

View File

@@ -15,7 +15,7 @@ lighthouse_network = { path = "../../beacon_node/lighthouse_network" }
proto_array = { path = "../../consensus/proto_array", optional = true }
eth2_serde_utils = "0.1.1"
eth2_keystore = { path = "../../crypto/eth2_keystore" }
libsecp256k1 = "0.6.0"
libsecp256k1 = "0.7.0"
ring = "0.16.19"
bytes = "1.0.1"
account_utils = { path = "../../common/account_utils" }
@@ -28,10 +28,7 @@ store = { path = "../../beacon_node/store", optional = true }
slashing_protection = { path = "../../validator_client/slashing_protection", optional = true }
[target.'cfg(target_os = "linux")'.dependencies]
# TODO: update psutil once fix is merged: https://github.com/rust-psutil/rust-psutil/pull/93
# TODO: Even once the above PR is corrected, there are sub-dependencies that need to be updated.
# psutil = { version = "3.2.0", optional = true }
psutil = { git = "https://github.com/sigp/rust-psutil", rev = "b3e44bc7ec5d545b8cb8ad4e3dffe074b6e6336b", optional = true }
psutil = { version = "3.2.2", optional = true }
procinfo = { version = "0.4.2", optional = true }
[features]

View File

@@ -9,7 +9,7 @@ edition = "2021"
[dependencies]
lazy_static = "1.4.0"
num-bigint = "0.4.2"
eth2_hashing = "0.2.0"
eth2_hashing = "0.3.0"
hex = "0.4.2"
serde_yaml = "0.8.13"
serde = "1.0.116"

View File

@@ -10,7 +10,7 @@ edition = "2021"
lighthouse_metrics = { path = "../lighthouse_metrics" }
lazy_static = "1.4.0"
libc = "0.2.79"
parking_lot = "0.11.0"
parking_lot = "0.12.0"
[features]
mallinfo2 = []

View File

@@ -8,4 +8,4 @@ edition = "2021"
types = { path = "../../consensus/types" }
lazy_static = "1.4.0"
lighthouse_metrics = { path = "../lighthouse_metrics" }
parking_lot = "0.11.0"
parking_lot = "0.12.0"

View File

@@ -14,7 +14,7 @@ bls = { path = "../../crypto/bls" }
eth2_keystore = { path = "../../crypto/eth2_keystore" }
filesystem = { path = "../filesystem" }
types = { path = "../../consensus/types" }
rand = "0.7.3"
rand = "0.8.5"
deposit_contract = { path = "../deposit_contract" }
tree_hash = "0.4.1"
hex = "0.4.2"