lighthouse/beacon_node
Michael Sproul 6ec649a4e2 Optimise head block root API (#4799)
## Issue Addressed

We've had a report of sync committee performance suffering with the beacon processor HTTP API prioritisations.

## Proposed Changes

Increase the priority of `/eth/v1/beacon/blocks/head/root` requests, which are used by the validator client to form sync committee messages, here:

441fc1691b/validator_client/src/sync_committee_service.rs (L181-L188)

Additionally, avoid loading the blinded block in all but the `block_id=block_root` case. I'm not sure why we were doing this previously, I suspect it was just an oversight during the implementation of the `finalized` status on API requests.

## Additional Info

I think this change should have minimal negative impact as:

- The block root endpoint is quick to compute (a few ms max).
- Only the priority of `head` requests is increased. Analytical processes that are making lots of block root requests for past slots are unable to DoS the beacon processor, as their requests will still be processed after attestations.
2023-10-03 23:59:37 +00:00
..
beacon_chain Use only lighthouse types in the mock builder (#4793) 2023-10-03 17:59:28 +00:00
beacon_processor Move dependencies to workspace (#4650) 2023-09-22 04:30:56 +00:00
builder_client Move dependencies to workspace (#4650) 2023-09-22 04:30:56 +00:00
client Move dependencies to workspace (#4650) 2023-09-22 04:30:56 +00:00
eth1 Move dependencies to workspace (#4650) 2023-09-22 04:30:56 +00:00
execution_layer Use only lighthouse types in the mock builder (#4793) 2023-10-03 17:59:28 +00:00
genesis Move dependencies to workspace (#4650) 2023-09-22 04:30:56 +00:00
http_api Optimise head block root API (#4799) 2023-10-03 23:59:37 +00:00
http_metrics Move dependencies to workspace (#4650) 2023-09-22 04:30:56 +00:00
lighthouse_network enforce non zero enr ports (#4776) 2023-10-03 23:59:34 +00:00
network Don't downscore peers on duplicate blocks (#4791) 2023-10-03 23:59:35 +00:00
operation_pool Move dependencies to workspace (#4650) 2023-09-22 04:30:56 +00:00
src enforce non zero enr ports (#4776) 2023-10-03 23:59:34 +00:00
store Move dependencies to workspace (#4650) 2023-09-22 04:30:56 +00:00
tests Appease Clippy 1.68 and refactor http_api (#4068) 2023-03-13 01:40:03 +00:00
timer Move dependencies to workspace (#4650) 2023-09-22 04:30:56 +00:00
Cargo.toml Release v4.5.0 (#4768) 2023-09-25 05:14:01 +00:00