Relayer¶
Operating a relayer¶
The hyperlane-ops repository contains a docker-compose.yml file along with a Hyperlane relayer agent config. This config is maintained and mounted for the container from the relayer/config.json file.
A relayer agent should be deployed on a server for supporting Hyperlane connection and warp route liveness.
Configuration¶
relayer/config.jsonis the Hyperlane agent configuration.- Keep
relayChainsin sync with chain entries in the registry.
Usage¶
The following is a set of useful commands for operating the Hyperlane relayer agent.
-
Start the docker compose service in the background.
docker compose up -d -
Stop the docker compose service and delete the associated volume data.
docker compose down -v -
Restart the relayer container.
docker compose restart relayer -
Output and stream the relayer container logs. Optionally provide the
--tail=0flag to stream latest and discard historical logs.docker logs hyperlane-relayer -f
If operating the relayer agent on a server for an extended period of time, you may require a large amount of disk space in order to keep it alive. The relayer agent can consume alot of disk space by the JSON logs alone. You can inspect this and truncate the log file using the following commands. If the relayer agent stopped working due to this, a container restart may be required.
-
Inspect JSON log file size.
sudo du -sh /var/lib/docker/containers/*/*-json.log 2>/dev/null | sort -h | tail -
Truncate the JSON log file using the container ID from the first command.
sudo truncate -s 0 /var/lib/docker/containers/<container-id>/<container-id>-json.log