diff --git a/validator_client/src/attestation_service.rs b/validator_client/src/attestation_service.rs index 95500fc94..cdc9b88f6 100644 --- a/validator_client/src/attestation_service.rs +++ b/validator_client/src/attestation_service.rs @@ -389,12 +389,13 @@ impl AttestationService { ) .await { - Ok(()) => Some(attestation), + Ok(()) => Some((attestation, duty.validator_index)), Err(e) => { crit!( log, "Failed to sign attestation"; "error" => ?e, + "validator" => ?duty.pubkey, "committee_index" => committee_index, "slot" => slot.as_u64(), ); @@ -404,11 +405,11 @@ impl AttestationService { }); // Execute all the futures in parallel, collecting any successful results. - let attestations = &join_all(signing_futures) + let (ref attestations, ref validator_indices): (Vec<_>, Vec<_>) = join_all(signing_futures) .await .into_iter() .flatten() - .collect::>>(); + .unzip(); // Post the attestations to the BN. match self @@ -428,6 +429,7 @@ impl AttestationService { log, "Successfully published attestations"; "count" => attestations.len(), + "validator_indices" => ?validator_indices, "head_block" => ?attestation_data.beacon_block_root, "committee_index" => attestation_data.index, "slot" => attestation_data.slot.as_u64(), @@ -549,7 +551,7 @@ impl AttestationService { let attestation = &signed_aggregate_and_proof.message.aggregate; info!( log, - "Successfully published attestations"; + "Successfully published attestation"; "aggregator" => signed_aggregate_and_proof.message.aggregator_index, "signatures" => attestation.aggregation_bits.num_set_bits(), "head_block" => format!("{:?}", attestation.data.beacon_block_root), @@ -566,6 +568,7 @@ impl AttestationService { log, "Failed to publish attestation"; "error" => %e, + "aggregator" => signed_aggregate_and_proof.message.aggregator_index, "committee_index" => attestation.data.index, "slot" => attestation.data.slot.as_u64(), "type" => "aggregated",