@@ -3102,50 +3102,6 @@ pub fn serve<T: BeaconChainTypes>(
31023102 } )
31033103 } ,
31043104 ) ;
3105- // TODO(zkproofs): I think we want to return a block_with_witness
3106- // and note the EL could generate this witness when newPayload is called
3107- // it gets saved to disk or in memory and then when the EL is asked for it
3108- // it just gets it from disk or memory.
3109- //
3110- // Also consider adding another endpoint that just
3111- // returns the unverified payload for those who want to generate the witness
3112- // themselves quickly, and don't want to pay the latency cost for payload execution.
3113- //
3114- // GET lighthouse/execution_witness/{block}
3115- // Returns the execution witness for a given block from the execution layer.
3116- // The block parameter can be a hex block number (e.g., "0x1") or a tag ("latest", "pending").
3117- let get_lighthouse_execution_witness = warp:: path ( "lighthouse" )
3118- . and ( warp:: path ( "execution_witness" ) )
3119- . and ( warp:: path:: param :: < String > ( ) )
3120- . and ( warp:: path:: end ( ) )
3121- . and ( task_spawner_filter. clone ( ) )
3122- . and ( chain_filter. clone ( ) )
3123- . then (
3124- |block : String , task_spawner : TaskSpawner < T :: EthSpec > , chain : Arc < BeaconChain < T > > | {
3125- task_spawner. spawn_async_with_rejection ( Priority :: P1 , async move {
3126- let execution_layer = chain. execution_layer . as_ref ( ) . ok_or_else ( || {
3127- warp_utils:: reject:: custom_server_error (
3128- "execution layer not configured" . to_string ( ) ,
3129- )
3130- } ) ?;
3131-
3132- let witness = execution_layer
3133- . get_execution_witness ( & block)
3134- . await
3135- . map_err ( |e| {
3136- warp_utils:: reject:: custom_server_error ( format ! (
3137- "failed to get execution witness: {:?}" ,
3138- e
3139- ) )
3140- } ) ?;
3141-
3142- Ok :: < _ , warp:: reject:: Rejection > (
3143- warp:: reply:: json ( & api_types:: GenericResponse :: from ( witness) )
3144- . into_response ( ) ,
3145- )
3146- } )
3147- } ,
3148- ) ;
31493105
31503106 let get_events = eth_v1
31513107 . clone ( )
@@ -3378,7 +3334,6 @@ pub fn serve<T: BeaconChainTypes>(
33783334 . uor ( get_beacon_light_client_updates)
33793335 . uor ( get_lighthouse_block_packing_efficiency)
33803336 . uor ( get_lighthouse_merge_readiness)
3381- . uor ( get_lighthouse_execution_witness)
33823337 . uor ( get_events)
33833338 . uor ( get_expected_withdrawals)
33843339 . uor ( lighthouse_log_events. boxed ( ) )
0 commit comments