diff --git a/CHANGELOG.md b/CHANGELOG.md index d6cddf87a6..f347d460e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ## v1.5.2 +* [#1892](https://github.com/crypto-org-chain/cronos/pull/1892) fix: disable memiavl cache when optimistic execution is enabled. * [#1893](https://github.com/crypto-org-chain/cronos/pull/1893) Normalize cache validator queue key to be UTC. * [#1850](https://github.com/crypto-org-chain/cronos/pull/1850) Optimize staking endblocker execution by caching queue entries from iterators. Upgrade RocksDB to `v10.4.2` and enable asyncIO. diff --git a/app/app.go b/app/app.go index b24017baff..dc59355408 100644 --- a/app/app.go +++ b/app/app.go @@ -410,16 +410,19 @@ func New( }) blockSTMEnabled := cast.ToString(appOpts.Get(srvflags.EVMBlockExecutor)) == "block-stm" + optimisticExecutionDisabled := cast.ToString(appOpts.Get(srvflags.EVMOptimisticExecution)) == "disable" var cacheSize int - if !blockSTMEnabled { - // only enable memiavl cache if block-stm is not enabled, because it's not concurrency-safe. + if !blockSTMEnabled && optimisticExecutionDisabled { + // only enable memiavl cache if neither block-stm nor optimistic execution is enabled, because it's not concurrency-safe. cacheSize = cast.ToInt(appOpts.Get(memiavlstore.FlagCacheSize)) } baseAppOptions = memiavlstore.SetupMemIAVL(logger, homePath, appOpts, false, false, cacheSize, baseAppOptions) - // enable optimistic execution - baseAppOptions = append(baseAppOptions, baseapp.SetOptimisticExecution()) + // The default value of optimisticExecution is enabled. + if !optimisticExecutionDisabled { + 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...) diff --git a/go.mod b/go.mod index ac6721c323..73c850b13e 100644 --- a/go.mod +++ b/go.mod @@ -306,7 +306,7 @@ replace ( // release/v1.15 github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20250815065500-a4fbafcae0dd // release/v0.22.x - github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.22.1-0.20251023055101-b88263e5b552 + github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.22.1-0.20251028053456-6d16dd884c83 // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 diff --git a/go.sum b/go.sum index 42b9302a83..2e13f3ba2e 100644 --- a/go.sum +++ b/go.sum @@ -912,8 +912,8 @@ github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241217090828-cfbca9fe8254 github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241217090828-cfbca9fe8254/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241217090828-cfbca9fe8254 h1:JzLOFRiKsDtLJt5h0M0jkEIPDKvFFyja7VEp7gG6O9U= github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241217090828-cfbca9fe8254/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= -github.com/crypto-org-chain/ethermint v0.22.1-0.20251023055101-b88263e5b552 h1:CsOD4gUc6gd7S/J2QghCualcC/Rb1JNdgXjBgMtPbQw= -github.com/crypto-org-chain/ethermint v0.22.1-0.20251023055101-b88263e5b552/go.mod h1:jLZdUMGYqWOuitjw8+U3HcM+BcFeBkoNJYPvRb9r76U= +github.com/crypto-org-chain/ethermint v0.22.1-0.20251028053456-6d16dd884c83 h1:ouTg/5YRD0ne5ZJlKwAGrIGvBsu2rQoHEetWesqzglw= +github.com/crypto-org-chain/ethermint v0.22.1-0.20251028053456-6d16dd884c83/go.mod h1:jLZdUMGYqWOuitjw8+U3HcM+BcFeBkoNJYPvRb9r76U= github.com/crypto-org-chain/go-block-stm v0.0.0-20241213061541-7afe924fb4a6 h1:6KPEi8dWkDSBddQb4NAvEXmNnTXymF3yVeTaT4Hz1iU= github.com/crypto-org-chain/go-block-stm v0.0.0-20241213061541-7afe924fb4a6/go.mod h1:iwQTX9xMX8NV9k3o2BiWXA0SswpsZrDk5q3gA7nWYiE= github.com/crypto-org-chain/go-ethereum v1.10.20-0.20250815065500-a4fbafcae0dd h1:ebSnzvM9yKVGFjvoGly7LFQQCS2HuOWMCvQyByJ52Gs= diff --git a/gomod2nix.toml b/gomod2nix.toml index 3bf6c272ae..edaa8bc353 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -315,8 +315,8 @@ schema = 3 version = "v0.2.2" hash = "sha256-0MLfSJKdeK3Z7tWAXTdzwB4091dmyxIX38S5SKH5QAw=" [mod."github.com/evmos/ethermint"] - version = "v0.22.1-0.20251023055101-b88263e5b552" - hash = "sha256-tqoHuxVFUUDuCms6L4M0IluA1evydzxRjeLp+3mlrHk=" + version = "v0.22.1-0.20251028053456-6d16dd884c83" + hash = "sha256-ZMT6uziS698fGQ+tLHcu0WZVTG9iBxv/odrpaxgVx0M=" replaced = "github.com/crypto-org-chain/ethermint" [mod."github.com/fatih/color"] version = "v1.17.0"