Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into graceful-shutdown-…
Browse files Browse the repository at this point in the history
…websocket
  • Loading branch information
mmsqe committed Oct 29, 2024
2 parents 622cf8f + e567c5a commit 852b2d9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#522](https://github.com/crypto-org-chain/ethermint/pull/522) block-stm executor support optional pre-estimations.
* [#526](https://github.com/crypto-org-chain/ethermint/pull/526), [#535](https://github.com/crypto-org-chain/ethermint/pull/535) Avoid unnecessary block result in header related api call.
* [#533](https://github.com/crypto-org-chain/ethermint/pull/533) Bump cosmos-sdk to v0.50.10, cometbft to v0.38.13 and ibc-go to v8.5.1.
* [#546](https://github.com/crypto-org-chain/ethermint/pull/546) Introduce `--async-check-tx` flag to run check-tx async with consensus.

## v0.21.x-cronos

Expand Down
15 changes: 14 additions & 1 deletion server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ import (
ethermint "github.com/evmos/ethermint/types"
)

const FlagAsyncCheckTx = "async-check-tx"

// DBOpener is a function to open `application.db`, potentially with customized options.
type DBOpener func(opts types.AppOptions, rootDir string, backend dbm.BackendType) (dbm.DB, error)

Expand Down Expand Up @@ -227,6 +229,8 @@ which accepts a path for the resulting pprof file.
cmd.Flags().Uint32(server.FlagStateSyncSnapshotKeepRecent, 2, "State sync snapshot to keep")
cmd.Flags().Int(server.FlagMempoolMaxTxs, config.DefaultMaxTxs, "Sets MaxTx value for the app-side mempool")

cmd.Flags().Bool(FlagAsyncCheckTx, false, "Enable async check tx [experimental]")

// add support for all CometBFT-specific command line options
tcmd.AddNodeFlags(cmd)
return cmd
Expand Down Expand Up @@ -355,12 +359,21 @@ func startInProcess(svrCtx *server.Context, clientCtx client.Context, opts Start
logger.Info("starting node with ABCI CometBFT in-process")

cmtApp := server.NewCometABCIWrapper(app)

var clientCreator proxy.ClientCreator
if svrCtx.Viper.GetBool(FlagAsyncCheckTx) {
logger.Info("enabling async check tx")
clientCreator = proxy.NewConnSyncLocalClientCreator(cmtApp)
} else {
clientCreator = proxy.NewLocalClientCreator(cmtApp)
}

tmNode, err = node.NewNodeWithContext(
ctx,
cfg,
pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()),
nodeKey,
proxy.NewLocalClientCreator(cmtApp),
clientCreator,
genDocProvider,
cmtcfg.DefaultDBProvider,
node.DefaultMetricsProvider(cfg.Instrumentation),
Expand Down

0 comments on commit 852b2d9

Please sign in to comment.