From 807848bc7ac49b0ee5cfa7fa0029185e22ade285 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Mon, 12 May 2025 18:13:15 -0700 Subject: [PATCH] Next sync committee branch bug (#7443) #7441 Make sure we're correctly caching light client data --- .../beacon_chain/src/light_client_server_cache.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/beacon_node/beacon_chain/src/light_client_server_cache.rs b/beacon_node/beacon_chain/src/light_client_server_cache.rs index 8e29be9732..b7b6d1df18 100644 --- a/beacon_node/beacon_chain/src/light_client_server_cache.rs +++ b/beacon_node/beacon_chain/src/light_client_server_cache.rs @@ -421,18 +421,13 @@ struct LightClientCachedData { impl LightClientCachedData { fn from_state(state: &mut BeaconState) -> Result { - let (finality_branch, next_sync_committee_branch, current_sync_committee_branch) = ( - state.compute_finalized_root_proof()?, - state.compute_current_sync_committee_proof()?, - state.compute_next_sync_committee_proof()?, - ); Ok(Self { finalized_checkpoint: state.finalized_checkpoint(), - finality_branch, + finality_branch: state.compute_finalized_root_proof()?, next_sync_committee: state.next_sync_committee()?.clone(), current_sync_committee: state.current_sync_committee()?.clone(), - next_sync_committee_branch, - current_sync_committee_branch, + next_sync_committee_branch: state.compute_next_sync_committee_proof()?, + current_sync_committee_branch: state.compute_current_sync_committee_proof()?, finalized_block_root: state.finalized_checkpoint().root, }) }