risc0 / risc0-ethereum

Integration of the RISC Zero verifiable compute platform with Ethereum and EVM chains.
https://risczero.com
Apache License 2.0
63 stars 15 forks source link

Enhance `get_child_beacon_header` to use `/eth/v1/beacon/headers?parent_root` when supported #242

Open Wollac opened 2 weeks ago

Wollac commented 2 weeks ago

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.

linear[bot] commented 2 weeks ago

WEB3-123 Enhance `get_child_beacon_header` to use `/eth/v1/beacon/headers?parent_root` when supported