Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

BridgeTask Trait Draft #186

Closed
13 of 14 tasks
hackfisher opened this issue Jun 1, 2021 · 0 comments
Closed
13 of 14 tasks

BridgeTask Trait Draft #186

hackfisher opened this issue Jun 1, 2021 · 0 comments
Assignees

Comments

@hackfisher
Copy link
Contributor

hackfisher commented Jun 1, 2021

Continue with the refactor of #177 , we also need to do framework level refactor. There will be several key components for bridger.

  1. Bridger Client, including general shared key sub components for all bridge tasks, including

    • Config Manager and Storage Persistency(Cache, task storage etc.)
    • Cli
    • Service Manager, mpsc/channel, micro service etc.
    • Chain Client/Definition Manager
    • Secret/private_key Manager
    • Error
    • Bridge task loader/executor
  2. BridgeTask, common trait for specific BridgeTask to implement

    • ID(name)
    • Config Definition
    • Storage Definition
    • Source chain and target chain/Client definitions, (Ethereum web3, Substrate client, e.g. substrate-subxt, substrate-api-client etc, chain/runtime definition)
    • Key/Account Definition
    • Tasks definition, loops for bridger to execute
    • Event handle

We do not need dynamic load, to keep simple, we do not need to incorporate web assembly to define BridgeTask, we only need a well abstracted trait, and one struct for specific bridge, e.g. the bridge from bsc to darwinia, and implement this trait.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants