Skip to content

Commit

Permalink
Problem: block-stm executor status not logged
Browse files Browse the repository at this point in the history
Solution:
- add a log with the number of workers
  • Loading branch information
yihuang committed Aug 14, 2024
1 parent bc5dfc5 commit 4d5c96a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"net/http"
"os"
"path/filepath"
stdruntime "runtime"

Check notice

Code scanning / CodeQL

Sensitive package import Note

Certain system packages contain functions which may be a possible source of non-determinism
"sort"

abci "github.com/cometbft/cometbft/abci/types"
Expand Down Expand Up @@ -424,6 +425,10 @@ func New(
if blockSTMEnabled {
sdk.SetAddrCacheEnabled(false)
workers := cast.ToInt(appOpts.Get(srvflags.EVMBlockSTMWorkers))
if workers == 0 {
workers = stdruntime.NumCPU()
}
logger.Info("block-stm executor enabled", "workers", workers)
app.SetTxExecutor(evmapp.STMTxExecutor(app.GetStoreKeys(), workers))
} else {
app.SetTxExecutor(evmapp.DefaultTxExecutor)
Expand Down

0 comments on commit 4d5c96a

Please sign in to comment.