⚠️ IMPORTANT: This challenge evaluates your ability to write highly performant, concurrent Go code.
Given a list of 500,000 Ethereum addresses, each associated to a userId, create a microservice in Golang that monitors the Ethereum blockchain (and compatible L2 chains) for any transactions involving those addresses. The solution should be designed to work on Ethereum Mainnet, but should also be able to run on L2 chains such as Arbitrum, which have higher block throughput.
In summary, the service should:
-
Connect to the Ethereum blockchain (or compatible L2 chains) via native JSON-RPC methods.
You can use RPC providers such as Alchemy, QuickNode, or free RPC endpoints from chainlist.org. Do not use third-party APIs or indexing services — only the RPC methods exposed by Ethereum nodes.
Assume unrestricted usage of the RPC node - if using free RPCS ignore any rate limits and do not slow down your solution to work around rate limiting. Focus on maximum performance. -
Detect all transactions that involve the specified addresses.
-
For the filtered transactions, output the following information as JSON payloads to Kafka:
userIdfromtoamounthashblockNumber
The service should be designed for high performance and scalability, capable of processing blocks in real time. The service should be designed to guarantee with at least once delivery of a transaction once it occurs. Assume you have 500,000 users (therefore 500,000 unique addresses) and high throughput of blocks.
Block throughput reference: Ethereum Mainnet produces approximately ~0.08 blocks/second (12-13 second block time), while Arbitrum produces approximately ~1-4 blocks/second (0.25-1 second block time).
Focus on core functionality: Prioritize performance, scalability, and reliability. Avoid over-engineering - a simple script that demonstrates efficient blockchain monitoring is perfectly acceptable. Don't add databases, complex APIs, authentication, or other features unless they directly solve the core problem. Keep the codebase simple, well-structured, and understandable.
Use standard Go libraries: Stick to standard library packages and basic, well-established third-party libraries. You can use standard Ethereum client libraries (e.g., go-ethereum/ethclient) - you don't need to implement your own JSON-RPC client. Avoid complex frameworks, ORMs, or heavy boilerplating that might obscure the core blockchain monitoring logic. Focus on net/http, encoding/json, context, and similar standard packages.
Hint: The service is intended to run on Spot Instances (cheap but interruptible cloud compute), which can be terminated at any time. The system should not lose data - ensure that transactions are not missed even if the instance is interrupted.
We value modular, simple, testable code. Showcase how testable it is by testing it :)