From ea50497612234fa43ed35fd7ed80c370dbfc3a73 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 5 Nov 2024 09:23:11 -0500 Subject: [PATCH] Increase RPC-CORE default capacity --- packages/rpc-core/src/bundle.ts | 2 +- packages/rpc-provider/src/lru.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rpc-core/src/bundle.ts b/packages/rpc-core/src/bundle.ts index 702f22b43a6..72e99f0aff2 100644 --- a/packages/rpc-core/src/bundle.ts +++ b/packages/rpc-core/src/bundle.ts @@ -123,7 +123,7 @@ export class RpcCore { // these are the base keys (i.e. part of jsonrpc) this.sections.push(...sectionNames); - this.#storageCache = new LRUCache(DEFAULT_CAPACITY); + this.#storageCache = new LRUCache(DEFAULT_CAPACITY * 10 * 10); // decorate all interfaces, defined and user on this instance this.addUserInterfaces(userRpc); } diff --git a/packages/rpc-provider/src/lru.ts b/packages/rpc-provider/src/lru.ts index 0a6927ef1d7..dc042ed5358 100644 --- a/packages/rpc-provider/src/lru.ts +++ b/packages/rpc-provider/src/lru.ts @@ -5,7 +5,7 @@ // cache space (depending on the historic queries this would vary, metadata // for Kusama/Polkadot/Substrate falls between 600-750K, 2x for estimate) -export const DEFAULT_CAPACITY = 64; +export const DEFAULT_CAPACITY = 1024; class LRUNode { readonly key: string;