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

Reduce noisy tendermint logs #163

Merged
merged 2 commits into from
Oct 12, 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
22 changes: 11 additions & 11 deletions internal/consensus/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ func (cs *State) enterPrevote(ctx context.Context, height int64, round int32, en
logger := cs.logger.With("height", height, "round", round)

if cs.roundState.Height() != height || round < cs.roundState.Round() || (cs.roundState.Round() == round && cstypes.RoundStepPrevote <= cs.roundState.Step()) {
logger.Info(
logger.Debug(
"entering prevote step with invalid args",
"current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()),
"time", time.Now().UnixMilli(),
Expand All @@ -1613,7 +1613,7 @@ func (cs *State) enterPrevote(ctx context.Context, height int64, round int32, en
cs.newStep()
}()

logger.Info("entering prevote step", "current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()), "time", time.Now().UnixMilli())
logger.Debug("entering prevote step", "current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()), "time", time.Now().UnixMilli())

// Sign and broadcast vote as necessary
cs.doPrevote(ctx, height, round)
Expand Down Expand Up @@ -1804,7 +1804,7 @@ func (cs *State) enterPrevoteWait(height int64, round int32) {
logger := cs.logger.With("height", height, "round", round)

if cs.roundState.Height() != height || round < cs.roundState.Round() || (cs.roundState.Round() == round && cstypes.RoundStepPrevoteWait <= cs.roundState.Step()) {
logger.Info(
logger.Debug(
"entering prevote wait step with invalid args",
"current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()),
"time", time.Now().UnixMilli(),
Expand All @@ -1819,7 +1819,7 @@ func (cs *State) enterPrevoteWait(height int64, round int32) {
))
}

logger.Info("entering prevote wait step", "current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()), "time", time.Now().UnixMilli())
logger.Debug("entering prevote wait step", "current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()), "time", time.Now().UnixMilli())

defer func() {
// Done enterPrevoteWait:
Expand All @@ -1845,7 +1845,7 @@ func (cs *State) enterPrecommit(ctx context.Context, height int64, round int32,
logger := cs.logger.With("height", height, "round", round)

if cs.roundState.Height() != height || round < cs.roundState.Round() || (cs.roundState.Round() == round && cstypes.RoundStepPrecommit <= cs.roundState.Step()) {
logger.Info(
logger.Debug(
"entering precommit step with invalid args",
"current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()),
"time", time.Now().UnixMilli(),
Expand All @@ -1855,7 +1855,7 @@ func (cs *State) enterPrecommit(ctx context.Context, height int64, round int32,
return
}

logger.Info("entering precommit step", "current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()), "time", time.Now().UnixMilli())
logger.Debug("entering precommit step", "current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()), "time", time.Now().UnixMilli())

defer func() {
// Done enterPrecommit:
Expand Down Expand Up @@ -1965,7 +1965,7 @@ func (cs *State) enterPrecommitWait(height int64, round int32) {
logger := cs.logger.With("height", height, "round", round)

if cs.roundState.Height() != height || round < cs.roundState.Round() || (cs.roundState.Round() == round && cs.roundState.TriggeredTimeoutPrecommit()) {
logger.Info(
logger.Debug(
"entering precommit wait step with invalid args",
"triggered_timeout", cs.roundState.TriggeredTimeoutPrecommit(),
"current", fmt.Sprintf("%v/%v", cs.roundState.Height(), cs.roundState.Round()),
Expand All @@ -1981,7 +1981,7 @@ func (cs *State) enterPrecommitWait(height int64, round int32) {
))
}

logger.Info("entering precommit wait step", "current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()), "time", time.Now().UnixMilli())
logger.Debug("entering precommit wait step", "current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()), "time", time.Now().UnixMilli())

defer func() {
// Done enterPrecommitWait:
Expand All @@ -2003,15 +2003,15 @@ func (cs *State) enterCommit(ctx context.Context, height int64, commitRound int3
logger := cs.logger.With("height", height, "commit_round", commitRound)

if cs.roundState.Height() != height || cstypes.RoundStepCommit <= cs.roundState.Step() {
logger.Info(
logger.Debug(
Copy link
Contributor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, check again?

"entering commit step with invalid args",
"current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()),
"time", time.Now().UnixMilli(),
)
return
}

logger.Info("entering commit step", "current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()), "time", time.Now().UnixMilli())
logger.Debug("entering commit step", "current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()), "time", time.Now().UnixMilli())

defer func() {
// Done enterCommit:
Expand Down Expand Up @@ -2100,7 +2100,7 @@ func (cs *State) finalizeCommit(ctx context.Context, height int64) {
logger := cs.logger.With("height", height)

if cs.roundState.Height() != height || cs.roundState.Step() != cstypes.RoundStepCommit {
logger.Info(
logger.Debug(
"entering finalize commit step",
"current", fmt.Sprintf("%v/%v/%v", cs.roundState.Height(), cs.roundState.Round(), cs.roundState.Step()),
"time", time.Now().UnixMilli(),
Expand Down