Capture a missed VC error (#2436)

## Issue Addressed

Related to #2430, #2394

## Proposed Changes

As per https://github.com/sigp/lighthouse/issues/2430#issuecomment-875323615, ensure that the `ProductionValidatorClient::new` error raises a log and shuts down the VC. Also, I implemened `spawn_ignoring_error`, as per @michaelsproul's suggestion in https://github.com/sigp/lighthouse/pull/2436#issuecomment-876084419.

I got unlucky and CI picked up a [new rustsec vuln](https://rustsec.org/advisories/RUSTSEC-2021-0072). To fix this, I had to update the following crates:

- `tokio`
- `web3`
- `tokio-compat-02`

## Additional Info

NA
This commit is contained in:
Paul Hauner
2021-07-09 03:20:24 +00:00
parent 406e3921d9
commit 78e5c0c157
11 changed files with 367 additions and 543 deletions

View File

@@ -379,8 +379,8 @@ fn run<E: EthSpec>(
if !shutdown_flag {
environment.runtime().spawn(async move {
if let Err(e) = ProductionValidatorClient::new(context, config)
.await?
.start_service()
.await
.and_then(|mut vc| vc.start_service())
{
crit!(log, "Failed to start validator client"; "reason" => e);
// Ignore the error since it always occurs during normal operation when
@@ -389,7 +389,6 @@ fn run<E: EthSpec>(
.shutdown_sender()
.try_send(ShutdownReason::Failure("Failed to start validator client"));
}
Ok::<(), String>(())
});
} else {
let _ = executor.shutdown_sender().try_send(ShutdownReason::Success(