From e8ca60ea23780259f0a0fecc94d1116d9572fe36 Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Tue, 1 Apr 2025 17:33:26 +0800 Subject: [PATCH] Fix logging from middleware --- .../validator_services/src/sync.rs | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/validator_client/validator_services/src/sync.rs b/validator_client/validator_services/src/sync.rs index b3c0d7d9bc..52683e08c6 100644 --- a/validator_client/validator_services/src/sync.rs +++ b/validator_client/validator_services/src/sync.rs @@ -557,7 +557,7 @@ pub async fn fill_in_aggregation_proofs( "validator_index" = duty.validator_index, "slot" = %proof_slot, "subcommittee_index" = subnet_id, - "partial sync selection proof" = ?proof, + "partial selection proof" = ?proof, "Sending sync selection to middleware" ); Some(sync_committee_selection) @@ -606,15 +606,6 @@ pub async fn fill_in_aggregation_proofs( match middleware_response { Ok(response) => { - // The selection proof from middleware response will be a full selection proof - debug!( - "validator_index" = response.data[0].validator_index, - "slot" = %response.data[0].slot, - "subcommittee_index" = response.data[0].subcommittee_index, - "full sync selection proof" = ?response.data[0].selection_proof, - "Received sync selection from middleware" - ); - // Get the sync map to update duties let sync_map = duties_service.sync_duties.committees.read(); let Some(committee_duties) = sync_map.get(&sync_committee_period) else { @@ -624,8 +615,16 @@ pub async fn fill_in_aggregation_proofs( let validators = committee_duties.validators.read(); - // Process each response + // Process each middleware response for response_data in response.data.iter() { + // The selection proof from middleware response will be a full selection proof + debug!( + "validator_index" = response_data.validator_index, + "slot" = %response_data.slot, + "subcommittee_index" = response_data.subcommittee_index, + "full selection proof" = ?response_data.selection_proof, + "Received sync selection from middleware" + ); let validator_index = response_data.validator_index; let slot = response_data.slot; let subcommittee_index = response_data.subcommittee_index;