This relayer service enables interaction with blockchain networks through transaction submissions. It offers multi-chain support and an extensible architecture for adding new chains.
.env file with the required environment variables & config/config.json file with the required configuration. See how to set it up in config files section for more information.config/config.json file. See how to set it up in signers section for more information.config/config.json file. See how to set it up in webhook section for more information.config/config.json file. See how to set it up in webhook section for more information.config/config.json file. See how to set it up in api key section for more information.⚠️ Redis is automatically started when using docker compose. If you are not using docker compose, you need to create a dedicated network and start redis manually.
You can pull the latest image using the following command:
docker pull openzeppelin/openzeppelin-relayer:latest
You can run the image using the following command:
docker run --env-file .env -d \
--name relayer \
--network relayer-net \
-p 8080:8080 \
-v ./config:/app/config:ro \
openzeppelin/openzeppelin-relayer:latest
Once the container is running, you can access the service at http://localhost:8080.
You can test the relayer by sending a request using a curl call. See testing relayer section for more information.
You can stop the container using the following command:
docker stop relayer
You can remove the container using the following command:
docker rm relayer
You can remove the image using the following command:
docker rmi openzeppelin/openzeppelin-relayer:latest
We welcome contributions to the OpenZeppelin Relayer. Please read our contributing section for more information.
The relayer runs its HTTP server on actix workers and its background transaction pipeline on a separate multi-thread tokio runtime. Size both to the container's vCPU quota with these env vars:
| Variable | Meaning | Default |
|---|---|---|
TOKIO_WORKER_THREADS | Pipeline runtime worker threads | max(1, vCPU − ACTIX_WORKERS) |
ACTIX_WORKERS | HTTP server workers | max(1, vCPU / 2) |
ACTIX_WORKERS + TOKIO_WORKER_THREADS should be ≤ the allocated vCPU. At startup
the relayer logs the resolved vcpu, actix_workers, and tokio_worker_threads, and
WARNs if the budget exceeds the quota.
Auto-detection (available_parallelism) returns host cores, not the cgroup quota,
on AWS Fargate (cpu.shares) — so on Fargate you must pin these explicitly.
Per-platform:
TOKIO_WORKER_THREADS/ACTIX_WORKERS in the task definition to
match the task vCPU; watch CloudWatch CPU throttling.--no-cpu-throttling
(run.googleapis.com/cpu-throttling: false) and min-instances >= 1, otherwise the
background pipeline is starved of CPU between HTTP requests. Set the worker counts to the
configured CPU.container_cpu_cfs_throttled_seconds_total.When using AWS KMS signers, set an explicit region in the signer config so region
resolution never falls back to the IMDS metadata endpoint.
See the observability section for more information on how to set up observability for the relayer.
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
For security concerns, please refer to our Security Policy.
Content type
Image
Digest
sha256:a0d8751b0…
Size
123.5 MB
Last updated
29 days ago
docker pull openzeppelin/openzeppelin-relayer