Skip to main content

Orchestrators

Router orchestrators are entities that listen to incoming cross-chain requests from other chains, attest their validity, parse them into a unified format and post them on the Router chain. These attested requests can then be picked up by the relayers and forwarded to the destination chain. All validators must run an orchestrator instance to be a part of the Router chain ecosystem.

Working of an Orchestrator

At a high level, a Router orchestrator works like a funnel that gathers events from various chains and posts them to the Router chain. To do so, an orchestrator uses a listener and dispatcher model wherein the listener module aggregates events while the dispatcher module forwards these events to the Router chain.

Orchestrator Architecture
  • Listener: The listener module of an orchestrator listens to events emitted from specific chains based on the chainType parameter in the configuration provided to it. Listeners operate as threads (goroutines) under an orchestrator. All listeners subscribe to multiple types of events - a regular iSend (cross-chain send) event, an iRecieve (cross-chain receive) event, and an iAck (acknowledgment) event. Once the listener module receives an event, it waits for the preconfigured amount of network confirmations (for example, 3 network confirmations for requests originating from Mumbai/Fuji) before parsing it into a message. Once the message is prepared, the listener adds it to a queue.
  • Queue: The queue is used to store and deliver transformed messages to consumers (dispatchers) in a first-in-first-out manner while ensuring that duplicate messages are automatically discarded.
  • Dispatcher: The dispatcher module is essentially responsible for streamlining the incoming requests by (a) listening to the queue, (b) signing the messages, and (c) broadcasting them to the Router chain.