From 7c1c43ecbd00db4481ae0c19871c170761b6aa0c Mon Sep 17 00:00:00 2001 From: Konstantin <355847+Frozen@users.noreply.github.com> Date: Thu, 18 Aug 2022 00:00:41 +0300 Subject: [PATCH] Reduce cache size. (#4268) --- core/blockchain_impl.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/blockchain_impl.go b/core/blockchain_impl.go index 6e7c2ccf9..e97c2dcd1 100644 --- a/core/blockchain_impl.go +++ b/core/blockchain_impl.go @@ -93,10 +93,10 @@ var ( ) const ( - bodyCacheLimit = 2048 - blockCacheLimit = 2048 + bodyCacheLimit = 128 + blockCacheLimit = 128 receiptsCacheLimit = 32 - maxFutureBlocks = 256 + maxFutureBlocks = 16 maxTimeFutureBlocks = 30 badBlockLimit = 10 triesInMemory = 128 @@ -105,13 +105,13 @@ const ( commitsCacheLimit = 10 epochCacheLimit = 10 randomnessCacheLimit = 10 - validatorCacheLimit = 1024 - validatorStatsCacheLimit = 1024 + validatorCacheLimit = 128 + validatorStatsCacheLimit = 128 validatorListCacheLimit = 10 - validatorListByDelegatorCacheLimit = 1024 + validatorListByDelegatorCacheLimit = 128 pendingCrossLinksCacheLimit = 2 - blockAccumulatorCacheLimit = 256 - maxPendingSlashes = 512 + blockAccumulatorCacheLimit = 64 + maxPendingSlashes = 256 // BlockChainVersion ensures that an incompatible database forces a resync from scratch. BlockChainVersion = 3 pendingCLCacheKey = "pendingCLs"