From 323a458f56a8bc9eea235c5382dae38738bfde96 Mon Sep 17 00:00:00 2001 From: Tuyen Nguyen Date: Fri, 20 May 2022 08:14:05 +0700 Subject: [PATCH 1/3] Remove processed attestation log --- packages/lodestar/src/chain/eventHandlers.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/lodestar/src/chain/eventHandlers.ts b/packages/lodestar/src/chain/eventHandlers.ts index 9bea2b23fb6..da91dddc0a8 100644 --- a/packages/lodestar/src/chain/eventHandlers.ts +++ b/packages/lodestar/src/chain/eventHandlers.ts @@ -177,12 +177,7 @@ export function onForkChoiceReorg(this: BeaconChain, head: IProtoBlock, oldHead: } export function onAttestation(this: BeaconChain, attestation: phase0.Attestation): void { - this.logger.debug("Attestation processed", { - slot: attestation.data.slot, - index: attestation.data.index, - targetRoot: toHexString(attestation.data.target.root), - aggregationBits: ssz.phase0.CommitteeBits.toJson(attestation.aggregationBits) as string, - }); + // do nothing for now } export async function onBlock( From 6708bbc8d2d6ce65d91f96bfce3d132f061d2c57 Mon Sep 17 00:00:00 2001 From: Tuyen Nguyen Date: Fri, 20 May 2022 08:30:39 +0700 Subject: [PATCH 2/3] Fix lint --- packages/lodestar/src/chain/eventHandlers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/lodestar/src/chain/eventHandlers.ts b/packages/lodestar/src/chain/eventHandlers.ts index da91dddc0a8..5582a8e05b2 100644 --- a/packages/lodestar/src/chain/eventHandlers.ts +++ b/packages/lodestar/src/chain/eventHandlers.ts @@ -1,6 +1,6 @@ import {AbortSignal} from "@chainsafe/abort-controller"; import {toHexString} from "@chainsafe/ssz"; -import {allForks, Epoch, phase0, Slot, ssz, Version} from "@chainsafe/lodestar-types"; +import {allForks, Epoch, phase0, Slot, Version} from "@chainsafe/lodestar-types"; import {ILogger} from "@chainsafe/lodestar-utils"; import {CheckpointWithHex, IProtoBlock} from "@chainsafe/lodestar-fork-choice"; import {CachedBeaconStateAllForks, computeStartSlotAtEpoch} from "@chainsafe/lodestar-beacon-state-transition"; @@ -176,7 +176,7 @@ export function onForkChoiceReorg(this: BeaconChain, head: IProtoBlock, oldHead: this.logger.verbose("Chain reorg", {depth}); } -export function onAttestation(this: BeaconChain, attestation: phase0.Attestation): void { +export function onAttestation(this: BeaconChain, _: phase0.Attestation): void { // do nothing for now } From cee78a12c435c49ac4594aa3dfd39f6c4ea417f0 Mon Sep 17 00:00:00 2001 From: Tuyen Nguyen Date: Wed, 25 May 2022 09:02:15 +0700 Subject: [PATCH 3/3] Add more comments --- packages/lodestar/src/chain/eventHandlers.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/lodestar/src/chain/eventHandlers.ts b/packages/lodestar/src/chain/eventHandlers.ts index 5582a8e05b2..5b38870448c 100644 --- a/packages/lodestar/src/chain/eventHandlers.ts +++ b/packages/lodestar/src/chain/eventHandlers.ts @@ -177,7 +177,9 @@ export function onForkChoiceReorg(this: BeaconChain, head: IProtoBlock, oldHead: } export function onAttestation(this: BeaconChain, _: phase0.Attestation): void { - // do nothing for now + // don't want to log the processed attestations here as there are so many attestations and it takes too much disc space, + // users may want to keep more log files instead of unnecessary processed attestations log + // see https://github.com/ChainSafe/lodestar/pull/4032 } export async function onBlock(