Validators and relayer
Two off-chain programs make delivery happen. Neither can change what a message says.
Validators
A validator watches one chain's Mailbox (more precisely, its Merkle tree hook).
- It waits until a block is final enough (each chain's
reorgPeriodin the registry): BSC testnet waits longer than OP Sepolia. - It signs a checkpoint: the Merkle root, the index of the latest message, and that message's id, bound to the origin domain and its Merkle tree hook.
- It publishes signatures to storage anyone can read (a GCS bucket in production) and announces that location once on-chain, in the chain's
ValidatorAnnouncecontract.
A validator never sends transactions after its announcement and never holds user funds. What it signs is what destination ISMs trust, so its key is the security-critical one.
Relayer
The relayer connects all chains.
- It indexes
Dispatchevents and gas payments on every origin. - For each message that prepaid gas, it reads validator signatures from their announced locations until it has a threshold.
- It calls
process(metadata, message)on the destination Mailbox, paying gas, and retries with backoff on failure.
The relayer is permissionless: it carries signatures, so it cannot forge or alter messages. If it stops, messages wait; anyone can run another relayer and deliver them.
Who runs them
Recoil Labs runs one validator and one relayer today. Before mainnet the validator set grows to several independent operators: see Security. Who should run them, and what they get from it, is in Operators. To run agents yourself see Run validators and relayers.