From 032760a0192eb77e62bcb97b1c3d1354c64007f3 Mon Sep 17 00:00:00 2001 From: Evgeny Gusarov Date: Wed, 4 Oct 2023 21:52:14 +0300 Subject: [PATCH] Add more verbosity --- src/exits/utils.py | 11 ++++++++--- src/validators/utils.py | 5 ++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/exits/utils.py b/src/exits/utils.py index cdd7b0d9..3c4f18ca 100644 --- a/src/exits/utils.py +++ b/src/exits/utils.py @@ -11,7 +11,7 @@ from web3 import Web3 from src.common.typings import OracleApproval, Oracles, OraclesApproval -from src.common.utils import log_verbose, process_oracles_approvals +from src.common.utils import format_error, process_oracles_approvals from src.config.settings import ( DEFAULT_RETRY_TIME, OUTDATED_SIGNATURES_URL_PATH, @@ -39,7 +39,12 @@ async def send_signature_rotation_requests( session=session, replicas=replicas, payload=payload ) except Exception as e: - log_verbose(e) + logger.error( + 'All endpoints for oracle %s failed to sign signature rotation request. ' + 'Last error: %s', + address, + format_error(e), + ) continue approvals[address] = response @@ -60,7 +65,7 @@ async def send_signature_rotation_request_to_replicas( try: return await send_signature_rotation_request(session, endpoint, payload) except (ClientError, asyncio.TimeoutError) as e: - log_verbose(e) + logger.warning('%s for endpoint %s', format_error(e), endpoint) last_error = e if last_error: diff --git a/src/validators/utils.py b/src/validators/utils.py index e9aff947..45bb8cfe 100644 --- a/src/validators/utils.py +++ b/src/validators/utils.py @@ -62,7 +62,10 @@ async def send_approval_requests(oracles: Oracles, request: ApprovalRequest) -> for address, result in zip(oracles.addresses, results): if isinstance(result, Exception): logger.error( - 'All endpoints failed for oracle %s. Last error: %s', address, format_error(result) + 'All endpoints for oracle %s failed to sign validators approval request. ' + 'Last error: %s', + address, + format_error(result), ) continue