Implement proposer lookahead endpoint (#8815)

closes #8809


  Implement GET /eth/v1/beacon/states/{state_id}/proposer_lookahead ([beacon-APIs#565](https://github.com/ethereum/beacon-APIs/pull/565)). Returns the proposer lookahead from Fulu+ states; 400 for pre-Fulu. Includes integration test.


Co-Authored-By: romeoscript <romeobourne211@gmail.com>

Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io>
This commit is contained in:
Romeo
2026-03-10 14:36:58 +01:00
committed by GitHub
parent 081229b748
commit 906400ed34
4 changed files with 196 additions and 3 deletions

View File

@@ -650,6 +650,10 @@ pub fn serve<T: BeaconChainTypes>(
let get_beacon_state_pending_consolidations =
states::get_beacon_state_pending_consolidations(beacon_states_path.clone());
// GET beacon/states/{state_id}/proposer_lookahead
let get_beacon_state_proposer_lookahead =
states::get_beacon_state_proposer_lookahead(beacon_states_path.clone());
// GET beacon/headers
//
// Note: this endpoint only returns information about blocks in the canonical chain. Given that
@@ -3284,6 +3288,7 @@ pub fn serve<T: BeaconChainTypes>(
.uor(get_beacon_state_pending_deposits)
.uor(get_beacon_state_pending_partial_withdrawals)
.uor(get_beacon_state_pending_consolidations)
.uor(get_beacon_state_proposer_lookahead)
.uor(get_beacon_headers)
.uor(get_beacon_headers_block_id)
.uor(get_beacon_block)