ADR for Relayer v0 Concurrency Architecture #326
Labels
I: documentation
Internal: improvements or additions to documentation
I: logic
Internal: related to the relaying logic
Milestone
Summary
Specify the relayer concurrency architecture for the first release of the Relayer. The goal is to document this in ADR-005.
Problem Definition
There are a few threads required by the v0 relayer, per chain and per relaying path or link.
Proposal
We would like to document the architecture in an ADR capturing the following decomposition:
In this version of the relayer a single connection and channel are supported and they must be configured in the relayer configuration file. These limitations will be lifted in subsequent releases.
config executor
- single thread that runs upon start and creates alink
associated with the relaying path. It also triggers initiation messages for objects included in the config file. These are theConnOpenStart
orChannOpenStart
that could potentially cause the relayer to build and sendConnOpenInit
orChannOpenInit
messages to the chain. It should work even these events are received by thelink
in the same time with the live chain IBC events. In other words, no synchronization with starts of other threads should be required.chain
- one thread per chain that registers with the chain and forwards the notification messages to thelink
. Currently the relayer registers forTx
andBlock
notifications. It then extracts the IBC events from theTx
and generates a "NewBlock" event also for the block. Note that the notification may include multiple IBC Events.chain light client
- one thread per chain that receives relayer requests, downloads and verifies headers, and returns the minimal header set in the response. In addition this thread should ensure latest locally stored state does not expire, i.e. when some timer fires it fetches and verifies the latest header. Timeout should be a fraction of the trusting period. Timer should be reset by the on-demand relayer requests.link
- one thread per forwarding path. It receives events from the chains, performs queries and sends transactions synchronously.For Admin Use
The text was updated successfully, but these errors were encountered: