mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Validator monitor support for sync committees (#2476)
## Issue Addressed N/A ## Proposed Changes Add functionality in the validator monitor to provide sync committee related metrics for monitored validators. Co-authored-by: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -716,7 +716,7 @@ impl<T: BeaconChainTypes> Worker<T> {
|
||||
peer_id: PeerId,
|
||||
sync_signature: SyncCommitteeMessage,
|
||||
subnet_id: SyncSubnetId,
|
||||
_seen_timestamp: Duration,
|
||||
seen_timestamp: Duration,
|
||||
) {
|
||||
let sync_signature = match self
|
||||
.chain
|
||||
@@ -734,21 +734,19 @@ impl<T: BeaconChainTypes> Worker<T> {
|
||||
}
|
||||
};
|
||||
|
||||
/*TODO:
|
||||
// Indicate to the `Network` service that this message is valid and can be
|
||||
// propagated on the gossip network.
|
||||
self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Accept);
|
||||
|
||||
// Register the sync signature with any monitored validators.
|
||||
self.chain
|
||||
.validator_monitor
|
||||
.read()
|
||||
.register_gossip_unaggregated_attestation(
|
||||
.register_gossip_sync_committee_message(
|
||||
seen_timestamp,
|
||||
attestation.indexed_attestation(),
|
||||
sync_signature.sync_message(),
|
||||
&self.chain.slot_clock,
|
||||
);
|
||||
*/
|
||||
|
||||
// Indicate to the `Network` service that this message is valid and can be
|
||||
// propagated on the gossip network.
|
||||
self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Accept);
|
||||
|
||||
metrics::inc_counter(&metrics::BEACON_PROCESSOR_SYNC_MESSAGE_VERIFIED_TOTAL);
|
||||
|
||||
@@ -778,7 +776,7 @@ impl<T: BeaconChainTypes> Worker<T> {
|
||||
message_id: MessageId,
|
||||
peer_id: PeerId,
|
||||
sync_contribution: SignedContributionAndProof<T::EthSpec>,
|
||||
_seen_timestamp: Duration,
|
||||
seen_timestamp: Duration,
|
||||
) {
|
||||
let sync_contribution = match self
|
||||
.chain
|
||||
@@ -801,19 +799,16 @@ impl<T: BeaconChainTypes> Worker<T> {
|
||||
// propagated on the gossip network.
|
||||
self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Accept);
|
||||
|
||||
/* TODO
|
||||
// Register the attestation with any monitored validators.
|
||||
self.chain
|
||||
.validator_monitor
|
||||
.read()
|
||||
.register_gossip_aggregated_attestation(
|
||||
.register_gossip_sync_committee_contribution(
|
||||
seen_timestamp,
|
||||
aggregate.aggregate(),
|
||||
aggregate.indexed_attestation(),
|
||||
sync_contribution.aggregate(),
|
||||
sync_contribution.participant_pubkeys(),
|
||||
&self.chain.slot_clock,
|
||||
);
|
||||
metrics::inc_counter(&metrics::BEACON_PROCESSOR_AGGREGATED_ATTESTATION_VERIFIED_TOTAL);
|
||||
*/
|
||||
metrics::inc_counter(&metrics::BEACON_PROCESSOR_SYNC_CONTRIBUTION_VERIFIED_TOTAL);
|
||||
|
||||
if let Err(e) = self
|
||||
.chain
|
||||
|
||||
Reference in New Issue
Block a user