diff --git a/consensus/parlia/parlia.go b/consensus/parlia/parlia.go index 40df9fa296..33e5cf3f20 100644 --- a/consensus/parlia/parlia.go +++ b/consensus/parlia/parlia.go @@ -144,7 +144,9 @@ var ( errBlockHashInconsistent = errors.New("the block hash is inconsistent") // errUnauthorizedValidator is returned if a header is signed by a non-authorized entity. - errUnauthorizedValidator = errors.New("unauthorized validator") + errUnauthorizedValidator = func(val string) error { + return errors.New("unauthorized validator: " + val) + } // errCoinBaseMisMatch is returned if a header's coinbase do not match with signature errCoinBaseMisMatch = errors.New("coinbase do not match with signature") @@ -773,7 +775,7 @@ func (p *Parlia) verifySeal(chain consensus.ChainHeaderReader, header *types.Hea } if _, ok := snap.Validators[signer]; !ok { - return errUnauthorizedValidator + return errUnauthorizedValidator(signer.String()) } if snap.SignRecently(signer) { @@ -1319,7 +1321,7 @@ func (p *Parlia) Seal(chain consensus.ChainHeaderReader, block *types.Block, res // Bail out if we're unauthorized to sign a block if _, authorized := snap.Validators[val]; !authorized { - return errUnauthorizedValidator + return errUnauthorizedValidator(val.String()) } // If we're amongst the recent signers, wait for the next block @@ -1429,7 +1431,7 @@ func (p *Parlia) SignRecently(chain consensus.ChainReader, parent *types.Block) // Bail out if we're unauthorized to sign a block if _, authorized := snap.Validators[p.val]; !authorized { - return true, errUnauthorizedValidator + return true, errUnauthorizedValidator(p.val.String()) } return snap.SignRecently(p.val), nil @@ -1869,7 +1871,7 @@ func (p *Parlia) backOffTime(snap *Snapshot, header *types.Header, val common.Ad } } if idx < 0 { - log.Info("The validator is not authorized", "addr", val) + log.Debug("The validator is not authorized", "addr", val) return 0 } diff --git a/consensus/parlia/snapshot.go b/consensus/parlia/snapshot.go index 95e952ca84..5494cb6e2d 100644 --- a/consensus/parlia/snapshot.go +++ b/consensus/parlia/snapshot.go @@ -256,7 +256,7 @@ func (s *Snapshot) apply(headers []*types.Header, chain consensus.ChainHeaderRea return nil, err } if _, ok := snap.Validators[validator]; !ok { - return nil, errUnauthorizedValidator + return nil, errUnauthorizedValidator(validator.String()) } for _, recent := range snap.Recents { if recent == validator { diff --git a/core/rawdb/chain_iterator.go b/core/rawdb/chain_iterator.go index 13e684a69c..7974210895 100644 --- a/core/rawdb/chain_iterator.go +++ b/core/rawdb/chain_iterator.go @@ -348,7 +348,7 @@ func unindexTransactions(db ethdb.Database, from uint64, to uint64, interrupt ch case <-interrupt: log.Debug("Transaction unindexing interrupted", "blocks", blocks, "txs", txs, "tail", to, "elapsed", common.PrettyDuration(time.Since(start))) default: - log.Info("Unindexed transactions", "blocks", blocks, "txs", txs, "tail", to, "elapsed", common.PrettyDuration(time.Since(start))) + log.Debug("Unindexed transactions", "blocks", blocks, "txs", txs, "tail", to, "elapsed", common.PrettyDuration(time.Since(start))) } } diff --git a/miner/worker.go b/miner/worker.go index 9f4cce2988..e4a3e5a4ff 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -419,7 +419,7 @@ func (w *worker) newWorkLoop(recommit time.Duration) { if p, ok := w.engine.(*parlia.Parlia); ok { signedRecent, err := p.SignRecently(w.chain, head.Block) if err != nil { - log.Info("Not allowed to propose block", "err", err) + log.Debug("Not allowed to propose block", "err", err) continue } if signedRecent {