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

Splitting s2s init to command and remote auto_start #238

Closed xiaoch05 closed 2 years ago

xiaoch05 commented 3 years ago

when we start s2s bridge, we must first set auto_start = false in configure to init bridge then we have to change this option to true to start bridge It is not friendly to use suggest adding an s2s init command and delete this auto_start item.

fewensa commented 3 years ago

https://github.com/darwinia-network/bridger/blob/master/task/task-pangolin-millau/docs/Guide.md The documents of s2s.

  1. When start for the first time, auto_start should be set to false, otherwise, bridger will automatically start the pangolin-millau relay service.
  2. After the first startup, execute the task exec command to initialize the bridge
    bridger task exec -n task-pangolin-millau --api init-bridge --param bridge=pangolin-to-millau
    bridger task exec -n task-pangolin-millau --api init-bridge --param bridge=millau-to-pangolin
  3. After initialization, execute the task exec command to start the relay service
    bridger task exec -n task-pangolin-millau --api start-relay

    When executed, it will automatically update the value of auto_start to true

  4. There is no need to do other configuration in the future, pangolin-millau will start with the start of bridger.

then we have to change this option to true to start bridge

This will be automatically modified after start-relay

hackfisher commented 3 years ago

I agree with @xiaoch05 idea on this, bridge initialization is out scope of bridge task, it should be an one-time tool/cmd for helping developers to setting up.

Splitting s2s init to a command is a good choice.

fewensa commented 2 years ago

Currently, the auto_start default value is changed to true. https://github.com/darwinia-network/bridger/blob/b2316d4de0150770f926214b8b3962716fea77b8/.maintain/config/task-pangolin-pangoro.toml#L15 The auto_start is still needed, and should be changed to false when initializing the bridge. after initialization, please execute bridger task exec -n task-pangolin-millau --api start-relay to start the headers-relay/messages-relay.