diff --git a/app/eth2wrap/eth2wrap_gen.go b/app/eth2wrap/eth2wrap_gen.go index 6e5719405..f969f6966 100644 --- a/app/eth2wrap/eth2wrap_gen.go +++ b/app/eth2wrap/eth2wrap_gen.go @@ -35,7 +35,6 @@ type Client interface { SetForkVersion(forkVersion [4]byte) ClientForAddress(addr string) Client - // Address returns the address of the beacon node. Address() string Headers() map[string]string @@ -55,6 +54,7 @@ type Client interface { eth2client.ForkProvider eth2client.ForkScheduleProvider eth2client.GenesisProvider + eth2client.NodeIdentityProvider eth2client.NodePeerCountProvider eth2client.NodeSyncingProvider eth2client.NodeVersionProvider @@ -655,6 +655,28 @@ func (m multi) Genesis(ctx context.Context, opts *api.GenesisOpts) (*api.Respons return res0, err } +// NodeIdentity provides the identity information of the node. +// Note this endpoint is cached in go-eth2-client. +func (m multi) NodeIdentity(ctx context.Context, opts *api.NodeIdentityOpts) (*api.Response[*apiv1.NodeIdentity], error) { + const label = "node_identity" + + defer incRequest(label) + + res0, err := provide(ctx, m.clients, m.fallbacks, + func(ctx context.Context, args provideArgs) (*api.Response[*apiv1.NodeIdentity], error) { + return args.client.NodeIdentity(ctx, opts) + }, + nil, m.selector, + ) + + if err != nil { + incError(label) + err = wrapError(ctx, err, label) + } + + return res0, err +} + // NodePeerCount provides the peer count of the node. // Note this endpoint is cached in go-eth2-client. func (m multi) NodePeerCount(ctx context.Context, opts *api.NodePeerCountOpts) (*api.Response[*apiv1.PeerCount], error) { @@ -1149,6 +1171,16 @@ func (l *lazy) Genesis(ctx context.Context, opts *api.GenesisOpts) (res0 *api.Re return cl.Genesis(ctx, opts) } +// NodeIdentity provides the identity information of the node. +func (l *lazy) NodeIdentity(ctx context.Context, opts *api.NodeIdentityOpts) (res0 *api.Response[*apiv1.NodeIdentity], err error) { + cl, err := l.getOrCreateClient(ctx) + if err != nil { + return res0, err + } + + return cl.NodeIdentity(ctx, opts) +} + // NodePeerCount provides the peer count of the node. func (l *lazy) NodePeerCount(ctx context.Context, opts *api.NodePeerCountOpts) (res0 *api.Response[*apiv1.PeerCount], err error) { cl, err := l.getOrCreateClient(ctx) diff --git a/app/eth2wrap/genwrap/genwrap.go b/app/eth2wrap/genwrap/genwrap.go index 20910857f..fdeb09b39 100644 --- a/app/eth2wrap/genwrap/genwrap.go +++ b/app/eth2wrap/genwrap/genwrap.go @@ -56,6 +56,7 @@ type Client interface { SetForkVersion(forkVersion [4]byte) + ClientForAddress(addr string) Client Address() string Headers() map[string]string @@ -124,6 +125,7 @@ type Client interface { "ForkProvider": {Latency: true, Log: false}, "ForkScheduleProvider": {Latency: true, Log: false}, "GenesisProvider": {Latency: false, Log: false}, + "NodeIdentityProvider": {Latency: false, Log: false}, "NodePeerCountProvider": {Latency: false, Log: false}, "NodeSyncingProvider": {Latency: true, Log: false}, "NodeVersionProvider": {Latency: false, Log: false}, diff --git a/app/eth2wrap/mocks/client.go b/app/eth2wrap/mocks/client.go index b9fd61986..1bf53c6c1 100644 --- a/app/eth2wrap/mocks/client.go +++ b/app/eth2wrap/mocks/client.go @@ -712,6 +712,36 @@ func (_m *Client) NodeVersion(ctx context.Context, opts *api.NodeVersionOpts) (* return r0, r1 } +// NodeIdentity provides a mock function with given fields: ctx +func (_m *Client) NodeIdentity(ctx context.Context, opts *api.NodeIdentityOpts) (*api.Response[*v1.NodeIdentity], error) { + ret := _m.Called(ctx, opts) + + if len(ret) == 0 { + panic("no return value specified for NodeIdentity") + } + + var r0 *api.Response[*v1.NodeIdentity] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *api.NodeIdentityOpts) (*api.Response[*v1.NodeIdentity], error)); ok { + return rf(ctx, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, *api.NodeIdentityOpts) *api.Response[*v1.NodeIdentity]); ok { + r0 = rf(ctx, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*api.Response[*v1.NodeIdentity]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *api.NodeIdentityOpts) error); ok { + r1 = rf(ctx, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // Proposal provides a mock function with given fields: ctx, opts func (_m *Client) Proposal(ctx context.Context, opts *api.ProposalOpts) (*api.Response[*api.VersionedProposal], error) { ret := _m.Called(ctx, opts) diff --git a/app/metrics.go b/app/metrics.go index 6c7db72e7..dc3999d5f 100644 --- a/app/metrics.go +++ b/app/metrics.go @@ -89,6 +89,13 @@ var ( Help: "Constant gauge with label set to the node version of the upstream beacon node", }, []string{"version"}) + beaconNodePeerIDGauge = promauto.NewResetGaugeVec(prometheus.GaugeOpts{ + Namespace: "app", + Subsystem: "beacon_node", + Name: "peer_id", + Help: "Constant gauge with label set to the peer_id of the upstream beacon node", + }, []string{"peer_id"}) + thresholdGauge = promauto.NewGauge(prometheus.GaugeOpts{ Namespace: "cluster", Name: "threshold", diff --git a/app/monitoringapi.go b/app/monitoringapi.go index 830641528..079e38e0e 100644 --- a/app/monitoringapi.go +++ b/app/monitoringapi.go @@ -286,6 +286,19 @@ func beaconNodeVersionMetric(ctx context.Context, eth2Cl eth2wrap.Client, clock eth2wrap.CheckBeaconNodeVersion(ctx, version) } + setNodePeerID := func() { + response, err := eth2Cl.NodeIdentity(ctx, ð2api.NodeIdentityOpts{}) + if err != nil { + log.Error(ctx, "Failed to fetch beacon node identity. Check beacon node connectivity and API availability", err) + return + } + + peerID := response.Data.PeerID + + beaconNodePeerIDGauge.Reset() + beaconNodePeerIDGauge.WithLabelValues(peerID).Set(1) + } + go func() { onStartup := make(chan struct{}, 1) onStartup <- struct{}{} @@ -294,8 +307,10 @@ func beaconNodeVersionMetric(ctx context.Context, eth2Cl eth2wrap.Client, clock select { case <-onStartup: setNodeVersion() + setNodePeerID() case <-nodeVersionTicker.Chan(): setNodeVersion() + setNodePeerID() case <-ctx.Done(): return } diff --git a/docs/metrics.md b/docs/metrics.md index 944de40f1..0bdc4c4a9 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -3,6 +3,7 @@ This document contains all the prometheus metrics exposed by a charon node. All metrics contain the following labels, so they are omitted from the table below: + - `cluster_hash`: The cluster lock hash uniquely identifying the cluster. - `cluster_name`: The cluster lock name. - `cluster_network`: The cluster network name; goerli, mainnet, etc. @@ -11,98 +12,99 @@ All metrics contain the following labels, so they are omitted from the table bel The `cluster_*` labels uniquely identify a specific node`s metrics which is required when storing metrics from multiple nodes or clusters in one Prometheus instance. -| Name | Type | Help | Labels | -|---|---|---|---| -| `app_beacon_node_peers` | Gauge | Gauge set to the peer count of the upstream beacon node | | -| `app_beacon_node_sse_block` | Histogram | Block imported into fork choice delay, supplied by beacon node`s SSE endpoint. Values between 0s and 4s for Ethereum mainnet are considered safe | `addr` | -| `app_beacon_node_sse_block_gossip` | Histogram | Block reception via gossip delay, supplied by beacon node`s SSE endpoint. Values between 0s and 4s for Ethereum mainnet are considered safe | `addr` | -| `app_beacon_node_sse_block_processing_time` | Histogram | Time in seconds between block gossip and head events, indicating block processing time. Lower values indicate better CPU/disk/RAM performance. | `addr` | -| `app_beacon_node_sse_chain_reorg_depth` | Histogram | Chain reorg depth, supplied by beacon node`s SSE endpoint | `addr` | -| `app_beacon_node_sse_head_delay` | Histogram | Delay in seconds between slot start and head update, supplied by beacon node`s SSE endpoint. Values between 8s and 12s for Ethereum mainnet are considered safe. | `addr` | -| `app_beacon_node_sse_head_slot` | Gauge | Current beacon node head slot, supplied by beacon node`s SSE endpoint | `addr` | -| `app_beacon_node_version` | Gauge | Constant gauge with label set to the node version of the upstream beacon node | `version` | -| `app_cache_hits_total` | Counter | Total number of times the cache was used | `endpoint` | -| `app_cache_invalidated_reorg_total` | Counter | Total number of times the cache was invalidated due to a chain reorg | `endpoint` | -| `app_cache_misses_total` | Counter | Total number of times the cache was missed | `endpoint` | -| `app_eth2_errors_total` | Counter | Total number of errors returned by eth2 beacon node requests | `endpoint` | -| `app_eth2_latency_seconds` | Histogram | Latency in seconds for eth2 beacon node requests | `endpoint` | -| `app_eth2_requests_total` | Counter | Total number of requests sent to eth2 beacon node | `endpoint` | -| `app_eth2_using_fallback` | Gauge | Indicates if client is using fallback (1) or primary (0) beacon node | | -| `app_feature_flags` | Gauge | Constant gauge with custom enabled feature flags | `feature_flags` | -| `app_git_commit` | Gauge | Constant gauge with label set to current git commit hash | `git_hash` | -| `app_health_checks` | Gauge | Application health checks by name and severity. Set to 1 for failing, 0 for ok. | `severity, name` | -| `app_health_metrics_high_cardinality` | Gauge | Metrics with high cardinality by name. | `name` | -| `app_log_error_total` | Counter | Total count of logged errors by topic | `topic` | -| `app_log_warn_total` | Counter | Total count of logged warnings by topic | `topic` | -| `app_monitoring_readyz` | Gauge | Set to 1 if the node is operational and monitoring api `/readyz` endpoint is returning 200s. Else `/readyz` is returning 500s and this metric is either set to 2 if the beacon node is down, or3 if the beacon node is syncing, or4 if quorum peers are not connected. | | -| `app_peer_name` | Gauge | Constant gauge with label set to the name of the cluster peer | `peer_name` | -| `app_peerinfo_builder_api_enabled` | Gauge | Set to 1 if builder API is enabled on this peer, else 0 if disabled. | `peer` | -| `app_peerinfo_clock_offset_seconds` | Gauge | Peer clock offset in seconds | `peer` | -| `app_peerinfo_git_commit` | Gauge | Constant gauge with git_hash label set to peer`s git commit hash. | `peer, git_hash` | -| `app_peerinfo_index` | Gauge | Constant gauge set to the peer index in the cluster definition | `peer` | -| `app_peerinfo_nickname` | Gauge | Constant gauge with nickname label set to peer`s charon nickname. | `peer, peer_nickname` | -| `app_peerinfo_start_time_secs` | Gauge | Constant gauge set to the peer start time of the binary in unix seconds | `peer` | -| `app_peerinfo_version` | Gauge | Constant gauge with version label set to peer`s charon version. | `peer, version` | -| `app_peerinfo_version_support` | Gauge | Set to 1 if the peer`s version is supported by (compatible with) the current version, else 0 if unsupported. | `peer` | -| `app_start_time_secs` | Gauge | Gauge set to the app start time of the binary in unix seconds | | -| `app_validator_stack_params` | Gauge | Parameters for each component of the validator stack in which this Charon instance is deployed into | `component, cli_parameters` | -| `app_version` | Gauge | Constant gauge with label set to current app version | `version` | -| `cluster_network` | Gauge | Constant gauge with label set to the current network (chain) | `network` | -| `cluster_operators` | Gauge | Number of operators in the cluster lock | | -| `cluster_threshold` | Gauge | Aggregation threshold in the cluster lock | | -| `cluster_validators` | Gauge | Number of validators in the cluster lock | | -| `core_bcast_broadcast_delay_seconds` | Histogram | Duty broadcast delay since the expected duty submission in seconds by type | `duty` | -| `core_bcast_broadcast_total` | Counter | The total count of successfully broadcast duties by type | `duty` | -| `core_consensus_decided_leader_index` | Gauge | Index of the decided leader by protocol and duty | `protocol, duty` | -| `core_consensus_decided_rounds` | Gauge | Number of decided rounds by protocol, duty, and timer | `protocol, duty, timer` | -| `core_consensus_duration_seconds` | Histogram | Duration of the consensus process by protocol, duty, and timer | `protocol, duty, timer` | -| `core_consensus_error_total` | Counter | Total count of consensus errors by protocol | `protocol` | -| `core_consensus_timeout_total` | Counter | Total count of consensus timeouts by protocol, duty, and timer | `protocol, duty, timer` | -| `core_fetcher_proposal_blinded` | Gauge | Whether the fetched proposal was blinded (1) or local (2) | | -| `core_parsigdb_exit_total` | Counter | Total number of partially signed voluntary exits per public key | `pubkey` | -| `core_parsigdb_store` | Histogram | Latency of partial signatures received since earliest expected time, per duty, per peer index | `duty, peer_idx` | -| `core_scheduler_current_epoch` | Gauge | The current epoch | | -| `core_scheduler_current_slot` | Gauge | The current slot | | -| `core_scheduler_duty_total` | Counter | The total count of duties scheduled by type | `duty` | -| `core_scheduler_skipped_slots_total` | Counter | Total number times slots were skipped | | -| `core_scheduler_submit_registration_errors_total` | Counter | The total count of failed submit registration requests | | -| `core_scheduler_submit_registration_total` | Counter | The total number of submit registration requests | | -| `core_scheduler_validator_balance_gwei` | Gauge | Total balance of a validator by public key | `pubkey_full, pubkey` | -| `core_scheduler_validator_status` | Gauge | Gauge with validator pubkey and status as labels, value=1 is current status, value=0 is previous. | `pubkey_full, pubkey, status` | -| `core_scheduler_validators_active` | Gauge | Number of active validators | | -| `core_tracker_attestation_expect_total` | Counter | Total number of expected attestations for the slot (counts individual attestations, not duties) | | -| `core_tracker_attestation_success_total` | Counter | Total number of successful attestations for the slot (counts individual attestations, not duties) | | -| `core_tracker_expect_duties_total` | Counter | Total number of expected duties (failed + success) by type | `duty` | -| `core_tracker_failed_duties_total` | Counter | Total number of failed duties by type | `duty` | -| `core_tracker_failed_duty_reasons_total` | Counter | Total number of failed duties by type and reason code | `duty, reason` | -| `core_tracker_inclusion_delay` | Gauge | Cluster`s average attestation inclusion delay in slots. Available only when attestation_inclusion feature flag is enabled. | | -| `core_tracker_inclusion_missed_total` | Counter | Total number of broadcast duties never included in any block by type | `duty` | -| `core_tracker_inconsistent_parsigs_total` | Counter | Total number of duties that contained inconsistent partial signed data by duty type | `duty` | -| `core_tracker_participation` | Gauge | Set to 1 if peer participated successfully for the given duty or else 0 | `duty, peer` | -| `core_tracker_participation_expected_total` | Counter | Total number of expected participations (fail + success) by peer and duty type | `duty, peer` | -| `core_tracker_participation_missed_total` | Counter | Total number of missed participations by peer and duty type | `duty, peer` | -| `core_tracker_participation_success_total` | Counter | Total number of successful participations by peer and duty type | `duty, peer` | -| `core_tracker_participation_total` | Counter | Total number of successful participations by peer and duty type | `duty, peer` | -| `core_tracker_success_duties_total` | Counter | Total number of successful duties by type | `duty` | -| `core_tracker_unexpected_events_total` | Counter | Total number of unexpected events by peer | `peer` | -| `core_validatorapi_proxy_request_latency_seconds` | Histogram | The validatorapi proxy request latencies in seconds by path | `path` | -| `core_validatorapi_request_error_total` | Counter | The total number of validatorapi request errors | `endpoint, status_code` | -| `core_validatorapi_request_latency_seconds` | Histogram | The validatorapi request latencies in seconds by endpoint | `endpoint` | -| `core_validatorapi_request_total` | Counter | The total number of requests per content-type and endpoint | `endpoint, content_type` | -| `core_validatorapi_vc_user_agent` | Gauge | Gauge with label set to user agent string of requests made by VC | `user_agent` | -| `p2p_peer_connection_total` | Counter | Total number of libp2p connections per peer. | `peer` | -| `p2p_peer_connection_types` | Gauge | Current number of libp2p connections by peer, type (`direct` or `relay`), and protocol (`tcp`, `quic`). Note that peers may have multiple connections. | `peer, type, protocol` | -| `p2p_peer_network_receive_bytes_total` | Counter | Total number of network bytes received from the peer by protocol and transport. Transport is based on first active connection (accurate in steady state). | `peer, protocol, transport` | -| `p2p_peer_network_sent_bytes_total` | Counter | Total number of network bytes sent to the peer by protocol and transport. Transport is based on first active connection (accurate in steady state). | `peer, protocol, transport` | -| `p2p_peer_streams` | Gauge | Current number of libp2p streams by peer, direction (`inbound` or `outbound` or `unknown`), protocol and transport. | `peer, direction, protocol, transport` | -| `p2p_ping_error_total` | Counter | Total number of ping errors per peer | `peer` | -| `p2p_ping_latency_secs` | Histogram | Ping latencies in seconds per peer | `peer` | -| `p2p_ping_success` | Gauge | Whether the last ping was successful (1) or not (0). Can be used as proxy for connected peers | `peer` | -| `p2p_reachability_status` | Gauge | Current libp2p reachability status of this node as detected by autonat: unknown(0), public(1) or private(2). | | -| `p2p_relay_connection_types` | Gauge | Current number of libp2p connections by relay, type (`direct` or `relay`), and protocol (`tcp`, `quic`). Note that peers may have multiple connections. | `peer, type, protocol` | -| `p2p_relay_connections` | Gauge | Connected relays by name | `peer` | -| `relay_p2p_active_connections` | Gauge | Current number of active connections by peer and cluster | `peer, peer_cluster` | -| `relay_p2p_connection_total` | Counter | Total number of new connections by peer and cluster | `peer, peer_cluster` | -| `relay_p2p_network_receive_bytes_total` | Counter | Total number of network bytes received from the peer and cluster | `peer, peer_cluster` | -| `relay_p2p_network_sent_bytes_total` | Counter | Total number of network bytes sent to the peer and cluster | `peer, peer_cluster` | -| `relay_p2p_ping_latency` | Histogram | Ping latency by peer and cluster | `peer, peer_cluster` | +| Name | Type | Help | Labels | +| ------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | +| `app_beacon_node_peer_id` | Gauge | Constant gauge with label set to the peer_id of the upstream beacon node | `peer_id` | +| `app_beacon_node_peers` | Gauge | Gauge set to the peer count of the upstream beacon node | | +| `app_beacon_node_sse_block` | Histogram | Block imported into fork choice delay, supplied by beacon node`s SSE endpoint. Values between 0s and 4s for Ethereum mainnet are considered safe | `addr` | +| `app_beacon_node_sse_block_gossip` | Histogram | Block reception via gossip delay, supplied by beacon node`s SSE endpoint. Values between 0s and 4s for Ethereum mainnet are considered safe | `addr` | +| `app_beacon_node_sse_block_processing_time` | Histogram | Time in seconds between block gossip and head events, indicating block processing time. Lower values indicate better CPU/disk/RAM performance. | `addr` | +| `app_beacon_node_sse_chain_reorg_depth` | Histogram | Chain reorg depth, supplied by beacon node`s SSE endpoint | `addr` | +| `app_beacon_node_sse_head_delay` | Histogram | Delay in seconds between slot start and head update, supplied by beacon node`s SSE endpoint. Values between 8s and 12s for Ethereum mainnet are considered safe. | `addr` | +| `app_beacon_node_sse_head_slot` | Gauge | Current beacon node head slot, supplied by beacon node`s SSE endpoint | `addr` | +| `app_beacon_node_version` | Gauge | Constant gauge with label set to the node version of the upstream beacon node | `version` | +| `app_cache_hits_total` | Counter | Total number of times the cache was used | `endpoint` | +| `app_cache_invalidated_reorg_total` | Counter | Total number of times the cache was invalidated due to a chain reorg | `endpoint` | +| `app_cache_misses_total` | Counter | Total number of times the cache was missed | `endpoint` | +| `app_eth2_errors_total` | Counter | Total number of errors returned by eth2 beacon node requests | `endpoint` | +| `app_eth2_latency_seconds` | Histogram | Latency in seconds for eth2 beacon node requests | `endpoint` | +| `app_eth2_requests_total` | Counter | Total number of requests sent to eth2 beacon node | `endpoint` | +| `app_eth2_using_fallback` | Gauge | Indicates if client is using fallback (1) or primary (0) beacon node | | +| `app_feature_flags` | Gauge | Constant gauge with custom enabled feature flags | `feature_flags` | +| `app_git_commit` | Gauge | Constant gauge with label set to current git commit hash | `git_hash` | +| `app_health_checks` | Gauge | Application health checks by name and severity. Set to 1 for failing, 0 for ok. | `severity, name` | +| `app_health_metrics_high_cardinality` | Gauge | Metrics with high cardinality by name. | `name` | +| `app_log_error_total` | Counter | Total count of logged errors by topic | `topic` | +| `app_log_warn_total` | Counter | Total count of logged warnings by topic | `topic` | +| `app_monitoring_readyz` | Gauge | Set to 1 if the node is operational and monitoring api `/readyz` endpoint is returning 200s. Else `/readyz` is returning 500s and this metric is either set to 2 if the beacon node is down, or3 if the beacon node is syncing, or4 if quorum peers are not connected. | | +| `app_peer_name` | Gauge | Constant gauge with label set to the name of the cluster peer | `peer_name` | +| `app_peerinfo_builder_api_enabled` | Gauge | Set to 1 if builder API is enabled on this peer, else 0 if disabled. | `peer` | +| `app_peerinfo_clock_offset_seconds` | Gauge | Peer clock offset in seconds | `peer` | +| `app_peerinfo_git_commit` | Gauge | Constant gauge with git_hash label set to peer`s git commit hash. | `peer, git_hash` | +| `app_peerinfo_index` | Gauge | Constant gauge set to the peer index in the cluster definition | `peer` | +| `app_peerinfo_nickname` | Gauge | Constant gauge with nickname label set to peer`s charon nickname. | `peer, peer_nickname` | +| `app_peerinfo_start_time_secs` | Gauge | Constant gauge set to the peer start time of the binary in unix seconds | `peer` | +| `app_peerinfo_version` | Gauge | Constant gauge with version label set to peer`s charon version. | `peer, version` | +| `app_peerinfo_version_support` | Gauge | Set to 1 if the peer`s version is supported by (compatible with) the current version, else 0 if unsupported. | `peer` | +| `app_start_time_secs` | Gauge | Gauge set to the app start time of the binary in unix seconds | | +| `app_validator_stack_params` | Gauge | Parameters for each component of the validator stack in which this Charon instance is deployed into | `component, cli_parameters` | +| `app_version` | Gauge | Constant gauge with label set to current app version | `version` | +| `cluster_network` | Gauge | Constant gauge with label set to the current network (chain) | `network` | +| `cluster_operators` | Gauge | Number of operators in the cluster lock | | +| `cluster_threshold` | Gauge | Aggregation threshold in the cluster lock | | +| `cluster_validators` | Gauge | Number of validators in the cluster lock | | +| `core_bcast_broadcast_delay_seconds` | Histogram | Duty broadcast delay since the expected duty submission in seconds by type | `duty` | +| `core_bcast_broadcast_total` | Counter | The total count of successfully broadcast duties by type | `duty` | +| `core_consensus_decided_leader_index` | Gauge | Index of the decided leader by protocol and duty | `protocol, duty` | +| `core_consensus_decided_rounds` | Gauge | Number of decided rounds by protocol, duty, and timer | `protocol, duty, timer` | +| `core_consensus_duration_seconds` | Histogram | Duration of the consensus process by protocol, duty, and timer | `protocol, duty, timer` | +| `core_consensus_error_total` | Counter | Total count of consensus errors by protocol | `protocol` | +| `core_consensus_timeout_total` | Counter | Total count of consensus timeouts by protocol, duty, and timer | `protocol, duty, timer` | +| `core_fetcher_proposal_blinded` | Gauge | Whether the fetched proposal was blinded (1) or local (2) | | +| `core_parsigdb_exit_total` | Counter | Total number of partially signed voluntary exits per public key | `pubkey` | +| `core_parsigdb_store` | Histogram | Latency of partial signatures received since earliest expected time, per duty, per peer index | `duty, peer_idx` | +| `core_scheduler_current_epoch` | Gauge | The current epoch | | +| `core_scheduler_current_slot` | Gauge | The current slot | | +| `core_scheduler_duty_total` | Counter | The total count of duties scheduled by type | `duty` | +| `core_scheduler_skipped_slots_total` | Counter | Total number times slots were skipped | | +| `core_scheduler_submit_registration_errors_total` | Counter | The total count of failed submit registration requests | | +| `core_scheduler_submit_registration_total` | Counter | The total number of submit registration requests | | +| `core_scheduler_validator_balance_gwei` | Gauge | Total balance of a validator by public key | `pubkey_full, pubkey` | +| `core_scheduler_validator_status` | Gauge | Gauge with validator pubkey and status as labels, value=1 is current status, value=0 is previous. | `pubkey_full, pubkey, status` | +| `core_scheduler_validators_active` | Gauge | Number of active validators | | +| `core_tracker_attestation_expect_total` | Counter | Total number of expected attestations for the slot (counts individual attestations, not duties) | | +| `core_tracker_attestation_success_total` | Counter | Total number of successful attestations for the slot (counts individual attestations, not duties) | | +| `core_tracker_expect_duties_total` | Counter | Total number of expected duties (failed + success) by type | `duty` | +| `core_tracker_failed_duties_total` | Counter | Total number of failed duties by type | `duty` | +| `core_tracker_failed_duty_reasons_total` | Counter | Total number of failed duties by type and reason code | `duty, reason` | +| `core_tracker_inclusion_delay` | Gauge | Cluster`s average attestation inclusion delay in slots. Available only when attestation_inclusion feature flag is enabled. | | +| `core_tracker_inclusion_missed_total` | Counter | Total number of broadcast duties never included in any block by type | `duty` | +| `core_tracker_inconsistent_parsigs_total` | Counter | Total number of duties that contained inconsistent partial signed data by duty type | `duty` | +| `core_tracker_participation` | Gauge | Set to 1 if peer participated successfully for the given duty or else 0 | `duty, peer` | +| `core_tracker_participation_expected_total` | Counter | Total number of expected participations (fail + success) by peer and duty type | `duty, peer` | +| `core_tracker_participation_missed_total` | Counter | Total number of missed participations by peer and duty type | `duty, peer` | +| `core_tracker_participation_success_total` | Counter | Total number of successful participations by peer and duty type | `duty, peer` | +| `core_tracker_participation_total` | Counter | Total number of successful participations by peer and duty type | `duty, peer` | +| `core_tracker_success_duties_total` | Counter | Total number of successful duties by type | `duty` | +| `core_tracker_unexpected_events_total` | Counter | Total number of unexpected events by peer | `peer` | +| `core_validatorapi_proxy_request_latency_seconds` | Histogram | The validatorapi proxy request latencies in seconds by path | `path` | +| `core_validatorapi_request_error_total` | Counter | The total number of validatorapi request errors | `endpoint, status_code` | +| `core_validatorapi_request_latency_seconds` | Histogram | The validatorapi request latencies in seconds by endpoint | `endpoint` | +| `core_validatorapi_request_total` | Counter | The total number of requests per content-type and endpoint | `endpoint, content_type` | +| `core_validatorapi_vc_user_agent` | Gauge | Gauge with label set to user agent string of requests made by VC | `user_agent` | +| `p2p_peer_connection_total` | Counter | Total number of libp2p connections per peer. | `peer` | +| `p2p_peer_connection_types` | Gauge | Current number of libp2p connections by peer, type (`direct` or `relay`), and protocol (`tcp`, `quic`). Note that peers may have multiple connections. | `peer, type, protocol` | +| `p2p_peer_network_receive_bytes_total` | Counter | Total number of network bytes received from the peer by protocol and transport. Transport is based on first active connection (accurate in steady state). | `peer, protocol, transport` | +| `p2p_peer_network_sent_bytes_total` | Counter | Total number of network bytes sent to the peer by protocol and transport. Transport is based on first active connection (accurate in steady state). | `peer, protocol, transport` | +| `p2p_peer_streams` | Gauge | Current number of libp2p streams by peer, direction (`inbound` or `outbound` or `unknown`), protocol and transport. | `peer, direction, protocol, transport` | +| `p2p_ping_error_total` | Counter | Total number of ping errors per peer | `peer` | +| `p2p_ping_latency_secs` | Histogram | Ping latencies in seconds per peer | `peer` | +| `p2p_ping_success` | Gauge | Whether the last ping was successful (1) or not (0). Can be used as proxy for connected peers | `peer` | +| `p2p_reachability_status` | Gauge | Current libp2p reachability status of this node as detected by autonat: unknown(0), public(1) or private(2). | | +| `p2p_relay_connection_types` | Gauge | Current number of libp2p connections by relay, type (`direct` or `relay`), and protocol (`tcp`, `quic`). Note that peers may have multiple connections. | `peer, type, protocol` | +| `p2p_relay_connections` | Gauge | Connected relays by name | `peer` | +| `relay_p2p_active_connections` | Gauge | Current number of active connections by peer and cluster | `peer, peer_cluster` | +| `relay_p2p_connection_total` | Counter | Total number of new connections by peer and cluster | `peer, peer_cluster` | +| `relay_p2p_network_receive_bytes_total` | Counter | Total number of network bytes received from the peer and cluster | `peer, peer_cluster` | +| `relay_p2p_network_sent_bytes_total` | Counter | Total number of network bytes sent to the peer and cluster | `peer, peer_cluster` | +| `relay_p2p_ping_latency` | Histogram | Ping latency by peer and cluster | `peer, peer_cluster` | diff --git a/go.mod b/go.mod index da380aad2..b0853e717 100644 --- a/go.mod +++ b/go.mod @@ -287,7 +287,7 @@ require ( replace github.com/coinbase/kryptology => github.com/ObolNetwork/kryptology v0.1.0 // We're replacing go-eth2-client with a branch off our fork. The branch is kept up to date with the latest attestantio versions. -replace github.com/attestantio/go-eth2-client => github.com/ObolNetwork/go-eth2-client v0.28.0-obol //nolint +replace github.com/attestantio/go-eth2-client => github.com/ObolNetwork/go-eth2-client v0.28.0-obol.1 //nolint tool ( github.com/bufbuild/buf/cmd/buf diff --git a/go.sum b/go.sum index 79114ed9d..9fe25117f 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,8 @@ github.com/DataDog/zstd v1.5.7 h1:ybO8RBeh29qrxIhCA9E8gKY6xfONU9T6G6aP9DTKfLE= github.com/DataDog/zstd v1.5.7/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/ObolNetwork/go-eth2-client v0.28.0-obol h1:3lFBuNmaxBI9fLDf+oza1p7VOmsECKaT6sx0EoFeAOk= -github.com/ObolNetwork/go-eth2-client v0.28.0-obol/go.mod h1:PO9sHFCq+1RiG+Eh3eOR2GYvYV64Qzg7idM3kLgCs5k= +github.com/ObolNetwork/go-eth2-client v0.28.0-obol.1 h1:72NAvJRe09mKHiKfB30r9nO7JZnV/5bPx5J1qxZ5Yow= +github.com/ObolNetwork/go-eth2-client v0.28.0-obol.1/go.mod h1:PO9sHFCq+1RiG+Eh3eOR2GYvYV64Qzg7idM3kLgCs5k= github.com/ObolNetwork/kryptology v0.1.0 h1:AhoG4My70+xMhEJSpVaJay/t+T/vIUNHQYLjsDJHulI= github.com/ObolNetwork/kryptology v0.1.0/go.mod h1:/Wl7Js2f676GyXZDTaojf/O+l0fxFPWudbyjdFhkpSA= github.com/OffchainLabs/go-bitfield v0.0.0-20251031151322-f427d04d8506 h1:d/SJkN8/9Ca+1YmuDiUJxAiV4w/a9S8NcsG7GMQSrVI= diff --git a/testutil/beaconmock/beaconmock.go b/testutil/beaconmock/beaconmock.go index 1afa8015a..7341137e9 100644 --- a/testutil/beaconmock/beaconmock.go +++ b/testutil/beaconmock/beaconmock.go @@ -508,6 +508,16 @@ func (m Mock) ClientForAddress(_ string) eth2wrap.Client { return m } +// NodeIdentity returns a mock node identity. +func (Mock) NodeIdentity(_ context.Context, _ *eth2api.NodeIdentityOpts) (*eth2api.Response[*eth2v1.NodeIdentity], error) { + return ð2api.Response[*eth2v1.NodeIdentity]{ + Data: ð2v1.NodeIdentity{ + PeerID: "16Uiu2HAm1234567890abcdefghijklmnopqrstuvwxyz", + }, + Metadata: make(map[string]any), + }, nil +} + func (m Mock) Close() error { m.headProducer.Close()