From 7bd1c1f23d7d9b4026e1ad95eb7edf60ff1f6ef7 Mon Sep 17 00:00:00 2001 From: Hyunsik Lee Date: Wed, 16 Sep 2020 02:15:48 +0900 Subject: [PATCH 1/2] Disable noisy log from consensus engine --- consensus/parlia/parlia.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consensus/parlia/parlia.go b/consensus/parlia/parlia.go index ea4b4b33f..4ef4a0023 100644 --- a/consensus/parlia/parlia.go +++ b/consensus/parlia/parlia.go @@ -947,11 +947,11 @@ func (p *Parlia) distributeIncoming(val common.Address, state *state.StateDB, he if err != nil { return err } - log.Info("distribute to system reward pool", "block hash", header.Hash(), "amount", rewards) + // log.Info("distribute to system reward pool", "block hash", header.Hash(), "amount", rewards) balance = balance.Sub(balance, rewards) } } - log.Info("distribute to validator contract", "block hash", header.Hash(), "amount", balance) + /// log.Info("distribute to validator contract", "block hash", header.Hash(), "amount", balance) return p.distributeToValidator(balance, val, state, header, chain, txs, receipts, receivedTxs, usedGas, mining) } From cb1afd2b14f52549a9970bf0384b0689120231e3 Mon Sep 17 00:00:00 2001 From: Hyunsik Lee Date: Sun, 20 Sep 2020 15:51:59 +0900 Subject: [PATCH 2/2] Hide some smart contract tracing logs from parlia consensus engine --- consensus/parlia/parlia.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/consensus/parlia/parlia.go b/consensus/parlia/parlia.go index 4ef4a0023..7b92bd71e 100644 --- a/consensus/parlia/parlia.go +++ b/consensus/parlia/parlia.go @@ -680,7 +680,7 @@ func (p *Parlia) Finalize(chain consensus.ChainReader, header *types.Header, sta } } if !signedRecently { - log.Info("slash validator", "block hash", header.Hash(), "address", spoiledVal) + log.Trace("slash validator", "block hash", header.Hash(), "address", spoiledVal) err = p.slash(spoiledVal, state, header, cx, txs, receipts, systemTxs, usedGas, false) if err != nil { // it is possible that slash validator failed because of the slash channel is disabled. @@ -947,11 +947,11 @@ func (p *Parlia) distributeIncoming(val common.Address, state *state.StateDB, he if err != nil { return err } - // log.Info("distribute to system reward pool", "block hash", header.Hash(), "amount", rewards) + log.Trace("distribute to system reward pool", "block hash", header.Hash(), "amount", rewards) balance = balance.Sub(balance, rewards) } } - /// log.Info("distribute to validator contract", "block hash", header.Hash(), "amount", balance) + log.Trace("distribute to validator contract", "block hash", header.Hash(), "amount", balance) return p.distributeToValidator(balance, val, state, header, chain, txs, receipts, receivedTxs, usedGas, mining) } @@ -999,7 +999,7 @@ func (p *Parlia) initContract(state *state.StateDB, header *types.Header, chain for _, c := range contracts { msg := p.getSystemMessage(header.Coinbase, common.HexToAddress(c), data, common.Big0) // apply message - log.Info("init contract", "block hash", header.Hash(), "contract", c) + log.Trace("init contract", "block hash", header.Hash(), "contract", c) err = p.applyTransaction(msg, state, header, chain, txs, receipts, receivedTxs, usedGas, mining) if err != nil { return err