omni / poa-bridge

POA <-> Ethereum bridge for self transfers of POA native token to POA20 (ERC20 representation). Not supported. Use TokenBridge instead
https://github.com/poanetwork/token-bridge
GNU General Public License v3.0
79 stars 38 forks source link

Transport related errors do not show the direction of the messaging #75

Closed akolotov closed 6 years ago

akolotov commented 6 years ago

If the error like this appears in the logs:

INFO:bridge::bridge::withdraw_confirm: waiting for new withdraws that should get signed
WARN:bridge: Bridge crashed with Error(Transport("Incomplete"), State { next_error: None, backtrace: None })
Error(Transport("Incomplete"), State { next_error: None, backtrace: None })

it is hard to understand which side of the bridge failed. The message must contains type of operation (deposit_relay, withdraw_confirm or withdraw_relay) and side of bridge (URL of RPC channel).

yrashk commented 6 years ago

The easiest way to track these right now without any changes would be to set RUST_BACKTRACE=1, this way the errors will include backtraces. Not particularly easy to navigate through them (requires reading through the a long trace), but as a "poor man's fix" should do.

I'll investigate how difficult would it be to map errors to contextualized ones in order to improve this experience.