@lodestar/beacon-node 1.52.0-dev.6ab73fec0a → 1.52.0-dev.a9e15e2b94

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.
Files changed (52) hide show
  1. package/lib/chain/blocks/blockInput/blockInput.d.ts.map +1 -1
  2. package/lib/chain/blocks/blockInput/blockInput.js +3 -1
  3. package/lib/chain/blocks/blockInput/blockInput.js.map +1 -1
  4. package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -1
  5. package/lib/chain/blocks/importExecutionPayload.js +17 -3
  6. package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
  7. package/lib/chain/blocks/verifyBlock.d.ts.map +1 -1
  8. package/lib/chain/blocks/verifyBlock.js +9 -6
  9. package/lib/chain/blocks/verifyBlock.js.map +1 -1
  10. package/lib/chain/blocks/verifyBlocksDataAvailability.d.ts +2 -2
  11. package/lib/chain/blocks/verifyBlocksDataAvailability.d.ts.map +1 -1
  12. package/lib/chain/blocks/verifyBlocksDataAvailability.js +3 -3
  13. package/lib/chain/blocks/verifyBlocksDataAvailability.js.map +1 -1
  14. package/lib/chain/blocks/verifyBlocksExecutionPayloads.d.ts.map +1 -1
  15. package/lib/chain/blocks/verifyBlocksExecutionPayloads.js +7 -5
  16. package/lib/chain/blocks/verifyBlocksExecutionPayloads.js.map +1 -1
  17. package/lib/chain/blocks/verifyPayloadsDataAvailability.d.ts +2 -2
  18. package/lib/chain/blocks/verifyPayloadsDataAvailability.d.ts.map +1 -1
  19. package/lib/chain/blocks/verifyPayloadsDataAvailability.js +3 -3
  20. package/lib/chain/blocks/verifyPayloadsDataAvailability.js.map +1 -1
  21. package/lib/chain/forkChoice/index.d.ts +1 -4
  22. package/lib/chain/forkChoice/index.d.ts.map +1 -1
  23. package/lib/chain/forkChoice/index.js +1 -4
  24. package/lib/chain/forkChoice/index.js.map +1 -1
  25. package/lib/chain/forkChoiceExecutionEngine.d.ts +5 -3
  26. package/lib/chain/forkChoiceExecutionEngine.d.ts.map +1 -1
  27. package/lib/chain/forkChoiceExecutionEngine.js +34 -11
  28. package/lib/chain/forkChoiceExecutionEngine.js.map +1 -1
  29. package/lib/chain/validation/dataColumnSidecar.d.ts.map +1 -1
  30. package/lib/chain/validation/dataColumnSidecar.js +8 -1
  31. package/lib/chain/validation/dataColumnSidecar.js.map +1 -1
  32. package/lib/chain/validatorMonitor.js +43 -43
  33. package/lib/chain/validatorMonitor.js.map +1 -1
  34. package/lib/metrics/metrics/beacon.d.ts +4 -0
  35. package/lib/metrics/metrics/beacon.d.ts.map +1 -1
  36. package/lib/metrics/metrics/beacon.js +11 -2
  37. package/lib/metrics/metrics/beacon.js.map +1 -1
  38. package/lib/metrics/metrics/lodestar.js +28 -28
  39. package/lib/metrics/metrics/lodestar.js.map +1 -1
  40. package/package.json +16 -16
  41. package/src/chain/blocks/blockInput/blockInput.ts +4 -1
  42. package/src/chain/blocks/importExecutionPayload.ts +21 -2
  43. package/src/chain/blocks/verifyBlock.ts +10 -7
  44. package/src/chain/blocks/verifyBlocksDataAvailability.ts +4 -4
  45. package/src/chain/blocks/verifyBlocksExecutionPayloads.ts +7 -4
  46. package/src/chain/blocks/verifyPayloadsDataAvailability.ts +5 -4
  47. package/src/chain/forkChoice/index.ts +1 -4
  48. package/src/chain/forkChoiceExecutionEngine.ts +48 -15
  49. package/src/chain/validation/dataColumnSidecar.ts +7 -1
  50. package/src/chain/validatorMonitor.ts +43 -43
  51. package/src/metrics/metrics/beacon.ts +11 -2
  52. package/src/metrics/metrics/lodestar.ts +28 -28
@@ -1,8 +1,15 @@
1
- import {ExecutionStatus, IForkChoice, LVHInvalidResponse} from "@lodestar/fork-choice";
1
+ import {
2
+ ExecutionStatus,
3
+ IForkChoice,
4
+ LVHInvalidJudged,
5
+ LVHInvalidResponse,
6
+ LVHNotAppliedReason,
7
+ LVHVerdictResult,
8
+ } from "@lodestar/fork-choice";
2
9
  import {ForkName, ForkPostFulu} from "@lodestar/params";
3
10
  import {RootHex, bellatrix} from "@lodestar/types";
4
11
  import {BlobAndProofV2} from "@lodestar/types/fulu";
5
- import {Logger} from "@lodestar/utils";
12
+ import {LogDataBasic, Logger} from "@lodestar/utils";
6
13
  import {ExecutionPayloadBodyV2} from "../execution/engine/types.js";
7
14
  import {DATA} from "../execution/engine/utils.js";
8
15
  import {
@@ -119,18 +126,25 @@ export class ForkChoiceExecutionEngine {
119
126
  }
120
127
 
121
128
  /**
122
- * Apply an execution engine INVALID verdict to fork choice and move the chain head off the invalid chain
129
+ * Apply an execution engine INVALID verdict to fork choice and move the chain head off the invalid chain.
130
+ * `judgedLogCtx` identifies the judged payload in logs when it is not the from node.
123
131
  */
124
- invalidateExecutionPayloads(lvh: LVHInvalidResponse, source: ExecutionInvalidSource): void {
132
+ invalidateExecutionPayloads(
133
+ lvh: LVHInvalidResponse,
134
+ source: ExecutionInvalidSource,
135
+ judgedLogCtx?: Record<string, LogDataBasic>
136
+ ): void {
125
137
  const logCtx = {
138
+ ...judgedLogCtx,
126
139
  source,
127
- blockRoot: lvh.invalidateFromParentBlockRoot,
128
- blockHash: lvh.invalidateFromParentBlockHash,
140
+ judged: lvh.judged,
141
+ fromBlockRoot: lvh.invalidateFromBlockRoot,
142
+ fromBlockHash: lvh.invalidateFromBlockHash,
129
143
  latestValidHash: lvh.latestValidExecHash ?? "null",
130
144
  };
131
- const applied = this.forkChoice.validateLatestHash(lvh, {strict: source === ExecutionInvalidSource.blockSegment});
132
- if (!applied) {
133
- this.logger.warn("Execution engine INVALID verdict not applied to fork choice", logCtx);
145
+ const result = this.forkChoice.validateLatestHash(lvh);
146
+ if (!result.applied) {
147
+ this.logNotApplied(result, logCtx);
134
148
  return;
135
149
  }
136
150
  this.metrics?.forkChoice.executionInvalidations.inc({source});
@@ -143,6 +157,20 @@ export class ForkChoiceExecutionEngine {
143
157
  }
144
158
  }
145
159
 
160
+ private logNotApplied(
161
+ result: Exclude<LVHVerdictResult, {applied: true}>,
162
+ logCtx: Record<string, LogDataBasic>
163
+ ): void {
164
+ const message = "Execution engine verdict not applied to fork choice";
165
+ if (result.reason === LVHNotAppliedReason.Error) {
166
+ this.logger.error(message, {...logCtx, reason: result.reason}, result.error);
167
+ } else if (result.reason === LVHNotAppliedReason.AlreadyApplied) {
168
+ this.logger.debug(message, {...logCtx, reason: result.reason});
169
+ } else {
170
+ this.logger.warn(message, {...logCtx, reason: result.reason});
171
+ }
172
+ }
173
+
146
174
  private applyForkchoiceUpdatedResult(
147
175
  headBlockRoot: RootHex,
148
176
  headBlockHash: RootHex,
@@ -165,16 +193,21 @@ export class ForkChoiceExecutionEngine {
165
193
  {
166
194
  executionStatus: ExecutionStatus.Invalid,
167
195
  latestValidExecHash: latestValidHash,
168
- invalidateFromParentBlockRoot: headBlockRoot,
169
- invalidateFromParentBlockHash: headBlockHash,
196
+ invalidateFromBlockRoot: headBlockRoot,
197
+ invalidateFromBlockHash: headBlockHash,
198
+ judged: LVHInvalidJudged.FromBlock,
170
199
  },
171
200
  ExecutionInvalidSource.forkchoiceUpdated
172
201
  );
173
202
  } else if (status === ExecutionPayloadStatus.VALID && executionStatus === ExecutionStatus.Syncing) {
174
- this.forkChoice.validateLatestHash(
175
- {executionStatus: ExecutionStatus.Valid, latestValidExecHash: headBlockHash, blockRoot: headBlockRoot},
176
- {strict: false}
177
- );
203
+ const result = this.forkChoice.validateLatestHash({
204
+ executionStatus: ExecutionStatus.Valid,
205
+ latestValidExecHash: headBlockHash,
206
+ blockRoot: headBlockRoot,
207
+ });
208
+ if (!result.applied) {
209
+ this.logNotApplied(result, {source: ExecutionInvalidSource.forkchoiceUpdated, headBlockRoot, headBlockHash});
210
+ }
178
211
  }
179
212
  } catch (e) {
180
213
  this.logger.error("Error applying forkchoice update result", {headBlockRoot, headBlockHash, status}, e as Error);
@@ -152,12 +152,15 @@ export async function validateGossipFuluDataColumnSidecar(
152
152
 
153
153
  // 5) [REJECT] The proposer signature of sidecar.signed_block_header, is valid with respect to the block_header.proposer_index pubkey.
154
154
  const signature = dataColumnSidecar.signedBlockHeader.signature;
155
- if (!chain.seenBlockInputCache.isVerifiedProposerSignature(blockHeader.slot, blockRootHex, signature)) {
155
+ if (chain.seenBlockInputCache.isVerifiedProposerSignature(blockHeader.slot, blockRootHex, signature)) {
156
+ metrics?.peerDas.dataColumnSidecarProposerSignatureChecks.inc({result: "cache_hit"});
157
+ } else {
156
158
  const signatureSet = getBlockHeaderProposerSignatureSetByHeaderSlot(
157
159
  chain.config,
158
160
  dataColumnSidecar.signedBlockHeader
159
161
  );
160
162
 
163
+ metrics?.peerDas.dataColumnSidecarProposerSignatureChecks.inc({result: "verification"});
161
164
  if (
162
165
  !(await chain.bls.verifySignatureSets([signatureSet], {
163
166
  // verify on main thread so that we only need to verify block proposer signature once per block
@@ -172,6 +175,9 @@ export async function validateGossipFuluDataColumnSidecar(
172
175
  });
173
176
  }
174
177
 
178
+ if (metrics && !chain.seenBlockInputCache.isVerifiedProposerSignature(blockHeader.slot, blockRootHex, signature)) {
179
+ metrics.peerDas.dataColumnSidecarProposerSignatureBlocks.inc();
180
+ }
175
181
  chain.seenBlockInputCache.markVerifiedProposerSignature(blockHeader.slot, blockRootHex, signature);
176
182
  }
177
183
 
@@ -1216,137 +1216,137 @@ function createValidatorMonitorMetrics(register: RegistryMetricCreator, register
1216
1216
 
1217
1217
  return {
1218
1218
  validatorsConnected: register.gauge({
1219
- name: "validator_monitor_validators",
1219
+ name: "lodestar_validator_monitor_validators",
1220
1220
  help: "Count of validators that are specifically monitored by this beacon node",
1221
1221
  }),
1222
1222
 
1223
1223
  validatorsConnectedIndices: register.gauge<{indices: string}>({
1224
- name: "validator_monitor_indices",
1224
+ name: "lodestar_validator_monitor_indices",
1225
1225
  help: "Static metric with connected validator indices as label, value is always 1",
1226
1226
  labelNames: ["indices"],
1227
1227
  }),
1228
1228
 
1229
1229
  validatorsInSyncCommittee: register.gauge({
1230
- name: "validator_monitor_validators_in_sync_committee",
1230
+ name: "lodestar_validator_monitor_validators_in_sync_committee",
1231
1231
  help: "Count of validators monitored by this beacon node that are part of sync committee",
1232
1232
  }),
1233
1233
 
1234
1234
  // Validator Monitor Metrics (per-epoch summaries)
1235
1235
  prevEpochOnChainBalance: stateDerivedRegister?.gauge({
1236
- name: "validator_monitor_prev_epoch_on_chain_balance",
1236
+ name: "lodestar_validator_monitor_prev_epoch_on_chain_balance",
1237
1237
  help: "Total balance of all monitored validators after an epoch",
1238
1238
  }),
1239
1239
  prevEpochOnChainAttesterHit: register.gauge({
1240
- name: "validator_monitor_prev_epoch_on_chain_attester_hit_total",
1240
+ name: "lodestar_validator_monitor_prev_epoch_on_chain_attester_hit_total",
1241
1241
  help: "Incremented if validator's submitted attestation is included in some blocks",
1242
1242
  }),
1243
1243
  prevEpochOnChainAttesterMiss: register.gauge({
1244
- name: "validator_monitor_prev_epoch_on_chain_attester_miss_total",
1244
+ name: "lodestar_validator_monitor_prev_epoch_on_chain_attester_miss_total",
1245
1245
  help: "Incremented if validator's submitted attestation is not included in any blocks",
1246
1246
  }),
1247
1247
  prevEpochOnChainSourceAttesterHit: stateDerivedRegister?.gauge({
1248
- name: "validator_monitor_prev_epoch_on_chain_source_attester_hit_total",
1248
+ name: "lodestar_validator_monitor_prev_epoch_on_chain_source_attester_hit_total",
1249
1249
  help: "Incremented if the validator is flagged as a previous epoch source attester during per epoch processing",
1250
1250
  }),
1251
1251
  prevEpochOnChainSourceAttesterMiss: stateDerivedRegister?.gauge({
1252
- name: "validator_monitor_prev_epoch_on_chain_source_attester_miss_total",
1252
+ name: "lodestar_validator_monitor_prev_epoch_on_chain_source_attester_miss_total",
1253
1253
  help: "Incremented if the validator is not flagged as a previous epoch source attester during per epoch processing",
1254
1254
  }),
1255
1255
  prevEpochOnChainHeadAttesterHit: stateDerivedRegister?.gauge({
1256
- name: "validator_monitor_prev_epoch_on_chain_head_attester_hit_total",
1256
+ name: "lodestar_validator_monitor_prev_epoch_on_chain_head_attester_hit_total",
1257
1257
  help: "Incremented if the validator is flagged as a previous epoch head attester during per epoch processing",
1258
1258
  }),
1259
1259
  prevEpochOnChainHeadAttesterMiss: stateDerivedRegister?.gauge({
1260
- name: "validator_monitor_prev_epoch_on_chain_head_attester_miss_total",
1260
+ name: "lodestar_validator_monitor_prev_epoch_on_chain_head_attester_miss_total",
1261
1261
  help: "Incremented if the validator is not flagged as a previous epoch head attester during per epoch processing",
1262
1262
  }),
1263
1263
  prevOnChainAttesterCorrectHead: register.gauge({
1264
- name: "validator_monitor_prev_epoch_on_chain_attester_correct_head_total",
1264
+ name: "lodestar_validator_monitor_prev_epoch_on_chain_attester_correct_head_total",
1265
1265
  help: "Total count of times a validator votes correct head",
1266
1266
  }),
1267
1267
  prevOnChainAttesterIncorrectHead: register.gauge({
1268
- name: "validator_monitor_prev_epoch_on_chain_attester_incorrect_head_total",
1268
+ name: "lodestar_validator_monitor_prev_epoch_on_chain_attester_incorrect_head_total",
1269
1269
  help: "Total count of times a validator votes incorrect head",
1270
1270
  }),
1271
1271
  prevEpochOnChainTargetAttesterHit: stateDerivedRegister?.gauge({
1272
- name: "validator_monitor_prev_epoch_on_chain_target_attester_hit_total",
1272
+ name: "lodestar_validator_monitor_prev_epoch_on_chain_target_attester_hit_total",
1273
1273
  help: "Incremented if the validator is flagged as a previous epoch target attester during per epoch processing",
1274
1274
  }),
1275
1275
  prevEpochOnChainTargetAttesterMiss: stateDerivedRegister?.gauge({
1276
- name: "validator_monitor_prev_epoch_on_chain_target_attester_miss_total",
1276
+ name: "lodestar_validator_monitor_prev_epoch_on_chain_target_attester_miss_total",
1277
1277
  help: "Incremented if the validator is not flagged as a previous epoch target attester during per epoch processing",
1278
1278
  }),
1279
1279
  prevEpochOnChainInclusionDistance: register.histogram({
1280
- name: "validator_monitor_prev_epoch_on_chain_inclusion_distance",
1280
+ name: "lodestar_validator_monitor_prev_epoch_on_chain_inclusion_distance",
1281
1281
  help: "The attestation inclusion distance calculated during per epoch processing",
1282
1282
  // min inclusion distance is 1, usual values are 1,2,3 max is 32 (1 epoch)
1283
1283
  buckets: [1, 2, 3, 5, 10, 32],
1284
1284
  }),
1285
1285
  prevEpochAttestations: register.histogram({
1286
- name: "validator_monitor_prev_epoch_attestations",
1286
+ name: "lodestar_validator_monitor_prev_epoch_attestations",
1287
1287
  help: "The number of unagg. attestations seen in the previous epoch",
1288
1288
  buckets: [0, 1, 2, 3],
1289
1289
  }),
1290
1290
  prevEpochAttestationsMinDelaySeconds: register.histogram({
1291
- name: "validator_monitor_prev_epoch_attestations_min_delay_seconds",
1291
+ name: "lodestar_validator_monitor_prev_epoch_attestations_min_delay_seconds",
1292
1292
  help: "The min delay between when the validator should send the attestation and when it was received",
1293
1293
  buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
1294
1294
  }),
1295
1295
  prevEpochAttestationAggregateInclusions: register.histogram({
1296
- name: "validator_monitor_prev_epoch_attestation_aggregate_inclusions",
1296
+ name: "lodestar_validator_monitor_prev_epoch_attestation_aggregate_inclusions",
1297
1297
  help: "The count of times an attestation was seen inside an aggregate",
1298
1298
  buckets: [0, 1, 2, 3, 5, 10],
1299
1299
  }),
1300
1300
  prevEpochAttestationBlockInclusions: register.histogram({
1301
- name: "validator_monitor_prev_epoch_attestation_block_inclusions",
1301
+ name: "lodestar_validator_monitor_prev_epoch_attestation_block_inclusions",
1302
1302
  help: "The count of times an attestation was seen inside a block",
1303
1303
  buckets: [0, 1, 2, 3, 5],
1304
1304
  }),
1305
1305
  prevEpochAttestationBlockMinInclusionDistance: register.histogram({
1306
- name: "validator_monitor_prev_epoch_attestation_block_min_inclusion_distance",
1306
+ name: "lodestar_validator_monitor_prev_epoch_attestation_block_min_inclusion_distance",
1307
1307
  help: "The minimum inclusion distance observed for the inclusion of an attestation in a block",
1308
1308
  buckets: [1, 2, 3, 5, 10, 32],
1309
1309
  }),
1310
1310
  prevEpochBeaconBlocks: register.histogram({
1311
- name: "validator_monitor_prev_epoch_beacon_blocks",
1311
+ name: "lodestar_validator_monitor_prev_epoch_beacon_blocks",
1312
1312
  help: "The number of beacon_blocks seen in the previous epoch",
1313
1313
  buckets: [0, 1, 2, 3, 5, 10],
1314
1314
  }),
1315
1315
  prevEpochBeaconBlocksMinDelaySeconds: register.histogram({
1316
- name: "validator_monitor_prev_epoch_beacon_blocks_min_delay_seconds",
1316
+ name: "lodestar_validator_monitor_prev_epoch_beacon_blocks_min_delay_seconds",
1317
1317
  help: "The min delay between when the validator should send the block and when it was received",
1318
1318
  buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
1319
1319
  }),
1320
1320
  prevEpochAggregatesTotal: register.histogram({
1321
- name: "validator_monitor_prev_epoch_aggregates",
1321
+ name: "lodestar_validator_monitor_prev_epoch_aggregates",
1322
1322
  help: "The number of aggregates seen in the previous epoch",
1323
1323
  buckets: [0, 1, 2, 3, 5, 10],
1324
1324
  }),
1325
1325
  prevEpochAggregatesMinDelaySeconds: register.histogram({
1326
- name: "validator_monitor_prev_epoch_aggregates_min_delay_seconds",
1326
+ name: "lodestar_validator_monitor_prev_epoch_aggregates_min_delay_seconds",
1327
1327
  help: "The min delay between when the validator should send the aggregate and when it was received",
1328
1328
  buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
1329
1329
  }),
1330
1330
  prevEpochSyncCommitteeHits: register.gauge({
1331
- name: "validator_monitor_prev_epoch_sync_committee_hits",
1331
+ name: "lodestar_validator_monitor_prev_epoch_sync_committee_hits",
1332
1332
  help: "Count of times in prev epoch connected validators participated in imported block's syncAggregate",
1333
1333
  }),
1334
1334
  prevEpochSyncCommitteeMisses: register.gauge({
1335
- name: "validator_monitor_prev_epoch_sync_committee_misses",
1335
+ name: "lodestar_validator_monitor_prev_epoch_sync_committee_misses",
1336
1336
  help: "Count of times in prev epoch connected validators fail to participate in imported block's syncAggregate",
1337
1337
  }),
1338
1338
  prevEpochSyncSignatureAggregateInclusions: register.histogram({
1339
- name: "validator_monitor_prev_epoch_sync_signature_aggregate_inclusions",
1339
+ name: "lodestar_validator_monitor_prev_epoch_sync_signature_aggregate_inclusions",
1340
1340
  help: "The count of times a sync signature was seen inside an aggregate",
1341
1341
  buckets: [0, 1, 2, 3, 5, 10],
1342
1342
  }),
1343
1343
  prevEpochAttestationSummary: register.gauge<{summary: string}>({
1344
- name: "validator_monitor_prev_epoch_attestation_summary",
1344
+ name: "lodestar_validator_monitor_prev_epoch_attestation_summary",
1345
1345
  help: "Best guess of the node of the result of previous epoch validators attestation actions and causality",
1346
1346
  labelNames: ["summary"],
1347
1347
  }),
1348
1348
  prevEpochBlockProposalSummary: register.gauge<{summary: string}>({
1349
- name: "validator_monitor_prev_epoch_block_proposal_summary",
1349
+ name: "lodestar_validator_monitor_prev_epoch_block_proposal_summary",
1350
1350
  help: "Best guess of the node of the result of previous epoch validators block proposal actions and causality",
1351
1351
  labelNames: ["summary"],
1352
1352
  }),
@@ -1354,18 +1354,18 @@ function createValidatorMonitorMetrics(register: RegistryMetricCreator, register
1354
1354
  // Validator Monitor Metrics (real-time)
1355
1355
 
1356
1356
  unaggregatedAttestationTotal: register.gauge<{src: OpSource}>({
1357
- name: "validator_monitor_unaggregated_attestation_total",
1357
+ name: "lodestar_validator_monitor_unaggregated_attestation_total",
1358
1358
  help: "Number of unaggregated attestations seen",
1359
1359
  labelNames: ["src"],
1360
1360
  }),
1361
1361
  unaggregatedAttestationDelaySeconds: register.histogram<{src: OpSource}>({
1362
- name: "validator_monitor_unaggregated_attestation_delay_seconds",
1362
+ name: "lodestar_validator_monitor_unaggregated_attestation_delay_seconds",
1363
1363
  help: "The delay between when the validator should send the attestation and when it was received",
1364
1364
  labelNames: ["src"],
1365
1365
  buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
1366
1366
  }),
1367
1367
  unaggregatedAttestationSubmittedSentPeers: register.histogram({
1368
- name: "validator_monitor_unaggregated_attestation_submitted_sent_peers_count",
1368
+ name: "lodestar_validator_monitor_unaggregated_attestation_submitted_sent_peers_count",
1369
1369
  help: "Number of peers that an unaggregated attestation sent to",
1370
1370
  // as of Apr 2022, most of the time we sent to >30 peers per attestations
1371
1371
  // these bucket values just base on that fact to get equal range
@@ -1373,52 +1373,52 @@ function createValidatorMonitorMetrics(register: RegistryMetricCreator, register
1373
1373
  buckets: [0, 10, 20, 30],
1374
1374
  }),
1375
1375
  aggregatedAttestationTotal: register.gauge<{src: OpSource}>({
1376
- name: "validator_monitor_aggregated_attestation_total",
1376
+ name: "lodestar_validator_monitor_aggregated_attestation_total",
1377
1377
  help: "Number of aggregated attestations seen",
1378
1378
  labelNames: ["src"],
1379
1379
  }),
1380
1380
  aggregatedAttestationDelaySeconds: register.histogram<{src: OpSource}>({
1381
- name: "validator_monitor_aggregated_attestation_delay_seconds",
1381
+ name: "lodestar_validator_monitor_aggregated_attestation_delay_seconds",
1382
1382
  help: "The delay between then the validator should send the aggregate and when it was received",
1383
1383
  labelNames: ["src"],
1384
1384
  buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
1385
1385
  }),
1386
1386
  attestationInAggregateTotal: register.gauge<{src: OpSource}>({
1387
- name: "validator_monitor_attestation_in_aggregate_total",
1387
+ name: "lodestar_validator_monitor_attestation_in_aggregate_total",
1388
1388
  help: "Number of times an attestation has been seen in an aggregate",
1389
1389
  labelNames: ["src"],
1390
1390
  }),
1391
1391
  attestationInAggregateDelaySeconds: register.histogram<{src: OpSource}>({
1392
- name: "validator_monitor_attestation_in_aggregate_delay_seconds",
1392
+ name: "lodestar_validator_monitor_attestation_in_aggregate_delay_seconds",
1393
1393
  help: "The delay between when the validator should send the aggregate and when it was received",
1394
1394
  labelNames: ["src"],
1395
1395
  buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
1396
1396
  }),
1397
1397
  attestationInBlockTotal: register.gauge({
1398
- name: "validator_monitor_attestation_in_block_total",
1398
+ name: "lodestar_validator_monitor_attestation_in_block_total",
1399
1399
  help: "Number of times an attestation has been seen in a block",
1400
1400
  }),
1401
1401
  attestationInBlockDelaySlots: register.histogram({
1402
- name: "validator_monitor_attestation_in_block_delay_slots",
1402
+ name: "lodestar_validator_monitor_attestation_in_block_delay_slots",
1403
1403
  help: "The excess slots (beyond the minimum delay) between the attestation slot and the block slot",
1404
1404
  buckets: [0.1, 0.25, 0.5, 1, 2, 5, 10],
1405
1405
  }),
1406
1406
  attestationInBlockParticipants: register.histogram({
1407
- name: "validator_monitor_attestation_in_block_participants",
1407
+ name: "lodestar_validator_monitor_attestation_in_block_participants",
1408
1408
  help: "The total participants in attestations of monitored validators included in blocks",
1409
1409
  buckets: [1, 5, 20, 50, 100, 200],
1410
1410
  }),
1411
1411
  syncSignatureInAggregateTotal: register.gauge({
1412
- name: "validator_monitor_sync_signature_in_aggregate_total",
1412
+ name: "lodestar_validator_monitor_sync_signature_in_aggregate_total",
1413
1413
  help: "Number of times a sync signature has been seen in an aggregate",
1414
1414
  }),
1415
1415
  beaconBlockTotal: register.gauge<{src: OpSource}>({
1416
- name: "validator_monitor_beacon_block_total",
1416
+ name: "lodestar_validator_monitor_beacon_block_total",
1417
1417
  help: "Total number of beacon blocks seen",
1418
1418
  labelNames: ["src"],
1419
1419
  }),
1420
1420
  beaconBlockDelaySeconds: register.histogram<{src: OpSource}>({
1421
- name: "validator_monitor_beacon_block_delay_seconds",
1421
+ name: "lodestar_validator_monitor_beacon_block_delay_seconds",
1422
1422
  help: "The delay between when the validator should send the block and when it was received",
1423
1423
  labelNames: ["src"],
1424
1424
  // we also want other nodes to received our published before 4s so add bucket 3 and 3.5
@@ -1427,7 +1427,7 @@ function createValidatorMonitorMetrics(register: RegistryMetricCreator, register
1427
1427
 
1428
1428
  // Only for known
1429
1429
  proposerBalanceDeltaKnown: register.histogram({
1430
- name: "validator_monitor_proposer_balance_delta_known_gwei",
1430
+ name: "lodestar_validator_monitor_proposer_balance_delta_known_gwei",
1431
1431
  help: "Balance delta of known block proposer after importing a valid block",
1432
1432
  // Jul22 mainnet block reward is consistently between 29,000,000-28,000,000 GWei
1433
1433
  buckets: [10_000, 100_000, 1e6, 10e6, 20e6, 50e6, 100e6, 1000e6],
@@ -160,7 +160,7 @@ export function createBeaconMetrics(register: RegistryMetricCreator) {
160
160
 
161
161
  blockPayload: {
162
162
  payloadAdvancePrepTime: register.histogram({
163
- name: "beacon_block_payload_prepare_time",
163
+ name: "beacon_block_payload_prepare_time_seconds",
164
164
  help: "Time for preparing payload in advance",
165
165
  buckets: [0.1, 1, 3, 5, 10],
166
166
  }),
@@ -170,7 +170,7 @@ export function createBeaconMetrics(register: RegistryMetricCreator) {
170
170
  buckets: [0.005, 0.01, 0.05, 0.1, 0.2, 0.5, 1],
171
171
  }),
172
172
  payloadFetchedTime: register.histogram<{prepType: PayloadPreparationType}>({
173
- name: "beacon_block_payload_fetched_time",
173
+ name: "beacon_block_payload_fetched_time_seconds",
174
174
  help: "Time to fetch the payload from EL",
175
175
  labelNames: ["prepType"],
176
176
  buckets: [0.1, 0.2, 0.3, 0.5, 0.7, 1, 2],
@@ -334,6 +334,15 @@ export function createBeaconMetrics(register: RegistryMetricCreator) {
334
334
  help: "Time taken to compute data column sidecars, including cells and inclusion proof",
335
335
  buckets: [0.1, 0.25, 0.5, 0.75, 1, 2, 5],
336
336
  }),
337
+ dataColumnSidecarProposerSignatureChecks: register.counter<{result: "cache_hit" | "verification"}>({
338
+ name: "beacon_data_column_sidecar_proposer_signature_checks_total",
339
+ help: "Gossip data column proposer signature checks answered by the cache or by a started verification",
340
+ labelNames: ["result"],
341
+ }),
342
+ dataColumnSidecarProposerSignatureBlocks: register.counter({
343
+ name: "beacon_data_column_sidecar_proposer_signature_blocks_total",
344
+ help: "Blocks whose proposer signature a gossip data column verified and cached first",
345
+ }),
337
346
  dataColumnSidecarInclusionProofVerificationTime: register.histogram({
338
347
  name: "beacon_data_column_sidecar_inclusion_proof_verification_seconds",
339
348
  help: "Time taken to verify data_column sidecar inclusion proof",
@@ -68,7 +68,7 @@ export function createLodestarMetrics(
68
68
  if (genesisTime) {
69
69
  register
70
70
  .gauge({
71
- name: "lodestar_genesis_time",
71
+ name: "lodestar_genesis_time_seconds",
72
72
  help: "Genesis time in seconds",
73
73
  })
74
74
  .set(genesisTime);
@@ -565,13 +565,13 @@ export function createLodestarMetrics(
565
565
  }),
566
566
  // To measure the time cost of main thread <-> worker message passing
567
567
  latencyToWorker: register.histogram({
568
- name: "lodestar_bls_thread_pool_latency_to_worker",
568
+ name: "lodestar_bls_thread_pool_latency_to_worker_seconds",
569
569
  help: "Time from sending the job to the worker and the worker receiving it",
570
570
  // The dashboard treats 20ms as slow; values above 100ms only need severe-stall classification.
571
571
  buckets: [0.00025, 0.001, 0.005, 0.02, 0.1],
572
572
  }),
573
573
  latencyFromWorker: register.histogram({
574
- name: "lodestar_bls_thread_pool_latency_from_worker",
574
+ name: "lodestar_bls_thread_pool_latency_from_worker_seconds",
575
575
  help: "Time from the worker sending the result and the main thread receiving it",
576
576
  buckets: [0.00025, 0.001, 0.005, 0.02, 0.1],
577
577
  }),
@@ -775,7 +775,7 @@ export function createLodestarMetrics(
775
775
  labelNames: ["reason"],
776
776
  }),
777
777
  elapsedTimeTillReceived: register.histogram({
778
- name: "lodestar_sync_unknown_block_elapsed_time_till_received",
778
+ name: "lodestar_sync_unknown_block_elapsed_time_till_received_seconds",
779
779
  help: "Time elapsed between block slot time and the time block received via unknown block sync",
780
780
  buckets: [0.5, 1, 2, 4, 6, 12],
781
781
  }),
@@ -930,86 +930,86 @@ export function createLodestarMetrics(
930
930
  // Gossip block
931
931
  gossipBlock: {
932
932
  elapsedTimeTillReceived: register.histogram<{source: OpSource}>({
933
- name: "lodestar_gossip_block_elapsed_time_till_received",
933
+ name: "lodestar_gossip_block_elapsed_time_till_received_seconds",
934
934
  help: "Time elapsed between block slot time and the time block received via gossip",
935
935
  labelNames: ["source"],
936
936
  buckets: [0.5, 1, 2, 4, 6, 12],
937
937
  }),
938
938
  elapsedTimeTillProcessed: register.histogram({
939
- name: "lodestar_gossip_block_elapsed_time_till_processed",
939
+ name: "lodestar_gossip_block_elapsed_time_till_processed_seconds",
940
940
  help: "Time elapsed between block slot time and the time block processed",
941
941
  buckets: [0.5, 1, 2, 4, 6, 12],
942
942
  }),
943
943
 
944
944
  gossipValidation: {
945
945
  recvToValidation: register.histogram({
946
- name: "lodestar_gossip_block_received_to_gossip_validate",
946
+ name: "lodestar_gossip_block_received_to_gossip_validate_seconds",
947
947
  help: "Time elapsed between block received and block validated",
948
948
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
949
949
  }),
950
950
  validationTime: register.histogram({
951
- name: "lodestar_gossip_block_gossip_validate_time",
951
+ name: "lodestar_gossip_block_gossip_validate_time_seconds",
952
952
  help: "Time to apply gossip validations",
953
953
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
954
954
  }),
955
955
  },
956
956
  stateTransition: {
957
957
  recvToValidation: register.histogram({
958
- name: "lodestar_gossip_block_received_to_state_transition",
958
+ name: "lodestar_gossip_block_received_to_state_transition_seconds",
959
959
  help: "Time elapsed between block received and block state transition",
960
960
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
961
961
  }),
962
962
  validationTime: register.histogram({
963
- name: "lodestar_gossip_block_state_transition_time",
963
+ name: "lodestar_gossip_block_state_transition_time_seconds",
964
964
  help: "Time to validate block state transition",
965
965
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
966
966
  }),
967
967
  },
968
968
  signatureVerification: {
969
969
  recvToValidation: register.histogram({
970
- name: "lodestar_gossip_block_received_to_signatures_verification",
970
+ name: "lodestar_gossip_block_received_to_signatures_verification_seconds",
971
971
  help: "Time elapsed between block received and block signatures verification",
972
972
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
973
973
  }),
974
974
  validationTime: register.histogram({
975
- name: "lodestar_gossip_block_signatures_verification_time",
975
+ name: "lodestar_gossip_block_signatures_verification_time_seconds",
976
976
  help: "Time elapsed for block signatures verification",
977
977
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
978
978
  }),
979
979
  },
980
980
  executionPayload: {
981
981
  recvToValidation: register.histogram({
982
- name: "lodestar_gossip_block_received_to_execution_payload_verification",
982
+ name: "lodestar_gossip_block_received_to_execution_payload_verification_seconds",
983
983
  help: "Time elapsed between block received and execution payload verification",
984
984
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
985
985
  }),
986
986
  validationTime: register.histogram({
987
- name: "lodestar_gossip_execution_payload_verification_time",
987
+ name: "lodestar_gossip_execution_payload_verification_time_seconds",
988
988
  help: "Time elapsed for execution payload verification",
989
989
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
990
990
  }),
991
991
  },
992
992
  blockImport: {
993
993
  recvToValidation: register.histogram({
994
- name: "lodestar_gossip_block_received_to_block_import",
994
+ name: "lodestar_gossip_block_received_to_block_import_seconds",
995
995
  help: "Time elapsed between block received and block import",
996
996
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
997
997
  }),
998
998
  validationTime: register.histogram({
999
- name: "lodestar_gossip_block_block_import_time",
999
+ name: "lodestar_gossip_block_block_import_time_seconds",
1000
1000
  help: "Time elapsed for block import",
1001
1001
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
1002
1002
  }),
1003
1003
  },
1004
1004
 
1005
1005
  receivedToBlobsAvailabilityTime: register.histogram<{numBlobs: number}>({
1006
- name: "lodestar_gossip_block_received_to_blobs_availability_time",
1006
+ name: "lodestar_gossip_block_received_to_blobs_availability_time_seconds",
1007
1007
  help: "Time elapsed between block received and blobs became available",
1008
1008
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
1009
1009
  labelNames: ["numBlobs"],
1010
1010
  }),
1011
1011
  receivedToFullyVerifiedTime: register.histogram({
1012
- name: "lodestar_gossip_block_received_to_fully_verified_time",
1012
+ name: "lodestar_gossip_block_received_to_fully_verified_time_seconds",
1013
1013
  help: "Time elapsed between block received and fully verified state, signatures and payload",
1014
1014
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
1015
1015
  }),
@@ -1019,7 +1019,7 @@ export function createLodestarMetrics(
1019
1019
  buckets: [0.01, 0.015, 0.02, 0.025, 0.03, 0.04, 0.5, 1],
1020
1020
  }),
1021
1021
  verifiedToBlobsAvailabiltyTime: register.histogram<{numBlobs: number}>({
1022
- name: "lodestar_gossip_block_verified_to_blobs_availability_time",
1022
+ name: "lodestar_gossip_block_verified_to_blobs_availability_time_seconds",
1023
1023
  help: "Time elapsed between block verified and blobs became available",
1024
1024
  buckets: [0.05, 0.1, 0.3, 0.5, 0.7, 1, 1.3, 1.6, 2, 2.5, 3, 3.5, 4],
1025
1025
  labelNames: ["numBlobs"],
@@ -1045,12 +1045,12 @@ export function createLodestarMetrics(
1045
1045
  },
1046
1046
  gossipBlob: {
1047
1047
  recvToValidation: register.histogram({
1048
- name: "lodestar_gossip_blob_received_to_gossip_validate",
1048
+ name: "lodestar_gossip_blob_received_to_gossip_validate_seconds",
1049
1049
  help: "Time elapsed between blob received and blob validation",
1050
1050
  buckets: [0.05, 0.1, 0.2, 0.5, 1, 1.5, 2, 4],
1051
1051
  }),
1052
1052
  validationTime: register.histogram({
1053
- name: "lodestar_gossip_blob_gossip_validate_time",
1053
+ name: "lodestar_gossip_blob_gossip_validate_time_seconds",
1054
1054
  help: "Time elapsed for blob validation",
1055
1055
  buckets: [0.05, 0.1, 0.2, 0.5, 1, 1.5, 2, 4],
1056
1056
  }),
@@ -1058,7 +1058,7 @@ export function createLodestarMetrics(
1058
1058
  // Gossip execution payload envelope
1059
1059
  gossipExecutionPayloadEnvelope: {
1060
1060
  elapsedTimeTillReceived: register.histogram<{source: OpSource}>({
1061
- name: "lodestar_gossip_execution_payload_envelope_elapsed_time_till_received",
1061
+ name: "lodestar_gossip_execution_payload_envelope_elapsed_time_till_received_seconds",
1062
1062
  help: "Time elapsed between slot time and the time execution payload envelope received",
1063
1063
  labelNames: ["source"],
1064
1064
  buckets: [0.5, 1, 2, 4, 6, 12],
@@ -1157,7 +1157,7 @@ export function createLodestarMetrics(
1157
1157
  help: "Count persisting block with serialized data",
1158
1158
  }),
1159
1159
  elapsedTimeTillBecomeHead: register.histogram({
1160
- name: "lodestar_gossip_block_elapsed_time_till_become_head",
1160
+ name: "lodestar_gossip_block_elapsed_time_till_become_head_seconds",
1161
1161
  help: "Time elapsed between block slot time and the time block becomes head",
1162
1162
  buckets: [0.5, 1, 2, 4, 6, 12],
1163
1163
  }),
@@ -1595,7 +1595,7 @@ export function createLodestarMetrics(
1595
1595
  help: "Avg min max of all state cache items total read count",
1596
1596
  }),
1597
1597
  secondsSinceLastRead: register.avgMinMax({
1598
- name: "lodestar_state_cache_seconds_since_last_read",
1598
+ name: "lodestar_state_cache_since_last_read_seconds",
1599
1599
  help: "Avg min max of all state cache items seconds since last reads",
1600
1600
  }),
1601
1601
  stateClonedCount: register.histogram({
@@ -1664,7 +1664,7 @@ export function createLodestarMetrics(
1664
1664
  help: "Avg min max of all state cache items total read count",
1665
1665
  }),
1666
1666
  secondsSinceLastRead: register.avgMinMax({
1667
- name: "lodestar_cp_state_epoch_seconds_since_last_read",
1667
+ name: "lodestar_cp_state_epoch_since_last_read_seconds",
1668
1668
  help: "Avg min max of all state cache items seconds since last reads",
1669
1669
  }),
1670
1670
  stateClonedCount: register.histogram({
@@ -1682,7 +1682,7 @@ export function createLodestarMetrics(
1682
1682
  help: "Total number of states pruned from memory",
1683
1683
  }),
1684
1684
  statePersistSecFromSlot: register.histogram({
1685
- name: "lodestar_cp_state_cache_state_persist_seconds_from_slot",
1685
+ name: "lodestar_cp_state_cache_state_persist_from_slot_seconds",
1686
1686
  help: "Histogram of time to persist state to db since the clock slot",
1687
1687
  buckets: [0, 2, 4, 6, 8, 10, 12],
1688
1688
  }),
@@ -1710,7 +1710,7 @@ export function createLodestarMetrics(
1710
1710
  buckets: [0, 1, 2, 4, 8, 16, 32],
1711
1711
  }),
1712
1712
  stateReloadSecFromSlot: register.histogram({
1713
- name: "lodestar_cp_state_cache_state_reload_seconds_from_slot",
1713
+ name: "lodestar_cp_state_cache_state_reload_from_slot_seconds",
1714
1714
  help: "Histogram of time to load state from db since the clock slot",
1715
1715
  buckets: [0, 2, 4, 6, 8, 10, 12],
1716
1716
  }),
@@ -1916,7 +1916,7 @@ export function createLodestarMetrics(
1916
1916
  labelNames: ["entrypoint", "caller"],
1917
1917
  }),
1918
1918
  regenFnCallDuration: register.histogram<{entrypoint: RegenFnName; caller: RegenCaller}>({
1919
- name: "lodestar_regen_fn_call_duration",
1919
+ name: "lodestar_regen_fn_call_duration_seconds",
1920
1920
  help: "regen function duration",
1921
1921
  labelNames: ["entrypoint", "caller"],
1922
1922
  buckets: [0.1, 1, 10, 100],