From f1c5043009c218a821eeca4402a0fecb5e949571 Mon Sep 17 00:00:00 2001 From: Tuyen Nguyen Date: Thu, 17 Aug 2023 13:38:44 +0700 Subject: [PATCH] chore: remove unused metrics --- packages/beacon-node/src/chain/validation/attestation.ts | 2 -- packages/beacon-node/src/metrics/metrics/lodestar.ts | 8 -------- .../beacon-node/src/network/processor/gossipHandlers.ts | 4 +--- .../test/perf/chain/verifyImportBlocks.test.ts | 1 + packages/beacon-node/test/utils/network.ts | 1 + 5 files changed, 3 insertions(+), 13 deletions(-) diff --git a/packages/beacon-node/src/chain/validation/attestation.ts b/packages/beacon-node/src/chain/validation/attestation.ts index 94b985e835a2..ec67c8e9b828 100644 --- a/packages/beacon-node/src/chain/validation/attestation.ts +++ b/packages/beacon-node/src/chain/validation/attestation.ts @@ -1,5 +1,4 @@ import {toHexString} from "@chainsafe/ssz"; -import bls from "@chainsafe/bls"; import {phase0, Epoch, Root, Slot, RootHex, ssz} from "@lodestar/types"; import {ProtoBlock} from "@lodestar/fork-choice"; import {ATTESTATION_SUBNET_COUNT, SLOTS_PER_EPOCH, ForkName, ForkSeq} from "@lodestar/params"; @@ -22,7 +21,6 @@ import { import {AttestationDataCacheEntry} from "../seenCache/seenAttestationData.js"; import {sszDeserializeAttestation} from "../../network/gossip/topic.js"; import {Result, wrapError} from "../../util/wrapError.js"; -import {MIN_SIGNATURE_SETS_TO_BATCH_VERIFY} from "../../network/processor/gossipQueues/index.js"; export type BatchResult = { results: Result[]; diff --git a/packages/beacon-node/src/metrics/metrics/lodestar.ts b/packages/beacon-node/src/metrics/metrics/lodestar.ts index 2fa3c4c2ff8d..eed69ba74533 100644 --- a/packages/beacon-node/src/metrics/metrics/lodestar.ts +++ b/packages/beacon-node/src/metrics/metrics/lodestar.ts @@ -580,18 +580,10 @@ export function createLodestarMetrics( help: "Number of attestations verified in batch", buckets: [1, 2, 4, 8, 16, 32, 64, 128], }), - attestationBatchCount: register.gauge({ - name: "lodestar_gossip_attestation_verified_in_batch_count", - help: "Count of attestations verified in batch", - }), attestationNonBatchCount: register.gauge({ name: "lodestar_gossip_attestation_verified_non_batch_count", help: "Count of attestations NOT verified in batch", }), - totalBatch: register.gauge({ - name: "lodestar_gossip_attestation_total_batch_count", - help: "Total number of attestation batches", - }), }, // Gossip block diff --git a/packages/beacon-node/src/network/processor/gossipHandlers.ts b/packages/beacon-node/src/network/processor/gossipHandlers.ts index 55b29663a9e9..fe4edd510cf8 100644 --- a/packages/beacon-node/src/network/processor/gossipHandlers.ts +++ b/packages/beacon-node/src/network/processor/gossipHandlers.ts @@ -395,9 +395,7 @@ export function getGossipHandlers(modules: ValidatorFnsModules, options: GossipH } if (batchableBls) { - metrics?.gossipAttestation.totalBatch.inc(); - metrics?.gossipAttestation.attestationBatchCount.inc(attestationCount); - metrics?.gossipAttestation.attestationBatchHistogram.observe(gossipHandlerParams.length); + metrics?.gossipAttestation.attestationBatchHistogram.observe(attestationCount); } else { metrics?.gossipAttestation.attestationNonBatchCount.inc(attestationCount); } diff --git a/packages/beacon-node/test/perf/chain/verifyImportBlocks.test.ts b/packages/beacon-node/test/perf/chain/verifyImportBlocks.test.ts index 8db7deb5d3c3..21b70c69a425 100644 --- a/packages/beacon-node/test/perf/chain/verifyImportBlocks.test.ts +++ b/packages/beacon-node/test/perf/chain/verifyImportBlocks.test.ts @@ -88,6 +88,7 @@ describe.skip("verify+import blocks - range sync perf test", () => { suggestedFeeRecipient: defaultValidatorOptions.suggestedFeeRecipient, skipCreateStateCacheIfAvailable: true, archiveStateEpochFrequency: 1024, + minSameMessageSignatureSetsToBatch: 32, }, { config: state.config, diff --git a/packages/beacon-node/test/utils/network.ts b/packages/beacon-node/test/utils/network.ts index 367f49d59ed0..02e8c66879fb 100644 --- a/packages/beacon-node/test/utils/network.ts +++ b/packages/beacon-node/test/utils/network.ts @@ -82,6 +82,7 @@ export async function getNetworkForTest( disableArchiveOnCheckpoint: true, disableLightClientServerOnImportBlockHead: true, disablePrepareNextSlot: true, + minSameMessageSignatureSetsToBatch: 32, }, { config: beaconConfig,