Currently, get_child_beacon_header iteratively fetches headers for successive slots until it finds a valid one. This approach could be optimized by using the /eth/v1/beacon/headers?parent_rootendpoint, which directly retrieves a header based on its parent's root.
Additional Context:
Teku's Stance: The widely used Ethereum consensus client Teku currently does not implement the parent_root parameter for /eth/v1/beacon/headers due to perceived implementation challenges and performance concerns. Their reasoning can be found here.
Currently, get_child_beacon_header iteratively fetches headers for successive slots until it finds a valid one. This approach could be optimized by using the
/eth/v1/beacon/headers?parent_root
endpoint, which directly retrieves a header based on its parent's root.Additional Context:
Teku's Stance: The widely used Ethereum consensus client Teku currently does not implement the
parent_root
parameter for/eth/v1/beacon/headers
due to perceived implementation challenges and performance concerns. Their reasoning can be found here.