darwinia-network / bridger

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

Refactor and design merging between bridger and s2s bridge relay? #177

Closed hackfisher closed 3 years ago

hackfisher commented 3 years ago

https://github.com/darwinia-network/parity-bridges-common/tree/master/relays

hackfisher commented 3 years ago

https://github.com/darwinia-network/parity-bridges-common/tree/s2s/relays/bin-substrate

hackfisher commented 3 years ago

s2s bridge is using https://github.com/darwinia-network/parity-bridges-common/blob/master/relays/client-substrate/src/client.rs

and currently bridger is using substrate-xt, as a result, this caused different runtime client types definition. Current Bridger: #178 s2s bridge: https://github.com/darwinia-network/darwinia-common/pull/605/files?file-filters%5B%5D=.rs&file-filters%5B%5D=.toml#diff-e401ad5fc8fcd05972dc2243897b1c62a3b6fe5b430ce996dfa450098594820a

Will require merge here.

hackfisher commented 3 years ago

Some summary for the design discussion:

fewensa commented 3 years ago

About cli, may we don't need web server and client, the substrate-relay modified the implementation method, it's very simple, web server and client will become complicated. Another reason is that dynamic loading has not yet been implemented, and we don't need a web server to manage chains.

hackfisher commented 3 years ago

About cli, may we don't need web server and client, the substrate-relay modified the implementation method, it's very simple, web server and client will become complicated. Another reason is that dynamic loading has not yet been implemented, and we don't need a web server to manage chains.

web server and client is a plus, just like the design of geth and geth attach, why not keep it if it has already been implemented?

Another plus is that we may able to give web ui for bridgers in far future, which could be more friendly.

fewensa commented 3 years ago

Currently in substrate-relay, web server and client mode, I think the most valuable thing is that you can add chains dynamically, but the dynamic loading of the chain has not yet been implemented. So if we provide a web ui, I don’t know what data should be displayed.

About bridge relay data monitor we can set Prometheus server to watch it.

https://github.com/darwinia-network/bridger/blob/398c0e92b9ef4780d6c62075d3b5f28c52634ab4/substrate-relay/bin/src/types.rs#L43-L55

If want to provide a web server, we need to discuss which api should be design.

hackfisher commented 3 years ago

Currently in substrate-relay, web server and client mode, I think the most valuable thing is that you can add chains dynamically, but the dynamic loading of the chain has not yet been implemented. So if we provide a web ui, I don’t know what data should be displayed.

About bridge relay data monitor we can set Prometheus server to watch it.

https://github.com/darwinia-network/bridger/blob/398c0e92b9ef4780d6c62075d3b5f28c52634ab4/substrate-relay/bin/src/types.rs#L43-L55

If want to provide a web server, we need to discuss which api should be design.

Make sense, good with removing web server, let's just keep simple for now. We can add web server later if we need it.