From 03d44d7bfe8b6cfa5c184bda4a78ed344b4333cf Mon Sep 17 00:00:00 2001 From: mick <103775631+symbolpunk@users.noreply.github.com> Date: Wed, 18 May 2022 12:20:35 -0400 Subject: [PATCH] Weak subjectivity warning copy update, warn -> info (#10699) * warn -> info * wrap * lintfix * mick-needs-a-better-IDE * gofmt * empty commit to trigger cicd Co-authored-by: Raul Jordan --- beacon-chain/blockchain/weak_subjectivity_checks.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/beacon-chain/blockchain/weak_subjectivity_checks.go b/beacon-chain/blockchain/weak_subjectivity_checks.go index 1267e876a92a..aa3c781a6399 100644 --- a/beacon-chain/blockchain/weak_subjectivity_checks.go +++ b/beacon-chain/blockchain/weak_subjectivity_checks.go @@ -30,10 +30,11 @@ type WeakSubjectivityVerifier struct { db weakSubjectivityDB } -// NewWeakSubjectivityVerifier validates a checkpoint, and if valid, uses it to initialize a weak subjectivity verifier +// NewWeakSubjectivityVerifier validates a checkpoint, and if valid, uses it to initialize a weak subjectivity verifier. func NewWeakSubjectivityVerifier(wsc *ethpb.Checkpoint, db weakSubjectivityDB) (*WeakSubjectivityVerifier, error) { if wsc == nil || len(wsc.Root) == 0 || wsc.Epoch == 0 { - log.Warn("No valid weak subjectivity checkpoint specified, running without weak subjectivity verification") + log.Info("No checkpoint for syncing provided, node will begin syncing from genesis. Checkpoint Sync is an optional feature that allows your node to sync from a more recent checkpoint, " + + "which enhances the security of your local beacon node and the broader network. See https://docs.prylabs.network/docs/next/prysm-usage/checkpoint-sync/ to learn how to configure Checkpoint Sync.") return &WeakSubjectivityVerifier{ enabled: false, }, nil @@ -58,7 +59,6 @@ func (v *WeakSubjectivityVerifier) VerifyWeakSubjectivity(ctx context.Context, f if v.verified || !v.enabled { return nil } - // Two conditions are described in the specs: // IF epoch_number > store.finalized_checkpoint.epoch, // then ASSERT during block sync that block with root block_root @@ -92,6 +92,5 @@ func (v *WeakSubjectivityVerifier) VerifyWeakSubjectivity(ctx context.Context, f return nil } } - return errors.Wrap(errWSBlockNotFoundInEpoch, fmt.Sprintf("root=%#x, epoch=%d", v.root, v.epoch)) }