Skip to content

Commit

Permalink
Make some checktx logs debug (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipsu522 authored Feb 27, 2023
1 parent 8c91725 commit 8699c1f
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions internal/mempool/reactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"runtime/debug"
"strings"
"sync"

"github.com/tendermint/tendermint/config"
Expand Down Expand Up @@ -149,9 +150,22 @@ func (r *Reactor) handleMempoolMessage(ctx context.Context, envelope *p2p.Envelo
return nil
}

logger.Info("checktx failed for tx",
"tx", fmt.Sprintf("%X", types.Tx(tx).Hash()),
"err", err)
// The following mempool errors are rpetty noisy and not too useful:
// 1. "the validator has already submitted a vote" typically occurs when a node is catching up but still receiving oracle votes
// 2. "please verify account number" is flaky or if the client passes in the wrong sequence number / retries the same tx multiple times
// 3. "account sequence mismatch" is usually when a client forgets to supply a flag
// The last 2 of these errors are surfaced to the client anyways
if strings.Contains(err.Error(), "the validator has already submitted a vote") ||
strings.Contains(err.Error(), "please verify account number") ||
strings.Contains(err.Error(), "account sequence mismatch") {
logger.Debug("checktx failed for tx",
"tx", fmt.Sprintf("%X", types.Tx(tx).Hash()),
"err", err)
} else {
logger.Info("checktx failed for tx",
"tx", fmt.Sprintf("%X", types.Tx(tx).Hash()),
"err", err)
}
}
}

Expand Down

0 comments on commit 8699c1f

Please sign in to comment.