BuidlGuidl / eth-tech-tree-backend

A server used for grading submitted ETH Tech Tree challenges
MIT License
1 stars 2 forks source link

Preliminary Research & Division Of Labor #3

Closed MattPereira closed 1 week ago

MattPereira commented 4 months ago

Summary

Preliminary research for how we might orchestrate building a server that handles the following requirements:

  1. Receives a request ( from client ) containing a deployed contract address
  2. Sends a request to Etherscan to download and save contract code to foundry/contracts/<contract_address>.sol
  3. Execute tests against the contract code to see if it passes
  4. Responds to client with score for the deployed contract
  5. Somehow persist data about scores achieved by each dev who submits a challenge

Resources

escottalexander commented 4 months ago
  1. Somehow persist data about scores achieved by each dev who submits a challenge

I have thought a lot about this and I think we should keep the grader pretty "dumb" as far as knowing what has occurred and what challenges have been submitted. I think it makes sense to manage all of that state in the back end for ETT and just let this simply process requests as they come.

So the client in this case is the ETT back end which will have a database keeping track of different users and their submissions. This grader service simply receives requests, processes them and will make a call back to the ETT back end with results when it gets them.

MattPereira commented 4 months ago

@escottalexander can you help me understand the benefits of running 2 separate servers?

Why not use the same server to receive challenge submission requests and save the results to db before sending back a response to the frontend client?

escottalexander commented 1 week ago

This Issue is outdated. @MattPereira last response was very valid and we built all the functionality into a single server.