darwinia-network / bridger

Relayer client implementation for Darwinia LCMP protocols.
https://rust-docs.darwinia.network/bridger
GNU General Public License v3.0
12 stars 10 forks source link

may lose some events #114

Closed xiaoch05 closed 3 years ago

xiaoch05 commented 3 years ago

https://github.com/darwinia-network/bridger/blob/a4b351af7cb250a1f7b2efa34baa2c3ec66a97bf/src/service/subscribe/mod.rs#L84

if some error occurs here, we may lose events in this block since the next block index still moves forward.

wuminzhe commented 3 years ago

Yes, it will move forward. If found errors, you can set-darwinia-start back to redo previous events. Maybe we can take different handling methods according to different errors

xiaoch05 commented 3 years ago

if we use set-darwinia-start to go back to the error block then the bridger will redo the blocks higher than that error block which we have been processed. Yes, using different methods according to different errors is a good idea, we should retry when it's network error.

wuminzhe commented 3 years ago

So we need to consider preventing repeated execution of the events handling.

hackfisher commented 3 years ago

Duplicated with #168