mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Detailed validator monitoring (#2151)
## Issue Addressed - Resolves #2064 ## Proposed Changes Adds a `ValidatorMonitor` struct which provides additional logging and Grafana metrics for specific validators. Use `lighthouse bn --validator-monitor` to automatically enable monitoring for any validator that hits the [subnet subscription](https://ethereum.github.io/eth2.0-APIs/#/Validator/prepareBeaconCommitteeSubnet) HTTP API endpoint. Also, use `lighthouse bn --validator-monitor-pubkeys` to supply a list of validators which will always be monitored. See the new docs included in this PR for more info. ## TODO - [x] Track validator balance, `slashed` status, etc. - [x] ~~Register slashings in current epoch, not offense epoch~~ - [ ] Publish Grafana dashboard, update TODO link in docs - [x] ~~#2130 is merged into this branch, resolve that~~
This commit is contained in:
@@ -18,12 +18,22 @@ use tree_hash::TreeHash;
|
||||
///
|
||||
/// - Lazily verifying a serialized public key.
|
||||
/// - Storing some bytes that are actually invalid (required in the case of a `Deposit` message).
|
||||
#[derive(Clone)]
|
||||
pub struct GenericPublicKeyBytes<Pub> {
|
||||
bytes: [u8; PUBLIC_KEY_BYTES_LEN],
|
||||
_phantom: PhantomData<Pub>,
|
||||
}
|
||||
|
||||
impl<Pub> Copy for GenericPublicKeyBytes<Pub> {}
|
||||
|
||||
impl<Pub> Clone for GenericPublicKeyBytes<Pub> {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
bytes: self.bytes,
|
||||
_phantom: PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<Pub> GenericPublicKeyBytes<Pub>
|
||||
where
|
||||
Pub: TPublicKey,
|
||||
|
||||
Reference in New Issue
Block a user