From d63ddec7a491ce45247a3ea6d114ac59ba98fb8a Mon Sep 17 00:00:00 2001 From: Fridrik Asmundsson Date: Thu, 20 Apr 2023 11:50:04 +0000 Subject: [PATCH] perf: Increase noncecache in MessagePool --- chain/messagepool/messagepool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index c61760af6e..8b2f6ce961 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -371,7 +371,7 @@ func (ms *msgSet) toSlice() []*types.SignedMessage { func New(ctx context.Context, api Provider, ds dtypes.MetadataDS, us stmgr.UpgradeSchedule, netName dtypes.NetworkName, j journal.Journal) (*MessagePool, error) { cache, _ := lru.New2Q[cid.Cid, crypto.Signature](build.BlsSignatureCacheSize) verifcache, _ := lru.New2Q[string, struct{}](build.VerifSigCacheSize) - noncecache, _ := lru.New[nonceCacheKey, uint64](256) + noncecache, _ := lru.New[nonceCacheKey, uint64](32768) // 32k * ~100 bytes = 3MB keycache, _ := lru.New[address.Address, address.Address](1_000_000) cfg, err := loadConfig(ctx, ds)