Upgrade dependencies (#2513)

## Proposed Changes

* Consolidate Tokio versions: everything now uses the latest v1.10.0, no more `tokio-compat`.
* Many semver-compatible changes via `cargo update`. Notably this upgrades from the yanked v0.8.0 version of crossbeam-deque which is present in v1.5.0-rc.0
* Many semver incompatible upgrades via `cargo upgrades` and `cargo upgrade --workspace pkg_name`. Notable ommissions:
    - Prometheus, to be handled separately: https://github.com/sigp/lighthouse/issues/2485
    - `rand`, `rand_xorshift`: the libsecp256k1 package requires 0.7.x, so we'll stick with that for now
    - `ethereum-types` is pinned at 0.11.0 because that's what `web3` is using and it seems nice to have just a single version
    
## Additional Info

We still have two versions of `libp2p-core` due to `discv5` depending on the v0.29.0 release rather than `master`. AFAIK it should be OK to release in this state (cc @AgeManning )
This commit is contained in:
Michael Sproul
2021-08-17 01:00:24 +00:00
parent d17350c0fa
commit c0a2f501d9
47 changed files with 468 additions and 542 deletions

View File

@@ -7,10 +7,9 @@ edition = "2018"
[dev-dependencies]
eth1_test_rig = { path = "../../testing/eth1_test_rig" }
toml = "0.5.6"
web3 = { version = "0.16.0", default-features = false, features = ["http-tls", "signing", "ws-tls-tokio"] }
web3 = { version = "0.17.0", default-features = false, features = ["http-tls", "signing", "ws-tls-tokio"] }
sloggers = "1.0.1"
environment = { path = "../../lighthouse/environment" }
tokio-compat-02 = "0.2.0"
[dependencies]
reqwest = { version = "0.11.0", features = ["native-tls-vendored"] }
@@ -26,7 +25,7 @@ tree_hash = "0.1.1"
eth2_hashing = "0.1.0"
parking_lot = "0.11.0"
slog = "2.5.2"
tokio = { version = "1.7.1", features = ["full"] }
tokio = { version = "1.10.0", features = ["full"] }
state_processing = { path = "../../consensus/state_processing" }
libflate = "1.0.2"
lighthouse_metrics = { path = "../../common/lighthouse_metrics"}

View File

@@ -10,7 +10,6 @@ use slog::Logger;
use sloggers::{null::NullLoggerBuilder, Build};
use std::ops::Range;
use std::time::Duration;
use tokio_compat_02::FutureExt;
use tree_hash::TreeHash;
use types::{DepositData, EthSpec, Hash256, Keypair, MainnetEthSpec, MinimalEthSpec, Signature};
use web3::{transports::Http, Web3};
@@ -90,7 +89,6 @@ async fn blocking_deposit_count(eth1: &GanacheEth1Instance, block_number: u64) -
async fn get_block_number(web3: &Web3<Http>) -> u64 {
web3.eth()
.block_number()
.compat()
.await
.map(|v| v.as_u64())
.expect("should get block number")
@@ -180,7 +178,6 @@ mod eth1_cache {
}
}
}
.compat()
.await;
}
@@ -235,7 +232,6 @@ mod eth1_cache {
"should not grow cache beyond target"
);
}
.compat()
.await;
}
@@ -288,7 +284,6 @@ mod eth1_cache {
"should not grow cache beyond target"
);
}
.compat()
.await;
}
@@ -335,7 +330,6 @@ mod eth1_cache {
assert!(service.block_cache_len() >= n, "should grow the cache");
}
.compat()
.await;
}
}
@@ -420,7 +414,6 @@ mod deposit_tree {
);
}
}
.compat()
.await;
}
@@ -470,7 +463,6 @@ mod deposit_tree {
assert_eq!(service.deposit_cache_len(), n);
}
.compat()
.await;
}
@@ -571,7 +563,6 @@ mod deposit_tree {
}
}
}
.compat()
.await;
}
}
@@ -675,7 +666,6 @@ mod http {
);
}
}
.compat()
.await;
}
}
@@ -756,7 +746,6 @@ mod fast {
);
}
}
.compat()
.await;
}
}
@@ -838,7 +827,6 @@ mod persist {
"Should have equal cached deposits as before recovery"
);
}
.compat()
.await;
}
}
@@ -918,7 +906,6 @@ mod fallbacks {
endpoint2_block_number
);
}
.compat()
.await;
}
@@ -988,7 +975,6 @@ mod fallbacks {
endpoint2_block_number
);
}
.compat()
.await;
}
@@ -1058,7 +1044,6 @@ mod fallbacks {
endpoint2_block_number
);
}
.compat()
.await;
}
@@ -1136,7 +1121,6 @@ mod fallbacks {
endpoint2_block_number
);
}
.compat()
.await;
}
}