Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No indication if the contract executiton requires more gas than it was specified #13

Open
akolotov opened this issue Feb 12, 2018 · 1 comment
Assignees

Comments

@akolotov
Copy link
Contributor

Steps to reproduce:

  1. Change the configuration file to reduce gas for deposit_relay to 25400.
  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 reports that transaction was sent and deposit completed even it was not handled properly (in my case it was not included in a new block at all):

INFO:bridge::bridge::deposit_relay: got 1 new deposits to relay
DEBUG:<unknown>: [29] Calling: {"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"data":"0x26b3293f00000000000000000000000037a30534da3d53aa1867adde26e114a3161b2b1200000000
0000000000000000000000000000000000000000000a8503892e10001b254563acfa39c680314bf887d84561a8dddb3bb832664d0adaa16a2142a896","from":"0xf3ee321df87781864f46f6464e764c2827fca73b","gas":
"0x6338","gasPrice":"0x430e23400","to":"0x6500d471c8973d95493b417c44ab85f31265a2b6"}],"id":29}
INFO:bridge::bridge::deposit_relay: relaying 1 deposits
...
INFO:bridge::bridge::deposit_relay: deposit relay completed

Moreover the counter of checked_deposit_relay is increased in the database file. So, the bridge is in incorrect state after sending of such transaction.

Expected behavior

  1. The bridge must track the transactions it is sending and reports if something was wrong with them.
  2. If some relay or confirm operation cannot be completed due to failed transactions the corresponding counter in the database file must not be incremented.
@yrashk
Copy link
Contributor

yrashk commented May 29, 2018

Have we encountered this recently? Currently, the bridge will crash with a designated error code (5) when gas is too low.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants