Closed yrashk closed 6 years ago
The way the core bridge module is structured there's a non-zero chance of loss of database updates that would cause it to redo transactions it already did.
Let's say we've got some database updates through deposit relaying: https://github.com/poanetwork/poa-bridge/blob/master/bridge/src/bridge/mod.rs#L164-L165
Then, during relaying withdrawals, an error happened: https://github.com/poanetwork/poa-bridge/blob/master/bridge/src/bridge/mod.rs#L171-L172
This means that we won't reach https://github.com/poanetwork/poa-bridge/blob/master/bridge/src/bridge/mod.rs#L185-L193 to save the result.
Also, in a similar vein, if one of these streams was to end (Ready(None)) we'd experience a similar loss of updates: https://github.com/poanetwork/poa-bridge/blob/master/bridge/src/macros.rs#L5
Ready(None)
The way the core bridge module is structured there's a non-zero chance of loss of database updates that would cause it to redo transactions it already did.
Let's say we've got some database updates through deposit relaying: https://github.com/poanetwork/poa-bridge/blob/master/bridge/src/bridge/mod.rs#L164-L165
Then, during relaying withdrawals, an error happened: https://github.com/poanetwork/poa-bridge/blob/master/bridge/src/bridge/mod.rs#L171-L172
This means that we won't reach https://github.com/poanetwork/poa-bridge/blob/master/bridge/src/bridge/mod.rs#L185-L193 to save the result.
Also, in a similar vein, if one of these streams was to end (
Ready(None)
) we'd experience a similar loss of updates: https://github.com/poanetwork/poa-bridge/blob/master/bridge/src/macros.rs#L5