Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make some checktx logs debug #73

Merged
merged 1 commit into from
Feb 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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