From 31ec2c7f5c2360aea6b73d2b4c6912362e407889 Mon Sep 17 00:00:00 2001 From: huangyi Date: Wed, 26 Jun 2024 20:13:16 +0800 Subject: [PATCH] Problem: optimistic execution is not enabled by default Solution: - enable it --- CHANGELOG.md | 1 + app/app.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19cee17569..2b5632abcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ * [#1464](https://github.com/crypto-org-chain/cronos/pull/1464) Update cosmos-sdk to `v0.50.7`. * (rpc) [#1467](https://github.com/crypto-org-chain/cronos/pull/1467) Avoid unnecessary tx decode in tx listener. * [#1484](https://github.com/crypto-org-chain/cronos/pull/1484) Respect gas wanted returned by ante handler. +* [#1467](https://github.com/crypto-org-chain/cronos/pull/1467) Enable optimistic execution. ### Bug Fixes diff --git a/app/app.go b/app/app.go index e213077fe9..678ccc0a7b 100644 --- a/app/app.go +++ b/app/app.go @@ -384,6 +384,10 @@ func New( homePath := cast.ToString(appOpts.Get(flags.FlagHome)) baseAppOptions = memiavlstore.SetupMemIAVL(logger, homePath, appOpts, false, false, baseAppOptions) + + // enable optimistic execution + baseAppOptions = append(baseAppOptions, baseapp.SetOptimisticExecution()) + // NOTE we use custom transaction decoder that supports the sdk.Tx interface instead of sdk.StdTx bApp := baseapp.NewBaseApp(Name, logger, db, txConfig.TxDecoder(), baseAppOptions...)