Building EIP2771 Gasless Relayer
Building a highly scalable, fault-tolerant relayer for EIP-2771 requires a robust architecture that can efficiently handle meta-transactions at scale.
System Goals
- High Scalability: Handle thousands of concurrent meta-transactions with low latency.
- Fault Tolerance: No single point of failure; system should remain operational under load or partial outages.
- Security: Protect user data, ensure valid meta-transactions, and prevent abuse.
- Flexibility: Easy to integrate with various dApps and support future protocol upgrades.
High-Level Overview
The server will have two primary threads:
- Relay Thread: Handles incoming meta-transaction requests, signs them, and sends them to the blockchain. Returns transaction hashes to REST API clients.
- Monitor Thread: Monitors the blockchain for transaction confirmations, updates the database, and generates analytical insights.
Future works
- The threading concept could be changed to a MessageQueuing process, with a little change in the code, greater scaliablity and redundancy can be achieved