Commit Graph

18 Commits

Author SHA1 Message Date
Yurii Rashkovskii 618d3bcb00
Problem: bridge crashes with insufficient balance
Currently there are two possible situations related to low balance on
the account which is used for bridge operations:

1. The account which is used to sign transactions to be addressed by
ForeignBridge contract has low balance. So, the bridge is not able to do
deposit_relay and withdraw_confirm.
2. The account which is used to sign transactions to be addressed by
HomeBridge contract has low balance. So, the bridge is not able to do
withdraw_relay.

In both cases bridges hangs silently at the moment of sending
transactions and does not proceed with further actions even the
operation is intended to be performed in opposite direction (e.g. the
bridge hangs at the moment to perform withdraw_relay, so deposit_relay
cannot be performed either).

Solution: make bridge track its balance and hande insufficient

Bridge will crash with ERR_INSUFFICIENT_FUNDS (code 4) so that
supervisor can decide what should happen next. It will also log the
condition.

P.S.Make sure to run the tests with `--test-threads=1` to avoid
other test conflicting with this one. A better solution to this
issue must be devised later, however.
2018-04-04 10:42:16 +04:00
Yurii Rashkovskii 732711d2d0
Problem: can't compile inyegration tests
Solution: add missing instructions for building
token
2018-03-09 08:09:27 +00:00
Yurii Rashkovskii d9bc432ab8
Problem: integration tests won't compile or pass
Solution: map it to the API used in bridge.sol
2018-03-05 15:23:36 +07:00
Maximilian Krüger 8ab895664a integration-tests: set home_gas_price to 0 to make it pass for now 2018-02-12 15:35:06 +01:00
Maximilian Krüger 8f1f8cae3e adapt integration tests to #112 2018-02-09 09:41:46 +01:00
debris 5e90f850fd updated web3 to latest version and resolved build issues 2018-02-07 14:50:49 +01:00
debris cc2c3fea9b bump ethabi and ethereum-types to latest versions 2018-02-06 22:57:06 +01:00
Maximilian Krüger 1b454204c5 integration tests: various improvements. reduce duplication 2018-01-26 10:00:44 +01:00
Maximilian Krüger 66a45f24e2 integration tests bridge config: give deposit more gas so it succeeds 2018-01-26 10:00:44 +01:00
Maximilian Krüger b6a34c6252 integration-tests/tests/basic_deposit_then_withdraw.rs: add module docstring
[ci skip]
2018-01-22 20:56:02 +01:00
Maximilian Krüger ff7acc3f4a remove outcommented code 2018-01-22 16:48:41 +01:00
Maximilian Krüger 9aa26ea390 remove unused dependency 2018-01-22 16:48:30 +01:00
Maximilian Krüger 0db863d5de integration-tests: resolve rust compiler warnings 2018-01-22 16:30:01 +01:00
Maximilian Krüger c558ab5e63 remove home_chain.json - no longer needed. we use the dev chain now 2018-01-22 14:35:54 +01:00
Maximilian Krüger 2a65d52de2 clean up integration test a bit 2018-01-22 14:35:54 +01:00
Maximilian Krüger 9f5ff425de make integration test a proper rust test 2018-01-22 14:35:54 +01:00
Maximilian Krüger adc4a0a1eb integration-tests: indent with tabs 2018-01-19 14:45:11 +01:00
Maximilian Krüger e6f6797ac7 add first rough integration test 2018-01-19 14:43:28 +01:00