Skip to content

Commit

Permalink
Add OE info logs for easier debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyding committed Jan 12, 2025
1 parent 20a978a commit cd2ba26
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions baseapp/oe/optimistic_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (oe *OptimisticExecution) Execute(req *abci.RequestProcessProposal) {
ProposerAddress: req.ProposerAddress,
}

oe.logger.Debug("OE started", "height", req.Height, "hash", hex.EncodeToString(req.Hash), "time", req.Time.String())
oe.logger.Info("OE started", "height", req.Height, "hash", hex.EncodeToString(req.Hash), "time", req.Time.String())
ctx, cancel := context.WithCancel(context.Background())
oe.cancelFunc = cancel
oe.initialized = true
Expand All @@ -110,7 +110,7 @@ func (oe *OptimisticExecution) Execute(req *abci.RequestProcessProposal) {
oe.mtx.Lock()

executionTime := time.Since(start)
oe.logger.Debug("OE finished", "duration", executionTime.String(), "height", oe.request.Height, "hash", hex.EncodeToString(oe.request.Hash))
oe.logger.Info("OE finished", "duration", executionTime.String(), "height", oe.request.Height, "hash", hex.EncodeToString(oe.request.Hash))
oe.response, oe.err = resp, err

close(oe.stopCh)
Expand Down Expand Up @@ -149,6 +149,12 @@ func (oe *OptimisticExecution) Abort() {
return
}

if oe.request != nil {
oe.logger.Info("OE aborted", "height", oe.request.Height, "hash", hex.EncodeToString(oe.request.Hash))
} else {
oe.logger.Info("OE aborted (oe.request is nil)")
}

oe.cancelFunc()
<-oe.stopCh
}
Expand Down

0 comments on commit cd2ba26

Please sign in to comment.