ChainSafe / lodestar

🌟 TypeScript Implementation of Ethereum Consensus
https://lodestar.chainsafe.io
Apache License 2.0
1.11k stars 273 forks source link

Specific timeouts per validator duties http request #6914

Open nflaig opened 4 days ago

nflaig commented 4 days ago

It's now possible to configure a timeout per request, and we might wanna reduce timeouts for some requests as there is generally no value it keeping request open after certain time as it would be too late anyways.

Right now, all http requests have a timeout of SECONDS_PER_SLOT (12s on mainnet) which is globally configured https://github.com/ChainSafe/lodestar/blob/8cb08ff56f66022c84d8ca1a91e82dba290e644a/packages/validator/src/validator.ts#L171-L173

More strict timeouts can improve fallback behavior as well, Lighthouse already uses this approach, see validator_client/src/lib.rs#L74-L86.

Related https://github.com/sigp/lighthouse/issues/2313