From 52748e4b448ba1f2c23ea8795d3df0838b9ae83a Mon Sep 17 00:00:00 2001 From: philknows Date: Tue, 2 May 2023 22:34:10 -0400 Subject: [PATCH 1/5] "Unclean disconnect" candidate --- packages/beacon-node/src/network/peers/peerManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/beacon-node/src/network/peers/peerManager.ts b/packages/beacon-node/src/network/peers/peerManager.ts index 1d357279693..e868ff6ee18 100644 --- a/packages/beacon-node/src/network/peers/peerManager.ts +++ b/packages/beacon-node/src/network/peers/peerManager.ts @@ -610,7 +610,7 @@ export class PeerManager { try { await this.libp2p.hangUp(peer); } catch (e) { - this.logger.warn("Unclean disconnect", {peer: prettyPrintPeerId(peer)}, e as Error); + this.logger.debug("Unclean disconnect", {peer: prettyPrintPeerId(peer)}, e as Error); } } From b16000d973a76e41d60841b0f00816565cb02380 Mon Sep 17 00:00:00 2001 From: philknows Date: Tue, 2 May 2023 23:02:21 -0400 Subject: [PATCH 2/5] Block error logging verbose --- packages/beacon-node/src/chain/blocks/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/beacon-node/src/chain/blocks/index.ts b/packages/beacon-node/src/chain/blocks/index.ts index 04096b02c40..5f1f6e9b9bf 100644 --- a/packages/beacon-node/src/chain/blocks/index.ts +++ b/packages/beacon-node/src/chain/blocks/index.ts @@ -110,7 +110,7 @@ export async function processBlocks( if (!(err instanceof BlockError)) { this.logger.error("Non BlockError received", {}, err); } else if (!opts.disableOnBlockError) { - this.logger.error("Block error", {slot: err.signedBlock.message.slot}, err); + this.logger.warn("Block error", {slot: err.signedBlock.message.slot}, err); if (err.type.code === BlockErrorCode.INVALID_SIGNATURE) { const {signedBlock} = err; From 6f133c383bca47a1bb46d6ca70dac2761a1fd5ce Mon Sep 17 00:00:00 2001 From: philknows Date: Tue, 2 May 2023 23:14:22 -0400 Subject: [PATCH 3/5] Discuss Service Unavailable: Node syncing --- packages/api/test/unit/client/httpClient.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/api/test/unit/client/httpClient.test.ts b/packages/api/test/unit/client/httpClient.test.ts index f9961f0b16d..0ec13a84a8a 100644 --- a/packages/api/test/unit/client/httpClient.test.ts +++ b/packages/api/test/unit/client/httpClient.test.ts @@ -128,6 +128,7 @@ describe("httpClient json client", () => { return Promise.reject(Error("did not throw")); } catch (e) { if (!(e instanceof HttpError)) throw Error(`Not an HttpError: ${(e as Error).message}`); + // Discuss error handling: https://github.com/ChainSafe/lodestar/issues/5359#issuecomment-1529027981 expect(e.message).to.equal("Service Unavailable: Node is syncing"); expect(e.status).to.equal(503, "Wrong error status code"); } From 330417b6dde0af3532ffefa57db0524c1e04f5ac Mon Sep 17 00:00:00 2001 From: philknows Date: Tue, 2 May 2023 23:23:31 -0400 Subject: [PATCH 4/5] failed to download attester duties verbose --- packages/validator/src/services/attestationDuties.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/validator/src/services/attestationDuties.ts b/packages/validator/src/services/attestationDuties.ts index 916c02f9199..ed96bb0e08c 100644 --- a/packages/validator/src/services/attestationDuties.ts +++ b/packages/validator/src/services/attestationDuties.ts @@ -168,7 +168,7 @@ export class AttestationDutiesService { for (const epoch of [currentEpoch, nextEpoch]) { // Download the duties and update the duties for the current and next epoch. await this.pollBeaconAttestersForEpoch(epoch, indexArr).catch((e: Error) => { - this.logger.error("Failed to download attester duties", {epoch}, e); + this.logger.warn("Failed to download attester duties", {epoch}, e); }); } From a8596ce49383cecc812e97a14bf61dacd68ebc10 Mon Sep 17 00:00:00 2001 From: philknows Date: Tue, 2 May 2023 23:30:11 -0400 Subject: [PATCH 5/5] Failed to download SyncDuties verbose --- packages/validator/src/services/syncCommitteeDuties.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/validator/src/services/syncCommitteeDuties.ts b/packages/validator/src/services/syncCommitteeDuties.ts index 764cafa0e3e..d7ba5b7d160 100644 --- a/packages/validator/src/services/syncCommitteeDuties.ts +++ b/packages/validator/src/services/syncCommitteeDuties.ts @@ -183,7 +183,7 @@ export class SyncCommitteeDutiesService { for (const epoch of [currentEpoch, nextPeriodEpoch]) { // Download the duties and update the duties for the current and next period. await this.pollSyncCommitteesForEpoch(epoch, indexArr).catch((e: Error) => { - this.logger.error("Failed to download SyncDuties", {epoch}, e); + this.logger.warn("Failed to download SyncDuties", {epoch}, e); }); }