lighthouse/beacon_node
Divma f4ffa9e0b4 Handle processing results of non faulty batches (#3439)
## Issue Addressed
Solves #3390 

So after checking some logs @pawanjay176 got, we conclude that this happened because we blacklisted a chain after trying it "too much". Now here, in all occurrences it seems that "too much" means we got too many download failures. This happened very slowly, exactly because the batch is allowed to stay alive for very long times after not counting penalties when the ee is offline. The error here then was not that the batch failed because of offline ee errors, but that we blacklisted a chain because of download errors, which we can't pin on the chain but on the peer. This PR fixes that.

## Proposed Changes

Adds a missing piece of logic so that if a chain fails for errors that can't be attributed to an objectively bad behavior from the peer, it is not blacklisted. The issue at hand occurred when new peers arrived claiming a head that had wrongfully blacklisted, even if the original peers participating in the chain were not penalized.

Another notable change is that we need to consider a batch invalid if it processed correctly but its next non empty batch fails processing. Now since a batch can fail processing in non empty ways, there is no need to mark as invalid previous batches.

Improves some logging as well.

## Additional Info

We should do this regardless of pausing sync on ee offline/unsynced state. This is because I think it's almost impossible to ensure a processing result will reach in a predictable order with a synced notification from the ee. Doing this handles what I think are inevitable data races when we actually pause sync

This also fixes a return that reports which batch failed and caused us some confusion checking the logs
2022-08-12 00:56:38 +00:00
..
beacon_chain Serve Bellatrix preset in BN API (#3425) 2022-08-10 07:52:59 +00:00
builder_client Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00
client Tidy eth1/deposit contract logging (#3397) 2022-08-01 07:20:43 +00:00
eth1 Tidy eth1/deposit contract logging (#3397) 2022-08-01 07:20:43 +00:00
execution_layer Remove some "wontfix" TODOs for the merge (#3449) 2022-08-10 13:06:46 +00:00
genesis Unify execution layer endpoints (#3214) 2022-06-29 09:07:09 +00:00
http_api Serve Bellatrix preset in BN API (#3425) 2022-08-10 07:52:59 +00:00
http_metrics Support IPv6 in BN and VC HTTP APIs (#3104) 2022-03-24 00:04:49 +00:00
lighthouse_network Return ResourceUnavailable if we are unable to reconstruct execution payloads (#3365) 2022-07-27 03:20:00 +00:00
network Handle processing results of non faulty batches (#3439) 2022-08-12 00:56:38 +00:00
operation_pool Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
src Serve Bellatrix preset in BN API (#3425) 2022-08-10 07:52:59 +00:00
store Initial Commit of Retrospective OTB Verification (#3372) 2022-07-30 00:22:38 +00:00
tests Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
timer Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
Cargo.toml Release v2.5.1 (#3406) 2022-08-03 04:23:09 +00:00