Skip to content

Commit

Permalink
Add more verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-stakewise committed Oct 4, 2023
1 parent 05ab146 commit 032760a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/exits/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand All @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion src/validators/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 032760a

Please sign in to comment.