diff --git a/consensus/bor/bor.go b/consensus/bor/bor.go index 1874e44d74..5b4a78f04e 100644 --- a/consensus/bor/bor.go +++ b/consensus/bor/bor.go @@ -339,6 +339,8 @@ func (c *Bor) verifyHeader(chain consensus.ChainHeaderReader, header *types.Head number := header.Number.Uint64() + log.Info("***** Verifying header", "number", number) + // Don't waste time checking blocks from the future if header.Time > uint64(time.Now().Unix()) { return consensus.ErrFutureBlock @@ -667,6 +669,7 @@ func (c *Bor) verifySeal(chain consensus.ChainHeaderReader, header *types.Header } if !snap.ValidatorSet.HasAddress(signer) { + log.Info("***** Got unauthorised signer error", "signer", signer, "valset", fmt.Sprintf("%+v", snap.ValidatorSet)) // Check the UnauthorizedSignerError.Error() msg to see why we pass number-1 return &UnauthorizedSignerError{number - 1, signer.Bytes()} } diff --git a/eth/protocols/eth/dispatcher.go b/eth/protocols/eth/dispatcher.go index 3c0f36fc08..56ef3a6c8a 100644 --- a/eth/protocols/eth/dispatcher.go +++ b/eth/protocols/eth/dispatcher.go @@ -21,6 +21,7 @@ import ( "fmt" "time" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p" ) @@ -215,7 +216,8 @@ func (p *Peer) dispatcher() { } // Stop tracking the request delete(pending, cancelOp.id) - requestTracker.Fulfil(p.id, p.version, req.code, cancelOp.id) + log.Info("***** Cancelled request", "peer.id", p.id, "version", p.version, "code", req.code, "req.id", req.id) + requestTracker.Fulfil(p.id, p.version, req.code, req.id) cancelOp.fail <- nil case resOp := <-p.resDispatch: diff --git a/eth/protocols/eth/handler.go b/eth/protocols/eth/handler.go index 4d3987d444..65a65fc640 100644 --- a/eth/protocols/eth/handler.go +++ b/eth/protocols/eth/handler.go @@ -24,6 +24,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" @@ -154,6 +155,7 @@ func nodeInfo(chain *core.BlockChain, network uint64) *NodeInfo { // the protocol handshake. This method will keep processing messages until the // connection is torn down. func Handle(backend Backend, peer *Peer) error { + log.Info("***** In handle message", "peer.id", peer.id) for { if err := handleMessage(backend, peer); err != nil { peer.Log().Debug("Message handling failed in `eth`", "err", err) @@ -239,6 +241,8 @@ func handleMessage(backend Backend, peer *Peer) error { handlers = eth68 } + log.Info("***** In handle message", "peer.version", peer.Version()) + // Track the amount of time it takes to serve the request and run the handler if metrics.Enabled { h := fmt.Sprintf("%s/%s/%d/%#02x", p2p.HandleHistName, ProtocolName, peer.Version(), msg.Code)