@lodestar/beacon-node 1.30.0-dev.3856b8b00a → 1.30.0-dev.3ebe983765
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/impl/beacon/blocks/index.d.ts +1 -1
- package/lib/api/impl/beacon/blocks/index.js +2 -4
- package/lib/api/impl/beacon/blocks/index.js.map +1 -1
- package/lib/api/impl/beacon/pool/index.js +1 -1
- package/lib/api/impl/beacon/pool/index.js.map +1 -1
- package/lib/api/impl/beacon/state/index.js +9 -14
- package/lib/api/impl/beacon/state/index.js.map +1 -1
- package/lib/api/impl/lodestar/index.js.map +1 -1
- package/lib/api/impl/proof/index.js +2 -4
- package/lib/api/impl/proof/index.js.map +1 -1
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/chain/archiveStore/archiveStore.d.ts +1 -0
- package/lib/chain/archiveStore/archiveStore.js +13 -14
- package/lib/chain/archiveStore/archiveStore.js.map +1 -1
- package/lib/chain/archiveStore/historicalState/worker.js +2 -0
- package/lib/chain/archiveStore/historicalState/worker.js.map +1 -1
- package/lib/chain/archiveStore/interface.d.ts +0 -1
- package/lib/chain/beaconProposerCache.d.ts +3 -1
- package/lib/chain/beaconProposerCache.js +2 -1
- package/lib/chain/beaconProposerCache.js.map +1 -1
- package/lib/chain/bls/multithread/index.d.ts +1 -1
- package/lib/chain/bls/multithread/index.js +1 -1
- package/lib/chain/bls/multithread/index.js.map +1 -1
- package/lib/chain/bls/multithread/jobItem.d.ts +1 -1
- package/lib/chain/bls/multithread/jobItem.js +12 -4
- package/lib/chain/bls/multithread/jobItem.js.map +1 -1
- package/lib/chain/chain.js +6 -4
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/options.js +0 -1
- package/lib/chain/options.js.map +1 -1
- package/lib/chain/regen/queued.d.ts +1 -0
- package/lib/chain/regen/queued.js +1 -0
- package/lib/chain/regen/queued.js.map +1 -1
- package/lib/chain/seenCache/seenAttestationData.js.map +1 -1
- package/lib/chain/seenCache/seenGossipBlockInput.js.map +1 -1
- package/lib/chain/validatorMonitor.d.ts +3 -3
- package/lib/chain/validatorMonitor.js +56 -273
- package/lib/chain/validatorMonitor.js.map +1 -1
- package/lib/execution/engine/payloadIdCache.d.ts +3 -0
- package/lib/execution/engine/payloadIdCache.js +2 -1
- package/lib/execution/engine/payloadIdCache.js.map +1 -1
- package/lib/metrics/metrics/lodestar.d.ts +68 -4
- package/lib/metrics/metrics/lodestar.js +215 -5
- package/lib/metrics/metrics/lodestar.js.map +1 -1
- package/lib/network/core/networkCore.d.ts +1 -2
- package/lib/network/core/networkCore.js +16 -3
- package/lib/network/core/networkCore.js.map +1 -1
- package/lib/network/core/networkCoreWorkerHandler.d.ts +4 -6
- package/lib/network/core/networkCoreWorkerHandler.js.map +1 -1
- package/lib/network/core/types.d.ts +1 -1
- package/lib/network/network.d.ts +1 -0
- package/lib/network/network.js +1 -0
- package/lib/network/network.js.map +1 -1
- package/lib/network/peers/discover.d.ts +4 -0
- package/lib/network/peers/discover.js +3 -1
- package/lib/network/peers/discover.js.map +1 -1
- package/lib/network/peers/peerManager.js +1 -0
- package/lib/network/peers/peerManager.js.map +1 -1
- package/lib/network/peers/score/interface.d.ts +1 -1
- package/lib/network/peers/score/interface.js.map +1 -1
- package/lib/network/peers/score/store.d.ts +1 -2
- package/lib/network/peers/score/store.js +1 -1
- package/lib/network/peers/score/store.js.map +1 -1
- package/lib/network/processor/gossipHandlers.js +1 -3
- package/lib/network/processor/gossipHandlers.js.map +1 -1
- package/lib/network/processor/index.d.ts +1 -1
- package/lib/network/processor/index.js.map +1 -1
- package/lib/node/nodejs.js +1 -1
- package/lib/node/nodejs.js.map +1 -1
- package/package.json +15 -15
- package/lib/chain/blocks/blockInput/blockInput.d.ts +0 -164
- package/lib/chain/blocks/blockInput/blockInput.js +0 -522
- package/lib/chain/blocks/blockInput/blockInput.js.map +0 -1
- package/lib/chain/blocks/blockInput/errors.d.ts +0 -38
- package/lib/chain/blocks/blockInput/errors.js +0 -17
- package/lib/chain/blocks/blockInput/errors.js.map +0 -1
- package/lib/chain/blocks/blockInput/index.d.ts +0 -4
- package/lib/chain/blocks/blockInput/index.js +0 -4
- package/lib/chain/blocks/blockInput/index.js.map +0 -1
- package/lib/chain/blocks/blockInput/types.d.ts +0 -116
- package/lib/chain/blocks/blockInput/types.js +0 -19
- package/lib/chain/blocks/blockInput/types.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seenGossipBlockInput.js","sourceRoot":"","sources":["../../../src/chain/seenCache/seenGossipBlockInput.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"seenGossipBlockInput.js","sourceRoot":"","sources":["../../../src/chain/seenCache/seenGossipBlockInput.ts"],"names":[],"mappings":"AACA,OAAO,EAAmC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAoC,GAAG,EAAC,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAIzD,OAAO,EACL,WAAW,EAGX,WAAW,EAEX,iBAAiB,EAEjB,aAAa,EACb,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAN,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,iDAAiB,CAAA;IACjB,6DAA6B,CAAA;AAC/B,CAAC,EAHW,4BAA4B,KAA5B,4BAA4B,QAGvC;AAeD,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEhC;;;;;;;;;;GAUG;AACH,MAAM,OAAO,oBAAoB;IAAjC;QACU,oBAAe,GAAG,IAAI,GAAG,EAAgC,CAAC;IAwHpE,CAAC;IAtHC,KAAK;QACH,aAAa,CAAC,IAAI,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAAC;IAC7D,CAAC;IAED,QAAQ,CAAC,SAAkB;QACzB,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC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{ BeaconBlock, RootHex, SubnetID, altair, deneb } from "@lodestar/types";
|
|
|
4
4
|
import { Epoch, Slot, ValidatorIndex } from "@lodestar/types";
|
|
5
5
|
import { IndexedAttestation, SignedAggregateAndProof } from "@lodestar/types";
|
|
6
6
|
import { Logger } from "@lodestar/utils";
|
|
7
|
-
import {
|
|
7
|
+
import { Metrics } from "../metrics/index.js";
|
|
8
8
|
type Seconds = number;
|
|
9
9
|
export declare enum OpSource {
|
|
10
10
|
api = "api",
|
|
@@ -14,7 +14,7 @@ export type ValidatorMonitor = {
|
|
|
14
14
|
registerLocalValidator(index: number): void;
|
|
15
15
|
registerLocalValidatorInSyncCommittee(index: number, untilEpoch: Epoch): void;
|
|
16
16
|
registerValidatorStatuses(currentEpoch: Epoch, inclusionDelays: number[], flags: number[], isActiveCurrEpoch: boolean[], isActivePrevEpoch: boolean[], balances?: number[]): void;
|
|
17
|
-
registerBeaconBlock(src: OpSource,
|
|
17
|
+
registerBeaconBlock(src: OpSource, seenTimestampSec: Seconds, block: BeaconBlock): void;
|
|
18
18
|
registerBlobSidecar(src: OpSource, seenTimestampSec: Seconds, blob: deneb.BlobSidecar): void;
|
|
19
19
|
registerImportedBlock(block: BeaconBlock, data: {
|
|
20
20
|
proposerBalanceDelta: number;
|
|
@@ -34,7 +34,7 @@ export type ValidatorMonitorOpts = {
|
|
|
34
34
|
validatorMonitorLogs?: boolean;
|
|
35
35
|
};
|
|
36
36
|
export declare const defaultValidatorMonitorOpts: ValidatorMonitorOpts;
|
|
37
|
-
export declare function createValidatorMonitor(
|
|
37
|
+
export declare function createValidatorMonitor(metrics: Metrics | null, config: ChainForkConfig, genesisTime: number, logger: Logger, opts: ValidatorMonitorOpts): ValidatorMonitor;
|
|
38
38
|
/**
|
|
39
39
|
* Cache to prevent accessing the state tree to fetch block roots repeteadly.
|
|
40
40
|
* In normal network conditions the same root is read multiple times, specially the target.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ForkSeq, INTERVALS_PER_SLOT, MIN_ATTESTATION_INCLUSION_DELAY, SLOTS_PER_EPOCH } from "@lodestar/params";
|
|
2
|
-
import { computeEpochAtSlot, computeStartSlotAtEpoch, getBlockRootAtSlot,
|
|
2
|
+
import { computeEpochAtSlot, computeStartSlotAtEpoch, getBlockRootAtSlot, parseAttesterFlags, parseParticipationFlags, } from "@lodestar/state-transition";
|
|
3
3
|
import { LogLevel, MapDef, MapDefMax, toRootHex } from "@lodestar/utils";
|
|
4
4
|
import { GENESIS_SLOT } from "../constants/constants.js";
|
|
5
5
|
/** The validator monitor collects per-epoch data about each monitored validator.
|
|
@@ -68,7 +68,7 @@ function getEpochSummary(validator, epoch) {
|
|
|
68
68
|
}
|
|
69
69
|
return summary;
|
|
70
70
|
}
|
|
71
|
-
export function createValidatorMonitor(
|
|
71
|
+
export function createValidatorMonitor(metrics, config, genesisTime, logger, opts) {
|
|
72
72
|
const logLevel = opts.validatorMonitorLogs ? LogLevel.info : LogLevel.debug;
|
|
73
73
|
const log = (message, context) => {
|
|
74
74
|
logger[logLevel](message, context);
|
|
@@ -86,8 +86,7 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
86
86
|
lastRegisteredTimeMs: 0,
|
|
87
87
|
}));
|
|
88
88
|
let lastRegisteredStatusEpoch = -1;
|
|
89
|
-
|
|
90
|
-
const validatorMonitor = {
|
|
89
|
+
return {
|
|
91
90
|
registerLocalValidator(index) {
|
|
92
91
|
validators.getOrDefault(index).lastRegisteredTimeMs = Date.now();
|
|
93
92
|
},
|
|
@@ -116,31 +115,31 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
116
115
|
// statuses.
|
|
117
116
|
const summary = statusToSummary(inclusionDelays[index], flags[index], isActiveCurrEpoch[index], isActiveInPrevEpoch[index]);
|
|
118
117
|
if (summary.isPrevSourceAttester) {
|
|
119
|
-
|
|
118
|
+
metrics?.validatorMonitor.prevEpochOnChainSourceAttesterHit.inc();
|
|
120
119
|
}
|
|
121
120
|
else {
|
|
122
|
-
|
|
121
|
+
metrics?.validatorMonitor.prevEpochOnChainSourceAttesterMiss.inc();
|
|
123
122
|
}
|
|
124
123
|
if (summary.isPrevHeadAttester) {
|
|
125
|
-
|
|
124
|
+
metrics?.validatorMonitor.prevEpochOnChainHeadAttesterHit.inc();
|
|
126
125
|
}
|
|
127
126
|
else {
|
|
128
|
-
|
|
127
|
+
metrics?.validatorMonitor.prevEpochOnChainHeadAttesterMiss.inc();
|
|
129
128
|
}
|
|
130
129
|
if (summary.isPrevTargetAttester) {
|
|
131
|
-
|
|
130
|
+
metrics?.validatorMonitor.prevEpochOnChainTargetAttesterHit.inc();
|
|
132
131
|
}
|
|
133
132
|
else {
|
|
134
|
-
|
|
133
|
+
metrics?.validatorMonitor.prevEpochOnChainTargetAttesterMiss.inc();
|
|
135
134
|
}
|
|
136
135
|
const prevEpochSummary = monitoredValidator.summaries.get(previousEpoch);
|
|
137
136
|
const attestationCorrectHead = prevEpochSummary?.attestationCorrectHead;
|
|
138
137
|
if (attestationCorrectHead !== null && attestationCorrectHead !== undefined) {
|
|
139
138
|
if (attestationCorrectHead) {
|
|
140
|
-
|
|
139
|
+
metrics?.validatorMonitor.prevOnChainAttesterCorrectHead.inc();
|
|
141
140
|
}
|
|
142
141
|
else {
|
|
143
|
-
|
|
142
|
+
metrics?.validatorMonitor.prevOnChainAttesterIncorrectHead.inc();
|
|
144
143
|
}
|
|
145
144
|
}
|
|
146
145
|
const attestationMinBlockInclusionDistance = prevEpochSummary?.attestationMinBlockInclusionDistance;
|
|
@@ -152,15 +151,15 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
152
151
|
summary.inclusionDistance
|
|
153
152
|
: null;
|
|
154
153
|
if (inclusionDistance !== null) {
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
metrics?.validatorMonitor.prevEpochOnChainInclusionDistance.observe(inclusionDistance);
|
|
155
|
+
metrics?.validatorMonitor.prevEpochOnChainAttesterHit.inc();
|
|
157
156
|
}
|
|
158
157
|
else {
|
|
159
|
-
|
|
158
|
+
metrics?.validatorMonitor.prevEpochOnChainAttesterMiss.inc();
|
|
160
159
|
}
|
|
161
160
|
const balance = balances?.[index];
|
|
162
161
|
if (balance !== undefined) {
|
|
163
|
-
|
|
162
|
+
metrics?.validatorMonitor.prevEpochOnChainBalance.set({ index }, balance);
|
|
164
163
|
}
|
|
165
164
|
if (!summary.isPrevSourceAttester || !summary.isPrevTargetAttester || !summary.isPrevHeadAttester) {
|
|
166
165
|
log("Failed attestation in previous epoch", {
|
|
@@ -175,12 +174,14 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
175
174
|
}
|
|
176
175
|
}
|
|
177
176
|
},
|
|
178
|
-
registerBeaconBlock(src,
|
|
177
|
+
registerBeaconBlock(src, seenTimestampSec, block) {
|
|
179
178
|
const validator = validators.get(block.proposerIndex);
|
|
180
179
|
// Returns the delay between the start of `block.slot` and `seenTimestamp`.
|
|
180
|
+
const delaySec = seenTimestampSec - (genesisTime + block.slot * config.SECONDS_PER_SLOT);
|
|
181
|
+
metrics?.gossipBlock.elapsedTimeTillReceived.observe(delaySec);
|
|
181
182
|
if (validator) {
|
|
182
|
-
|
|
183
|
-
|
|
183
|
+
metrics?.validatorMonitor.beaconBlockTotal.inc({ src });
|
|
184
|
+
metrics?.validatorMonitor.beaconBlockDelaySeconds.observe({ src }, delaySec);
|
|
184
185
|
const summary = getEpochSummary(validator, computeEpochAtSlot(block.slot));
|
|
185
186
|
summary.blockProposals.push({
|
|
186
187
|
blockRoot: toRootHex(config.getForkTypes(block.slot).BeaconBlock.hashTreeRoot(block)),
|
|
@@ -196,7 +197,7 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
196
197
|
registerImportedBlock(block, { proposerBalanceDelta }) {
|
|
197
198
|
const validator = validators.get(block.proposerIndex);
|
|
198
199
|
if (validator) {
|
|
199
|
-
|
|
200
|
+
metrics?.validatorMonitor.proposerBalanceDeltaKnown.observe(proposerBalanceDelta);
|
|
200
201
|
// There should be alredy a summary for the block. Could be missing when using one VC multiple BNs
|
|
201
202
|
const summary = getEpochSummary(validator, computeEpochAtSlot(block.slot));
|
|
202
203
|
const proposal = summary.blockProposals.find((p) => p.blockSlot === block.slot);
|
|
@@ -220,8 +221,8 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
220
221
|
for (const index of indexedAttestation.attestingIndices) {
|
|
221
222
|
const validator = validators.get(index);
|
|
222
223
|
if (validator) {
|
|
223
|
-
|
|
224
|
-
|
|
224
|
+
metrics?.validatorMonitor.unaggregatedAttestationSubmittedSentPeers.observe(sentPeers);
|
|
225
|
+
metrics?.validatorMonitor.unaggregatedAttestationDelaySeconds.observe({ src: OpSource.api }, delaySec);
|
|
225
226
|
log("Published unaggregated attestation", {
|
|
226
227
|
validator: index,
|
|
227
228
|
slot: data.slot,
|
|
@@ -249,8 +250,8 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
249
250
|
for (const index of indexedAttestation.attestingIndices) {
|
|
250
251
|
const validator = validators.get(index);
|
|
251
252
|
if (validator) {
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
metrics?.validatorMonitor.unaggregatedAttestationTotal.inc({ src });
|
|
254
|
+
metrics?.validatorMonitor.unaggregatedAttestationDelaySeconds.observe({ src }, delaySec);
|
|
254
255
|
const summary = getEpochSummary(validator, epoch);
|
|
255
256
|
summary.attestations += 1;
|
|
256
257
|
summary.attestationMinDelay = Math.min(delaySec, summary.attestationMinDelay ?? Infinity);
|
|
@@ -264,7 +265,7 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
264
265
|
for (const index of indexedAttestation.attestingIndices) {
|
|
265
266
|
const validator = validators.get(index);
|
|
266
267
|
if (validator) {
|
|
267
|
-
|
|
268
|
+
metrics?.validatorMonitor.aggregatedAttestationDelaySeconds.observe({ src: OpSource.api }, delaySec);
|
|
268
269
|
log("Published aggregated attestation", {
|
|
269
270
|
validator: index,
|
|
270
271
|
slot: data.slot,
|
|
@@ -288,8 +289,8 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
288
289
|
const aggregatorIndex = signedAggregateAndProof.message.aggregatorIndex;
|
|
289
290
|
const validatorAggregator = validators.get(aggregatorIndex);
|
|
290
291
|
if (validatorAggregator) {
|
|
291
|
-
|
|
292
|
-
|
|
292
|
+
metrics?.validatorMonitor.aggregatedAttestationTotal.inc({ src });
|
|
293
|
+
metrics?.validatorMonitor.aggregatedAttestationDelaySeconds.observe({ src }, delaySec);
|
|
293
294
|
const summary = getEpochSummary(validatorAggregator, epoch);
|
|
294
295
|
summary.aggregates += 1;
|
|
295
296
|
summary.aggregateMinDelay = Math.min(delaySec, summary.aggregateMinDelay ?? Infinity);
|
|
@@ -297,8 +298,8 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
297
298
|
for (const index of indexedAttestation.attestingIndices) {
|
|
298
299
|
const validator = validators.get(index);
|
|
299
300
|
if (validator) {
|
|
300
|
-
|
|
301
|
-
|
|
301
|
+
metrics?.validatorMonitor.attestationInAggregateTotal.inc({ src });
|
|
302
|
+
metrics?.validatorMonitor.attestationInAggregateDelaySeconds.observe({ src }, delaySec);
|
|
302
303
|
const summary = getEpochSummary(validator, epoch);
|
|
303
304
|
summary.attestationAggregateInclusions += 1;
|
|
304
305
|
log("Attestation is included in aggregate", {
|
|
@@ -325,9 +326,9 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
325
326
|
for (const index of indexedAttestation.attestingIndices) {
|
|
326
327
|
const validator = validators.get(index);
|
|
327
328
|
if (validator) {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
metrics?.validatorMonitor.attestationInBlockTotal.inc();
|
|
330
|
+
metrics?.validatorMonitor.attestationInBlockDelaySlots.observe(delay);
|
|
331
|
+
metrics?.validatorMonitor.attestationInBlockParticipants.observe(participants);
|
|
331
332
|
const summary = getEpochSummary(validator, epoch);
|
|
332
333
|
summary.attestationBlockInclusions += 1;
|
|
333
334
|
if (summary.attestationMinBlockInclusionDistance !== null) {
|
|
@@ -363,7 +364,7 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
363
364
|
for (const index of syncCommitteeParticipantIndices) {
|
|
364
365
|
const validator = validators.get(index);
|
|
365
366
|
if (validator) {
|
|
366
|
-
|
|
367
|
+
metrics?.validatorMonitor.syncSignatureInAggregateTotal.inc();
|
|
367
368
|
const summary = getEpochSummary(validator, epoch);
|
|
368
369
|
summary.syncSignatureAggregateInclusions += 1;
|
|
369
370
|
}
|
|
@@ -415,7 +416,7 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
415
416
|
const flags = parseParticipationFlags(previousEpochParticipation.get(index));
|
|
416
417
|
const attestationSummary = validator.attestations.get(prevEpoch)?.get(prevEpochTargetRoot);
|
|
417
418
|
const summary = renderAttestationSummary(config, rootCache, attestationSummary, flags);
|
|
418
|
-
|
|
419
|
+
metrics?.validatorMonitor.prevEpochAttestationSummary.inc({ summary });
|
|
419
420
|
log("Previous epoch attestation", {
|
|
420
421
|
validator: index,
|
|
421
422
|
epoch: prevEpoch,
|
|
@@ -432,7 +433,7 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
432
433
|
const epochSummary = validator.summaries.get(prevEpoch);
|
|
433
434
|
const proposalSlot = SLOTS_PER_EPOCH * prevEpoch + slotIndex;
|
|
434
435
|
const summary = renderBlockProposalSummary(config, rootCache, epochSummary, proposalSlot);
|
|
435
|
-
|
|
436
|
+
metrics?.validatorMonitor.prevEpochBlockProposalSummary.inc({ summary });
|
|
436
437
|
log("Previous epoch block proposal", {
|
|
437
438
|
validator: validatorIndex,
|
|
438
439
|
slot: proposalSlot,
|
|
@@ -448,7 +449,7 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
448
449
|
* Should be called whenever Prometheus is scraping.
|
|
449
450
|
*/
|
|
450
451
|
scrapeMetrics(slotClock) {
|
|
451
|
-
|
|
452
|
+
metrics?.validatorMonitor.validatorsConnected.set(validators.size);
|
|
452
453
|
const epoch = computeEpochAtSlot(slotClock);
|
|
453
454
|
const slotInEpoch = slotClock % SLOTS_PER_EPOCH;
|
|
454
455
|
// Only start to report on the current epoch once we've progressed past the point where
|
|
@@ -462,12 +463,12 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
462
463
|
// skip slots on mainnet.
|
|
463
464
|
const previousEpoch = slotInEpoch > MIN_ATTESTATION_INCLUSION_DELAY + 3 ? epoch - 1 : epoch - 2;
|
|
464
465
|
// reset() to mimic the behaviour of an aggregated .set({index})
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
466
|
+
metrics?.validatorMonitor.prevEpochAttestations.reset();
|
|
467
|
+
metrics?.validatorMonitor.prevEpochAttestationsMinDelaySeconds.reset();
|
|
468
|
+
metrics?.validatorMonitor.prevEpochAttestationAggregateInclusions.reset();
|
|
469
|
+
metrics?.validatorMonitor.prevEpochAttestationBlockInclusions.reset();
|
|
470
|
+
metrics?.validatorMonitor.prevEpochAttestationBlockMinInclusionDistance.reset();
|
|
471
|
+
metrics?.validatorMonitor.prevEpochSyncSignatureAggregateInclusions.reset();
|
|
471
472
|
let validatorsInSyncCommittee = 0;
|
|
472
473
|
let prevEpochSyncCommitteeHits = 0;
|
|
473
474
|
let prevEpochSyncCommitteeMisses = 0;
|
|
@@ -483,41 +484,35 @@ export function createValidatorMonitor(metricsRegister, config, genesisTime, log
|
|
|
483
484
|
continue;
|
|
484
485
|
}
|
|
485
486
|
// Attestations
|
|
486
|
-
|
|
487
|
+
metrics?.validatorMonitor.prevEpochAttestations.observe(summary.attestations);
|
|
487
488
|
if (summary.attestationMinDelay !== null)
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
489
|
+
metrics?.validatorMonitor.prevEpochAttestationsMinDelaySeconds.observe(summary.attestationMinDelay);
|
|
490
|
+
metrics?.validatorMonitor.prevEpochAttestationAggregateInclusions.observe(summary.attestationAggregateInclusions);
|
|
491
|
+
metrics?.validatorMonitor.prevEpochAttestationBlockInclusions.observe(summary.attestationBlockInclusions);
|
|
491
492
|
if (summary.attestationMinBlockInclusionDistance !== null) {
|
|
492
|
-
|
|
493
|
+
metrics?.validatorMonitor.prevEpochAttestationBlockMinInclusionDistance.observe(summary.attestationMinBlockInclusionDistance);
|
|
493
494
|
}
|
|
494
495
|
// Blocks
|
|
495
|
-
|
|
496
|
+
metrics?.validatorMonitor.prevEpochBeaconBlocks.observe(summary.blocks);
|
|
496
497
|
if (summary.blockMinDelay !== null)
|
|
497
|
-
|
|
498
|
+
metrics?.validatorMonitor.prevEpochBeaconBlocksMinDelaySeconds.observe(summary.blockMinDelay);
|
|
498
499
|
// Aggregates
|
|
499
|
-
|
|
500
|
+
metrics?.validatorMonitor.prevEpochAggregatesTotal.observe(summary.aggregates);
|
|
500
501
|
if (summary.aggregateMinDelay !== null)
|
|
501
|
-
|
|
502
|
+
metrics?.validatorMonitor.prevEpochAggregatesMinDelaySeconds.observe(summary.aggregateMinDelay);
|
|
502
503
|
// Sync committee
|
|
503
504
|
prevEpochSyncCommitteeHits += summary.syncCommitteeHits;
|
|
504
505
|
prevEpochSyncCommitteeMisses += summary.syncCommitteeMisses;
|
|
505
506
|
// Only observe if included in sync committee to prevent distorting metrics
|
|
506
507
|
if (validatorInSyncCommittee) {
|
|
507
|
-
|
|
508
|
+
metrics?.validatorMonitor.prevEpochSyncSignatureAggregateInclusions.observe(summary.syncSignatureAggregateInclusions);
|
|
508
509
|
}
|
|
509
510
|
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
511
|
+
metrics?.validatorMonitor.validatorsInSyncCommittee.set(validatorsInSyncCommittee);
|
|
512
|
+
metrics?.validatorMonitor.prevEpochSyncCommitteeHits.set(prevEpochSyncCommitteeHits);
|
|
513
|
+
metrics?.validatorMonitor.prevEpochSyncCommitteeMisses.set(prevEpochSyncCommitteeMisses);
|
|
513
514
|
},
|
|
514
515
|
};
|
|
515
|
-
// Register a single collect() function to run all validatorMonitor metrics
|
|
516
|
-
validatorMonitorMetrics?.validatorsConnected.addCollect(() => {
|
|
517
|
-
const clockSlot = getCurrentSlot(config, genesisTime);
|
|
518
|
-
validatorMonitor.scrapeMetrics(clockSlot);
|
|
519
|
-
});
|
|
520
|
-
return validatorMonitor;
|
|
521
516
|
}
|
|
522
517
|
/**
|
|
523
518
|
* Best guess to automatically debug why validators do not achieve expected rewards.
|
|
@@ -729,216 +724,4 @@ export class RootHexCache {
|
|
|
729
724
|
return root;
|
|
730
725
|
}
|
|
731
726
|
}
|
|
732
|
-
function createValidatorMonitorMetrics(register) {
|
|
733
|
-
return {
|
|
734
|
-
validatorsConnected: register.gauge({
|
|
735
|
-
name: "validator_monitor_validators",
|
|
736
|
-
help: "Count of validators that are specifically monitored by this beacon node",
|
|
737
|
-
}),
|
|
738
|
-
validatorsInSyncCommittee: register.gauge({
|
|
739
|
-
name: "validator_monitor_validators_in_sync_committee",
|
|
740
|
-
help: "Count of validators monitored by this beacon node that are part of sync committee",
|
|
741
|
-
}),
|
|
742
|
-
// Validator Monitor Metrics (per-epoch summaries)
|
|
743
|
-
// Only track prevEpochOnChainBalance per index
|
|
744
|
-
prevEpochOnChainBalance: register.gauge({
|
|
745
|
-
name: "validator_monitor_prev_epoch_on_chain_balance",
|
|
746
|
-
help: "Balance of validator after an epoch",
|
|
747
|
-
labelNames: ["index"],
|
|
748
|
-
}),
|
|
749
|
-
prevEpochOnChainAttesterHit: register.gauge({
|
|
750
|
-
name: "validator_monitor_prev_epoch_on_chain_attester_hit_total",
|
|
751
|
-
help: "Incremented if validator's submitted attestation is included in some blocks",
|
|
752
|
-
}),
|
|
753
|
-
prevEpochOnChainAttesterMiss: register.gauge({
|
|
754
|
-
name: "validator_monitor_prev_epoch_on_chain_attester_miss_total",
|
|
755
|
-
help: "Incremented if validator's submitted attestation is not included in any blocks",
|
|
756
|
-
}),
|
|
757
|
-
prevEpochOnChainSourceAttesterHit: register.gauge({
|
|
758
|
-
name: "validator_monitor_prev_epoch_on_chain_source_attester_hit_total",
|
|
759
|
-
help: "Incremented if the validator is flagged as a previous epoch source attester during per epoch processing",
|
|
760
|
-
}),
|
|
761
|
-
prevEpochOnChainSourceAttesterMiss: register.gauge({
|
|
762
|
-
name: "validator_monitor_prev_epoch_on_chain_source_attester_miss_total",
|
|
763
|
-
help: "Incremented if the validator is not flagged as a previous epoch source attester during per epoch processing",
|
|
764
|
-
}),
|
|
765
|
-
prevEpochOnChainHeadAttesterHit: register.gauge({
|
|
766
|
-
name: "validator_monitor_prev_epoch_on_chain_head_attester_hit_total",
|
|
767
|
-
help: "Incremented if the validator is flagged as a previous epoch head attester during per epoch processing",
|
|
768
|
-
}),
|
|
769
|
-
prevEpochOnChainHeadAttesterMiss: register.gauge({
|
|
770
|
-
name: "validator_monitor_prev_epoch_on_chain_head_attester_miss_total",
|
|
771
|
-
help: "Incremented if the validator is not flagged as a previous epoch head attester during per epoch processing",
|
|
772
|
-
}),
|
|
773
|
-
prevOnChainAttesterCorrectHead: register.gauge({
|
|
774
|
-
name: "validator_monitor_prev_epoch_on_chain_attester_correct_head_total",
|
|
775
|
-
help: "Total count of times a validator votes correct head",
|
|
776
|
-
}),
|
|
777
|
-
prevOnChainAttesterIncorrectHead: register.gauge({
|
|
778
|
-
name: "validator_monitor_prev_epoch_on_chain_attester_incorrect_head_total",
|
|
779
|
-
help: "Total count of times a validator votes incorrect head",
|
|
780
|
-
}),
|
|
781
|
-
prevEpochOnChainTargetAttesterHit: register.gauge({
|
|
782
|
-
name: "validator_monitor_prev_epoch_on_chain_target_attester_hit_total",
|
|
783
|
-
help: "Incremented if the validator is flagged as a previous epoch target attester during per epoch processing",
|
|
784
|
-
}),
|
|
785
|
-
prevEpochOnChainTargetAttesterMiss: register.gauge({
|
|
786
|
-
name: "validator_monitor_prev_epoch_on_chain_target_attester_miss_total",
|
|
787
|
-
help: "Incremented if the validator is not flagged as a previous epoch target attester during per epoch processing",
|
|
788
|
-
}),
|
|
789
|
-
prevEpochOnChainInclusionDistance: register.histogram({
|
|
790
|
-
name: "validator_monitor_prev_epoch_on_chain_inclusion_distance",
|
|
791
|
-
help: "The attestation inclusion distance calculated during per epoch processing",
|
|
792
|
-
// min inclusion distance is 1, usual values are 1,2,3 max is 32 (1 epoch)
|
|
793
|
-
buckets: [1, 2, 3, 5, 10, 32],
|
|
794
|
-
}),
|
|
795
|
-
prevEpochAttestations: register.histogram({
|
|
796
|
-
name: "validator_monitor_prev_epoch_attestations",
|
|
797
|
-
help: "The number of unagg. attestations seen in the previous epoch",
|
|
798
|
-
buckets: [0, 1, 2, 3],
|
|
799
|
-
}),
|
|
800
|
-
prevEpochAttestationsMinDelaySeconds: register.histogram({
|
|
801
|
-
name: "validator_monitor_prev_epoch_attestations_min_delay_seconds",
|
|
802
|
-
help: "The min delay between when the validator should send the attestation and when it was received",
|
|
803
|
-
buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
|
|
804
|
-
}),
|
|
805
|
-
prevEpochAttestationAggregateInclusions: register.histogram({
|
|
806
|
-
name: "validator_monitor_prev_epoch_attestation_aggregate_inclusions",
|
|
807
|
-
help: "The count of times an attestation was seen inside an aggregate",
|
|
808
|
-
buckets: [0, 1, 2, 3, 5, 10],
|
|
809
|
-
}),
|
|
810
|
-
prevEpochAttestationBlockInclusions: register.histogram({
|
|
811
|
-
name: "validator_monitor_prev_epoch_attestation_block_inclusions",
|
|
812
|
-
help: "The count of times an attestation was seen inside a block",
|
|
813
|
-
buckets: [0, 1, 2, 3, 5],
|
|
814
|
-
}),
|
|
815
|
-
prevEpochAttestationBlockMinInclusionDistance: register.histogram({
|
|
816
|
-
name: "validator_monitor_prev_epoch_attestation_block_min_inclusion_distance",
|
|
817
|
-
help: "The minimum inclusion distance observed for the inclusion of an attestation in a block",
|
|
818
|
-
buckets: [1, 2, 3, 5, 10, 32],
|
|
819
|
-
}),
|
|
820
|
-
prevEpochBeaconBlocks: register.histogram({
|
|
821
|
-
name: "validator_monitor_prev_epoch_beacon_blocks",
|
|
822
|
-
help: "The number of beacon_blocks seen in the previous epoch",
|
|
823
|
-
buckets: [0, 1, 2, 3, 5, 10],
|
|
824
|
-
}),
|
|
825
|
-
prevEpochBeaconBlocksMinDelaySeconds: register.histogram({
|
|
826
|
-
name: "validator_monitor_prev_epoch_beacon_blocks_min_delay_seconds",
|
|
827
|
-
help: "The min delay between when the validator should send the block and when it was received",
|
|
828
|
-
buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
|
|
829
|
-
}),
|
|
830
|
-
prevEpochAggregatesTotal: register.histogram({
|
|
831
|
-
name: "validator_monitor_prev_epoch_aggregates",
|
|
832
|
-
help: "The number of aggregates seen in the previous epoch",
|
|
833
|
-
buckets: [0, 1, 2, 3, 5, 10],
|
|
834
|
-
}),
|
|
835
|
-
prevEpochAggregatesMinDelaySeconds: register.histogram({
|
|
836
|
-
name: "validator_monitor_prev_epoch_aggregates_min_delay_seconds",
|
|
837
|
-
help: "The min delay between when the validator should send the aggregate and when it was received",
|
|
838
|
-
buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
|
|
839
|
-
}),
|
|
840
|
-
prevEpochSyncCommitteeHits: register.gauge({
|
|
841
|
-
name: "validator_monitor_prev_epoch_sync_committee_hits",
|
|
842
|
-
help: "Count of times in prev epoch connected validators participated in imported block's syncAggregate",
|
|
843
|
-
}),
|
|
844
|
-
prevEpochSyncCommitteeMisses: register.gauge({
|
|
845
|
-
name: "validator_monitor_prev_epoch_sync_committee_misses",
|
|
846
|
-
help: "Count of times in prev epoch connected validators fail to participate in imported block's syncAggregate",
|
|
847
|
-
}),
|
|
848
|
-
prevEpochSyncSignatureAggregateInclusions: register.histogram({
|
|
849
|
-
name: "validator_monitor_prev_epoch_sync_signature_aggregate_inclusions",
|
|
850
|
-
help: "The count of times a sync signature was seen inside an aggregate",
|
|
851
|
-
buckets: [0, 1, 2, 3, 5, 10],
|
|
852
|
-
}),
|
|
853
|
-
prevEpochAttestationSummary: register.gauge({
|
|
854
|
-
name: "validator_monitor_prev_epoch_attestation_summary",
|
|
855
|
-
help: "Best guess of the node of the result of previous epoch validators attestation actions and causality",
|
|
856
|
-
labelNames: ["summary"],
|
|
857
|
-
}),
|
|
858
|
-
prevEpochBlockProposalSummary: register.gauge({
|
|
859
|
-
name: "validator_monitor_prev_epoch_block_proposal_summary",
|
|
860
|
-
help: "Best guess of the node of the result of previous epoch validators block proposal actions and causality",
|
|
861
|
-
labelNames: ["summary"],
|
|
862
|
-
}),
|
|
863
|
-
// Validator Monitor Metrics (real-time)
|
|
864
|
-
unaggregatedAttestationTotal: register.gauge({
|
|
865
|
-
name: "validator_monitor_unaggregated_attestation_total",
|
|
866
|
-
help: "Number of unaggregated attestations seen",
|
|
867
|
-
labelNames: ["src"],
|
|
868
|
-
}),
|
|
869
|
-
unaggregatedAttestationDelaySeconds: register.histogram({
|
|
870
|
-
name: "validator_monitor_unaggregated_attestation_delay_seconds",
|
|
871
|
-
help: "The delay between when the validator should send the attestation and when it was received",
|
|
872
|
-
labelNames: ["src"],
|
|
873
|
-
buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
|
|
874
|
-
}),
|
|
875
|
-
unaggregatedAttestationSubmittedSentPeers: register.histogram({
|
|
876
|
-
name: "validator_monitor_unaggregated_attestation_submitted_sent_peers_count",
|
|
877
|
-
help: "Number of peers that an unaggregated attestation sent to",
|
|
878
|
-
// as of Apr 2022, most of the time we sent to >30 peers per attestations
|
|
879
|
-
// these bucket values just base on that fact to get equal range
|
|
880
|
-
// refine if we want more reasonable values
|
|
881
|
-
buckets: [0, 10, 20, 30],
|
|
882
|
-
}),
|
|
883
|
-
aggregatedAttestationTotal: register.gauge({
|
|
884
|
-
name: "validator_monitor_aggregated_attestation_total",
|
|
885
|
-
help: "Number of aggregated attestations seen",
|
|
886
|
-
labelNames: ["src"],
|
|
887
|
-
}),
|
|
888
|
-
aggregatedAttestationDelaySeconds: register.histogram({
|
|
889
|
-
name: "validator_monitor_aggregated_attestation_delay_seconds",
|
|
890
|
-
help: "The delay between then the validator should send the aggregate and when it was received",
|
|
891
|
-
labelNames: ["src"],
|
|
892
|
-
buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
|
|
893
|
-
}),
|
|
894
|
-
attestationInAggregateTotal: register.gauge({
|
|
895
|
-
name: "validator_monitor_attestation_in_aggregate_total",
|
|
896
|
-
help: "Number of times an attestation has been seen in an aggregate",
|
|
897
|
-
labelNames: ["src"],
|
|
898
|
-
}),
|
|
899
|
-
attestationInAggregateDelaySeconds: register.histogram({
|
|
900
|
-
name: "validator_monitor_attestation_in_aggregate_delay_seconds",
|
|
901
|
-
help: "The delay between when the validator should send the aggregate and when it was received",
|
|
902
|
-
labelNames: ["src"],
|
|
903
|
-
buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
|
|
904
|
-
}),
|
|
905
|
-
attestationInBlockTotal: register.gauge({
|
|
906
|
-
name: "validator_monitor_attestation_in_block_total",
|
|
907
|
-
help: "Number of times an attestation has been seen in a block",
|
|
908
|
-
}),
|
|
909
|
-
attestationInBlockDelaySlots: register.histogram({
|
|
910
|
-
name: "validator_monitor_attestation_in_block_delay_slots",
|
|
911
|
-
help: "The excess slots (beyond the minimum delay) between the attestation slot and the block slot",
|
|
912
|
-
buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
|
|
913
|
-
}),
|
|
914
|
-
attestationInBlockParticipants: register.histogram({
|
|
915
|
-
name: "validator_monitor_attestation_in_block_participants",
|
|
916
|
-
help: "The total participants in attestations of monitored validators included in blocks",
|
|
917
|
-
buckets: [1, 5, 20, 50, 100, 200],
|
|
918
|
-
}),
|
|
919
|
-
syncSignatureInAggregateTotal: register.gauge({
|
|
920
|
-
name: "validator_monitor_sync_signature_in_aggregate_total",
|
|
921
|
-
help: "Number of times a sync signature has been seen in an aggregate",
|
|
922
|
-
}),
|
|
923
|
-
beaconBlockTotal: register.gauge({
|
|
924
|
-
name: "validator_monitor_beacon_block_total",
|
|
925
|
-
help: "Total number of beacon blocks seen",
|
|
926
|
-
labelNames: ["src"],
|
|
927
|
-
}),
|
|
928
|
-
beaconBlockDelaySeconds: register.histogram({
|
|
929
|
-
name: "validator_monitor_beacon_block_delay_seconds",
|
|
930
|
-
help: "The delay between when the validator should send the block and when it was received",
|
|
931
|
-
labelNames: ["src"],
|
|
932
|
-
// we also want other nodes to received our published before 4s so add bucket 3 and 3.5
|
|
933
|
-
buckets: [0.1, 0.25, 0.5, 1, 2, 3, 4, 6, 10],
|
|
934
|
-
}),
|
|
935
|
-
// Only for known
|
|
936
|
-
proposerBalanceDeltaKnown: register.histogram({
|
|
937
|
-
name: "validator_monitor_proposer_balance_delta_known_gwei",
|
|
938
|
-
help: "Balance delta of known block proposer after importing a valid block",
|
|
939
|
-
// Jul22 mainnet block reward is consistently between 29,000,000-28,000,000 GWei
|
|
940
|
-
buckets: [10_000, 100_000, 1e6, 10e6, 20e6, 50e6, 100e6, 1000e6],
|
|
941
|
-
}),
|
|
942
|
-
};
|
|
943
|
-
}
|
|
944
727
|
//# sourceMappingURL=validatorMonitor.js.map
|