diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 6f594f69..ade22d21 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -32,6 +32,7 @@ IMPROVEMENTS: - [mempool] Now stores txs by hash inside of the cache, to mitigate memory leakage - [config] Replace db_path with db_dir from automatically generated configuration files. Issue reported to Cosmos SDK ([#1712](https://github.com/cosmos/cosmos-sdk/issues/1712)) +- [config] Reduce default mempool size from 100k to 5k, until ABCI rechecking is implemented. BUG FIXES: - [mempool] No longer possible to fill up linked list without getting caching diff --git a/config/config.go b/config/config.go index 51683ef0..48793f0f 100644 --- a/config/config.go +++ b/config/config.go @@ -421,8 +421,10 @@ func DefaultMempoolConfig() *MempoolConfig { RecheckEmpty: true, Broadcast: true, WalPath: filepath.Join(defaultDataDir, "mempool.wal"), - Size: 100000, - CacheSize: 100000, + // Each signature verification takes .5ms, size reduced until we implement + // ABCI Recheck + Size: 5000, + CacheSize: 10000, } } diff --git a/consensus/mempool_test.go b/consensus/mempool_test.go index c905f50b..81d7693f 100644 --- a/consensus/mempool_test.go +++ b/consensus/mempool_test.go @@ -99,7 +99,7 @@ func TestMempoolTxConcurrentWithCommit(t *testing.T) { height, round := cs.Height, cs.Round newBlockCh := subscribe(cs.eventBus, types.EventQueryNewBlock) - NTxs := 10000 + NTxs := 3000 go deliverTxsRange(cs, 0, NTxs) startTestRound(cs, height, round)