# Off-chain Actors

The Telepathy protocol relies on off-chain actors to trigger on-chain contract execution:

* The [Operator](#operator) is responsible for generation zkSNARK proofs and updates for the [Light Client](/telepathy-protocol/contracts.md#light-client) contract.
* The [Relayer](#relayer) executes messages for the [Router](/telepathy-protocol/contracts.md#router) contract.

These actors are completely permissionless. [Succinct](https://succinct.xyz/) operates their own version of these actors so that the user experience of integrating with Telepathy painless, but as all `LightClient` and `TelepathyRouter` update functions are permissionless (with no access control), anyone who wishes to can run their own versions of an operator and relayer can do so.

## Operator

The Operator is responsible for keeping the Light Clients on each chain up-to-date with Ethereum's latest block headers. To accomplish this, the Operator periodically queries the sync committee for the latest finalized block header, and then generates a zkSNARK ([circuit](https://google.com)) which attests to the fact that enough of the sync committee has provided signatures for this block. The zkSNARK takes around 1-2 minutes to generate on a 32 core machine. This zkSNARK is then passed as an argument into a function called [`step`](https://github.com/succinctlabs/telepathy-contracts/blob/fe9566b7837487dfb6d39e708a2c0bfb7c52ceaf/src/lightclient/LightClient.sol#L94) within the Light Client contract for verification.\
\
The Operator is also responsible for updating the set of validators included in the sync committee within the Light Clients. The sync committee rotates every 27 hours. The Operator periodically generates a zkSNARK ([circuit](https://google.com)) which attests to the proper selection of the next sync committee. This zkSNARK is then passed into a different function called [`rotate`](https://github.com/succinctlabs/telepathy-contracts/blob/fe9566b7837487dfb6d39e708a2c0bfb7c52ceaf/src/lightclient/LightClient.sol#L116) within the Light Client contract for verification.&#x20;

All circuits and contracts are open-source and can be used to generate the above proofs in running one's own operator if desired.

## Relayer

The Relayer is responsible for relaying the arbitrary messages sent from Ethereum to the other chains. The Relayer waits for the Light Clients on each chain to be updated by the Operator, and then relays all the messages that can be validated via a Merkle proof against the latest block header in the Light Client.&#x20;

In particular, the Relayer will gather the necessary Merkle proof for each message and then pass them as an argument to the [Router ](/telepathy-protocol/contracts.md#router)contract's [`executeMessageFromLog`](https://github.com/succinctlabs/telepathy-contracts/blob/fe9566b7837487dfb6d39e708a2c0bfb7c52ceaf/src/amb/TargetAMB.sol#L104) function:

```solidity
function executeMessageFromLog(
    bytes calldata srcSlotTxSlotPack,
    bytes calldata messageBytes,
    bytes32[] calldata receiptsRootProof,
    bytes32 receiptsRoot,
    bytes[] calldata receiptProof,
    bytes memory txIndexRLPEncoded,
    uint256 logIndex
)
```

Assuming the Merkle proofs are valid, the message will get relayed to the correct destination contract.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.telepathy.xyz/telepathy-protocol/actors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
