Commit Graph

12 Commits

Author SHA1 Message Date
Yurii Rashkovskii 813a8715f9
Problem: hard to check which version the bridge is
Solution: introduce `bridge -v|--version` flag to print the version

The version is built off `git describe`, however, as a backup,
if `git describe` fails (stripped .git, etc.), this will fall back
to whatever is specified in Cargo.toml

Fixes #87
2018-05-31 14:05:19 -07:00
Yurii Rashkovskii b7d7dd3a97
Bump version to 0.3.0 2018-05-31 13:45:34 -07:00
Yurii Rashkovskii 3ea15931fb
Prepare 0.2.1 2018-05-31 11:06:12 -07:00
Yurii Rashkovskii c513d010c7
Prepare 0.2.0 2018-05-08 11:03:33 -07:00
Yurii Rashkovskii 9a192c1e07
Problem: bridge should not deploy its contracts anymore
Bridge's contracts are now developed in a separate repository
and have their own deployment procedure:

https://github.com/poanetwork/poa-parity-bridge-contracts

However, our integration tests are not yet updated to
use this deployment procedure.

Solution: disable deployment compile-time by default
and only use it in integration tests as a stopgap measure
until the new deployment procedure (or any other viable
alternative) has been used.
2018-05-01 09:43:34 -07:00
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 38e1cac265
Problem: intentional bridge shutdowns
It is impossible to tell whether the bridge
is being shut down intentionally or because of
an error. This is particularly important
for supervising the process, both in development
and production.

Solution: handle SIGINT and SIGTERM as a special case
and designate a separate status code (3) for intentional
shutdowns.

Also, include an example supervisor for development
mode (examples/suprevisor). Simply prepend it before
the invocation of bridge to supervise it.
2018-03-15 21:14:37 +07:00
Maximilian Krüger 9753db7326 cli/Cargo.toml: bump `env_logger` to `0.4` 2018-02-15 13:13:59 +01:00
debris 1a2cb47124 bridge writes to backing database 2017-08-28 16:48:01 +02:00
debris fa962565ad repo overhaul, separated binary from library, closes #10, added tests crate 2017-08-25 00:36:13 +02:00
debris d0edf2b327 app rewrite 2017-06-25 13:21:28 +02:00
debris d4c4682cee init 2017-06-13 10:28:04 +02:00