From 70489486a8f818fcc0082510e1a5377c7b1fc7b4 Mon Sep 17 00:00:00 2001 From: Sheng Lundquist Date: Tue, 5 Nov 2024 10:08:29 -0800 Subject: [PATCH] Change logging level for specific trades missing in fork fuzz --- src/agent0/hyperfuzz/system_fuzz/run_fuzz_bots.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/agent0/hyperfuzz/system_fuzz/run_fuzz_bots.py b/src/agent0/hyperfuzz/system_fuzz/run_fuzz_bots.py index 87a08fb77b..59635ffd3b 100644 --- a/src/agent0/hyperfuzz/system_fuzz/run_fuzz_bots.py +++ b/src/agent0/hyperfuzz/system_fuzz/run_fuzz_bots.py @@ -168,8 +168,14 @@ def _check_trades_made_on_pool( error_message = "" if pool.name not in trade_counts["hyperdrive_name"].values: has_err = True + log_level = logging.ERROR error_message = f"Pool {pool.name} did not make any trades after {iteration} iterations" else: + # There may be cases where certain trades may not be possible + # (e.g., once we open a large trade, we can't add LP since we're not advancing + # time enough). Due to this, we only track these issues via warnings, + # where an actual pool without any trades is an error. + log_level = logging.WARNING pool_trade_event_counts = trade_counts[trade_counts["hyperdrive_name"] == pool.name][ "event_type" ].values @@ -210,7 +216,7 @@ def _check_trades_made_on_pool( error_message = "FuzzBots: " + error_message logging.error(error_message) # We log message to get rollbar to group these messages together - log_rollbar_message(error_message, logging.ERROR) + log_rollbar_message(error_message, log_level) def run_fuzz_bots(