Skip to content

HTTP timeout too long for VC attestation duty #2313

@paulhauner

Description

@paulhauner

Description

I recently noticed a CRIT error on a VC (sorry, I lost the log) that expressed the following:

  1. The primary BN timed out when trying to produce an attestation with /eth/v1/validator/attestation_data
  2. 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):

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A0bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions