From f6fde37a9a4cc7884efe620b38e94b6596a70b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Mon, 26 Sep 2022 21:17:37 +0300 Subject: [PATCH 1/3] Simplify / adjust config. --- adjust_config.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/adjust_config.py b/adjust_config.py index e89f7dc..d620b6c 100644 --- a/adjust_config.py +++ b/adjust_config.py @@ -18,14 +18,12 @@ def main(cli_args: List[str]): parser = ArgumentParser() parser.add_argument("--mode", choices=MODES, required=True) parser.add_argument("--file", required=True) - parser.add_argument("--api-simultaneous-requests", type=int, default=512) - parser.add_argument("--num-epochs-to-keep", type=int, default=128) + parser.add_argument("--api-simultaneous-requests", type=int, default=16384) parsed_args = parser.parse_args(cli_args) mode = parsed_args.mode file = parsed_args.file api_simultaneous_requests = parsed_args.api_simultaneous_requests - num_epochs_to_keep = parsed_args.num_epochs_to_keep data = toml.load(file) @@ -33,8 +31,8 @@ def main(cli_args: List[str]): data["GeneralSettings"]["StartInEpochEnabled"] = False data["DbLookupExtensions"]["Enabled"] = True data["StateTriesConfig"]["AccountsStatePruningEnabled"] = False + data["StoragePruning"]["ObserverCleanOldEpochsData"] = False data["StoragePruning"]["AccountsTrieCleanOldEpochsData"] = False - data["StoragePruning"]["NumEpochsToKeep"] = num_epochs_to_keep data["Antiflood"]["WebServer"]["SimultaneousRequests"] = api_simultaneous_requests elif mode == MODE_PREFS: data["Preferences"]["FullArchive"] = True From 8389e3fe80ad70345fb57f0d0a88af644741382e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Tue, 27 Sep 2022 09:56:35 +0300 Subject: [PATCH 2/3] Undo change. --- adjust_config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/adjust_config.py b/adjust_config.py index d620b6c..867caba 100644 --- a/adjust_config.py +++ b/adjust_config.py @@ -19,11 +19,13 @@ def main(cli_args: List[str]): parser.add_argument("--mode", choices=MODES, required=True) parser.add_argument("--file", required=True) parser.add_argument("--api-simultaneous-requests", type=int, default=16384) + parser.add_argument("--num-epochs-to-keep", type=int, default=128) parsed_args = parser.parse_args(cli_args) mode = parsed_args.mode file = parsed_args.file api_simultaneous_requests = parsed_args.api_simultaneous_requests + num_epochs_to_keep = parsed_args.num_epochs_to_keep data = toml.load(file) @@ -33,6 +35,7 @@ def main(cli_args: List[str]): data["StateTriesConfig"]["AccountsStatePruningEnabled"] = False data["StoragePruning"]["ObserverCleanOldEpochsData"] = False data["StoragePruning"]["AccountsTrieCleanOldEpochsData"] = False + data["StoragePruning"]["NumEpochsToKeep"] = num_epochs_to_keep data["Antiflood"]["WebServer"]["SimultaneousRequests"] = api_simultaneous_requests elif mode == MODE_PREFS: data["Preferences"]["FullArchive"] = True From 7c78f51c93dcc7735ac64a9632e651c3f8a4de47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Tue, 27 Sep 2022 12:39:38 +0300 Subject: [PATCH 3/3] Redo change. --- adjust_config.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/adjust_config.py b/adjust_config.py index 867caba..d620b6c 100644 --- a/adjust_config.py +++ b/adjust_config.py @@ -19,13 +19,11 @@ def main(cli_args: List[str]): parser.add_argument("--mode", choices=MODES, required=True) parser.add_argument("--file", required=True) parser.add_argument("--api-simultaneous-requests", type=int, default=16384) - parser.add_argument("--num-epochs-to-keep", type=int, default=128) parsed_args = parser.parse_args(cli_args) mode = parsed_args.mode file = parsed_args.file api_simultaneous_requests = parsed_args.api_simultaneous_requests - num_epochs_to_keep = parsed_args.num_epochs_to_keep data = toml.load(file) @@ -35,7 +33,6 @@ def main(cli_args: List[str]): data["StateTriesConfig"]["AccountsStatePruningEnabled"] = False data["StoragePruning"]["ObserverCleanOldEpochsData"] = False data["StoragePruning"]["AccountsTrieCleanOldEpochsData"] = False - data["StoragePruning"]["NumEpochsToKeep"] = num_epochs_to_keep data["Antiflood"]["WebServer"]["SimultaneousRequests"] = api_simultaneous_requests elif mode == MODE_PREFS: data["Preferences"]["FullArchive"] = True