From ee5f2a926dfbb95702d6afa53959fdcc784af3c1 Mon Sep 17 00:00:00 2001 From: dan-starkware <56217775+dan-starkware@users.noreply.github.com> Date: Sun, 5 Nov 2023 14:39:25 +0200 Subject: [PATCH] perf(sync): set higher class cache (#1356) --- config/default_config.json | 4 ++-- ...apyrus_node__config__config_test__dump_default_config.snap | 2 +- crates/papyrus_sync/src/sources/central.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/default_config.json b/config/default_config.json index d210aee425..eec024e691 100644 --- a/config/default_config.json +++ b/config/default_config.json @@ -12,7 +12,7 @@ "central.class_cache_size": { "description": "Size of class cache, must be a positive integer.", "privacy": "Public", - "value": 30 + "value": 100 }, "central.concurrent_requests": { "description": "Maximum number of concurrent requests to Starknet feeder-gateway for getting a type of data (for example, blocks).", @@ -209,4 +209,4 @@ "privacy": "Public", "value": 1000 } -} \ No newline at end of file +} diff --git a/crates/papyrus_node/src/config/snapshots/papyrus_node__config__config_test__dump_default_config.snap b/crates/papyrus_node/src/config/snapshots/papyrus_node__config__config_test__dump_default_config.snap index 2e491b5d3b..ca0a633fc8 100644 --- a/crates/papyrus_node/src/config/snapshots/papyrus_node__config__config_test__dump_default_config.snap +++ b/crates/papyrus_node/src/config/snapshots/papyrus_node__config__config_test__dump_default_config.snap @@ -16,7 +16,7 @@ expression: dumped_default_config "central.class_cache_size": { "description": "Size of class cache, must be a positive integer.", "value": { - "$serde_json::private::Number": "30" + "$serde_json::private::Number": "100" }, "privacy": "Public" }, diff --git a/crates/papyrus_sync/src/sources/central.rs b/crates/papyrus_sync/src/sources/central.rs index 4b08dba7b2..da3d5ef319 100644 --- a/crates/papyrus_sync/src/sources/central.rs +++ b/crates/papyrus_sync/src/sources/central.rs @@ -61,7 +61,7 @@ impl Default for CentralSourceConfig { max_state_updates_to_download: 20, max_state_updates_to_store_in_memory: 20, max_classes_to_download: 20, - class_cache_size: 30, + class_cache_size: 100, retry_config: RetryConfig { retry_base_millis: 30, retry_max_delay_millis: 30000,