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
80 stars 38 forks source link

Bridge crashes if a transaction causes `out of gas` #12

Closed akolotov closed 6 years ago

akolotov commented 6 years ago

Steps to reproduce:

  1. Change the configuration file to reduce gas for deposit_relay to 20000.
  2. Run the bridge with RUST_LOG=debug
  3. Send ether to the HomeBridge contract

When the bridge is trying to send deposit confirmation to the ForeignBridge contract it crashes and the following appears in the console:

Error(Rpc(Error { code: ServerError(-32010), message: "Transaction gas is too low. There is not enough gas to cover minimal cost of the transaction (minimal: 25368, got: 12000). Try increasing supplied gas.", data: None }), State { next_error: None, backtrace: None })

Expected behavior

The bridge produces an error message to console (which is observable even with RUST_LOG=error) and continues working.

yrashk commented 6 years ago

Should also get addressed by #36 as it handles error code -32010