-
Notifications
You must be signed in to change notification settings - Fork 970
Description
Description
I recently noticed a CRIT error on a VC (sorry, I lost the log) that expressed the following:
- The primary BN timed out when trying to produce an attestation with
/eth/v1/validator/attestation_data - The secondary BN failed with
AttestingPriorToHead
I believe this is because the timeout for HTTP calls on the VC is too long at 12s (one slot):
lighthouse/validator_client/src/lib.rs
Line 59 in 3a24ca5
| const HTTP_TIMEOUT: Duration = Duration::from_secs(12); |
Considering that attestation production happens 4 seconds into the slot, we should really have a timeout that's less than 12 - 4 == 8 seconds. I think an even smaller timeout would be better for attestations, they're very fast to produce and I think we should really be aborting if it takes longer that 1-2s.
However, such a short time doesn't work well for block production which is rather heavy. As such, I think the best way to solve this would be to allow for different timeouts for different requests.
Version
v1.3.0: 3a24ca5