Make some logs quieter
This commit is contained in:
parent
d421274dcd
commit
9270ac6358
@ -49,7 +49,7 @@ func (s *server) HandleStream(stream inet.Stream) {
|
|||||||
log.Warnf("failed to read block sync request: %s", err)
|
log.Warnf("failed to read block sync request: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Infow("block sync request",
|
log.Debugw("block sync request",
|
||||||
"start", req.Head, "len", req.Length)
|
"start", req.Head, "len", req.Length)
|
||||||
|
|
||||||
resp, err := s.processRequest(ctx, &req)
|
resp, err := s.processRequest(ctx, &req)
|
||||||
|
@ -264,7 +264,7 @@ func (ms *msgSet) add(m *types.SignedMessage, mp *MessagePool, strict, untrusted
|
|||||||
}
|
}
|
||||||
|
|
||||||
if strict && nonceGap {
|
if strict && nonceGap {
|
||||||
log.Warnf("adding nonce-gapped message from %s (nonce: %d, nextNonce: %d)",
|
log.Debugf("adding nonce-gapped message from %s (nonce: %d, nextNonce: %d)",
|
||||||
m.Message.From, m.Message.Nonce, nextNonce)
|
m.Message.From, m.Message.Nonce, nextNonce)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1219,7 +1219,7 @@ func (mp *MessagePool) MessagesForBlocks(blks []*types.BlockHeader) ([]*types.Si
|
|||||||
if smsg != nil {
|
if smsg != nil {
|
||||||
out = append(out, smsg)
|
out = append(out, smsg)
|
||||||
} else {
|
} else {
|
||||||
log.Warnf("could not recover signature for bls message %s", msg.Cid())
|
log.Debugf("could not recover signature for bls message %s", msg.Cid())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@ func (cs *ChainStore) SubHeadChanges(ctx context.Context) chan []*api.HeadChange
|
|||||||
log.Warn("chain head sub exit loop")
|
log.Warn("chain head sub exit loop")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(out) > 0 {
|
if len(out) > 5 {
|
||||||
log.Warnf("head change sub is slow, has %d buffered entries", len(out))
|
log.Warnf("head change sub is slow, has %d buffered entries", len(out))
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
|
@ -95,7 +95,10 @@ func HandleIncomingBlocks(ctx context.Context, bsub *pubsub.Subscription, s *cha
|
|||||||
}
|
}
|
||||||
|
|
||||||
took := build.Clock.Since(start)
|
took := build.Clock.Since(start)
|
||||||
log.Infow("new block over pubsub", "cid", blk.Header.Cid(), "source", msg.GetFrom(), "msgfetch", took)
|
log.Debugw("new block over pubsub", "cid", blk.Header.Cid(), "source", msg.GetFrom(), "msgfetch", took)
|
||||||
|
if took > 3*time.Second {
|
||||||
|
log.Warnw("Slow msg fetch", "cid", blk.Header.Cid(), "source", msg.GetFrom(), "msgfetch", took)
|
||||||
|
}
|
||||||
if delay := build.Clock.Now().Unix() - int64(blk.Header.Timestamp); delay > 5 {
|
if delay := build.Clock.Now().Unix() - int64(blk.Header.Timestamp); delay > 5 {
|
||||||
log.Warnf("Received block with large delay %d from miner %s", delay, blk.Header.Miner)
|
log.Warnf("Received block with large delay %d from miner %s", delay, blk.Header.Miner)
|
||||||
}
|
}
|
||||||
|
@ -278,7 +278,7 @@ func (syncer *Syncer) InformNewHead(from peer.ID, fts *store.FullTipSet) bool {
|
|||||||
for _, blk := range fts.TipSet().Blocks() {
|
for _, blk := range fts.TipSet().Blocks() {
|
||||||
miners = append(miners, blk.Miner.String())
|
miners = append(miners, blk.Miner.String())
|
||||||
}
|
}
|
||||||
log.Infow("incoming tipset does not appear to be better than our best chain, ignoring for now", "miners", miners, "bestPweight", bestPweight, "bestTS", hts.Cids(), "incomingWeight", targetWeight, "incomingTS", fts.TipSet().Cids())
|
log.Debugw("incoming tipset does not appear to be better than our best chain, ignoring for now", "miners", miners, "bestPweight", bestPweight, "bestTS", hts.Cids(), "incomingWeight", targetWeight, "incomingTS", fts.TipSet().Cids())
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ func (hs *Service) HandleStream(s inet.Stream) {
|
|||||||
hs.h.ConnManager().TagPeer(s.Conn().RemotePeer(), "fcpeer", 10)
|
hs.h.ConnManager().TagPeer(s.Conn().RemotePeer(), "fcpeer", 10)
|
||||||
|
|
||||||
// don't bother informing about genesis
|
// don't bother informing about genesis
|
||||||
log.Infof("Got new tipset through Hello: %s from %s", ts.Cids(), s.Conn().RemotePeer())
|
log.Debugf("Got new tipset through Hello: %s from %s", ts.Cids(), s.Conn().RemotePeer())
|
||||||
hs.syncer.InformNewHead(s.Conn().RemotePeer(), ts)
|
hs.syncer.InformNewHead(s.Conn().RemotePeer(), ts)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ func (hs *Service) SayHello(ctx context.Context, pid peer.ID) error {
|
|||||||
_ = s.SetReadDeadline(build.Clock.Now().Add(10 * time.Second))
|
_ = s.SetReadDeadline(build.Clock.Now().Add(10 * time.Second))
|
||||||
err := cborutil.ReadCborRPC(s, lmsg)
|
err := cborutil.ReadCborRPC(s, lmsg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Infow("reading latency message", "error", err)
|
log.Debugw("reading latency message", "error", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
t3 := build.Clock.Now()
|
t3 := build.Clock.Now()
|
||||||
@ -177,7 +177,9 @@ func (hs *Service) SayHello(ctx context.Context, pid peer.ID) error {
|
|||||||
t2 := time.Unix(0, lmsg.TSent)
|
t2 := time.Unix(0, lmsg.TSent)
|
||||||
offset := t0.Sub(t1) + t3.Sub(t2)
|
offset := t0.Sub(t1) + t3.Sub(t2)
|
||||||
offset /= 2
|
offset /= 2
|
||||||
log.Infow("time offset", "offset", offset.Seconds(), "peerid", pid.String())
|
if offset > 5*time.Second || offset < -5*time.Second {
|
||||||
|
log.Infow("time offset", "offset", offset.Seconds(), "peerid", pid.String())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
Loading…
Reference in New Issue
Block a user